Exemplo n.º 1
0
 public boolean applyHit(
     GameWrapper game,
     HostPrefWrapper hostPrefs,
     BattleChit attacker,
     int box,
     Harm attackerHarm,
     int attackOrderPos) {
   Harm harm = new Harm(attackerHarm);
   Strength vulnerability = new Strength(getAttribute("this", "vulnerability"));
   if (!harm.getIgnoresArmor() && getGameObject().hasThisAttribute(Constants.ARMORED)) {
     harm.dampenSharpness();
     RealmLogging.logMessage(
         attacker.getGameObject().getName(),
         "Hits armor, and reduces sharpness: " + harm.toString());
   }
   Strength applied = harm.getAppliedStrength();
   if (applied.strongerOrEqualTo(vulnerability)) {
     // Dead horse!
     CombatWrapper combat = new CombatWrapper(getGameObject());
     combat.setKilledBy(attacker.getGameObject());
     combat.setHitByOrderNumber(attackOrderPos);
     RealmLogging.logMessage(
         attacker.getGameObject().getName(), "Kills the " + getGameObject().getName());
     return true;
   }
   return false;
 }
Exemplo n.º 2
0
 public int getAttackCombatBox() {
   CombatWrapper combat = new CombatWrapper(getGameObject());
   return combat.getCombatBox();
 }
Exemplo n.º 3
0
 public int getManeuverCombatBox() {
   CombatWrapper combat = new CombatWrapper(getGameObject());
   return combat.getCombatBox();
 }