Exemplo n.º 1
0
 @Override
 public int getCode(String abilityName) {
   final String[] DESCS = CODES.DESCS();
   for (final int i : CharStats.CODES.ALLCODES()) {
     if (DESCS[i].startsWith(abilityName)) return i;
   }
   return -1;
 }
Exemplo n.º 2
0
  @Override
  public String getStat(String abilityName) {
    final int dex = CMParms.indexOfIgnoreCase(getStatCodes(), abilityName);
    if (dex >= 0) return Integer.toString(getStat(dex));

    final String[] DESCS = CODES.DESCS();
    for (final int i : CharStats.CODES.ALLCODES()) {
      if (DESCS[i].startsWith(abilityName)) return Integer.toString(getStat(i));
    }
    return null;
  }