Пример #1
0
 public static String AttaquantsDuPrisme(int id, short CarteId, int FightId) {
   String str = "+";
   str += Integer.toString(id, 36);
   for (Entry<Integer, Fight> Fight : World.getCarte(CarteId).get_fights().entrySet()) {
     if (Fight.getValue().get_id() == FightId) {
       for (Fighter fighter : Fight.getValue().getFighters(1)) {
         if (fighter.getPersonnage() == null) continue;
         str += "|";
         str += Integer.toString(fighter.getPersonnage().get_GUID(), 36) + ";";
         str += fighter.getPersonnage().get_name() + ";";
         str += fighter.getPersonnage().get_lvl() + ";";
         str += "0;";
       }
     }
   }
   return str;
 }
Пример #2
0
 public static String DefenseursDuPrisme(int id, short CarteId, int FightId) {
   String str = "+";
   String stra = "";
   str += Integer.toString(id, 36);
   for (Entry<Integer, Fight> Fight : World.getCarte(CarteId).get_fights().entrySet()) {
     if (Fight.getValue().get_id() == FightId) {
       for (Fighter fighter : Fight.getValue().getFighters(2)) {
         if (fighter.getPersonnage() == null) continue;
         str += "|";
         str += Integer.toString(fighter.getPersonnage().get_GUID(), 36) + ";";
         str += fighter.getPersonnage().get_name() + ";";
         str += fighter.getPersonnage().get_gfxID() + ";";
         str += fighter.getPersonnage().get_lvl() + ";";
         str += Integer.toString(fighter.getPersonnage().get_color1(), 36) + ";";
         str += Integer.toString(fighter.getPersonnage().get_color2(), 36) + ";";
         str += Integer.toString(fighter.getPersonnage().get_color3(), 36) + ";";
         if (Fight.getValue().getFighters(2).size() > 7) str += "1;";
         else str += "0;";
       }
       stra = str.substring(1);
       stra = "-" + stra;
       Fight.getValue().setDefenseurs(stra);
     }
   }
   return str;
 }
Пример #3
0
 public void modifStatByInvocator(Fighter caster) {
   int coef = (1 + (caster.get_lvl()) / 100);
   PDV = (PDVMAX) * coef;
   PDVMAX = PDV;
   int force = stats.get(Constants.STATS_ADD_FORC) * coef;
   int intel = stats.get(Constants.STATS_ADD_INTE) * coef;
   int agili = stats.get(Constants.STATS_ADD_AGIL) * coef;
   int sages = stats.get(Constants.STATS_ADD_SAGE) * coef;
   int chanc = stats.get(Constants.STATS_ADD_CHAN) * coef;
   stats.put(Constants.STATS_ADD_FORC, force);
   stats.put(Constants.STATS_ADD_INTE, intel);
   stats.put(Constants.STATS_ADD_AGIL, agili);
   stats.put(Constants.STATS_ADD_SAGE, sages);
   stats.put(Constants.STATS_ADD_CHAN, chanc);
 }