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; }
public int getAttackCombatBox() { CombatWrapper combat = new CombatWrapper(getGameObject()); return combat.getCombatBox(); }
public int getManeuverCombatBox() { CombatWrapper combat = new CombatWrapper(getGameObject()); return combat.getCombatBox(); }