@Override public void onChallengerLose(Human challenger, IBattleUnit beChallenged) { HumanWarriorManager warriorManager = challenger.getHumanWarriorManager(); warriorManager.refreshOpponent(true); warriorManager.sendUpdateOpponentMessage(); int damage = orignalHp - beChallenged.getBattleContext().getBattleProperty().getHp(); warriorManager.updateQuestCounter(damage / (orignalHp * 1f)); }
@Override public void onChallengerWin(Human challenger, IBattleUnit beChallenged) { HumanWarriorManager warriorManager = challenger.getHumanWarriorManager(); warriorManager.refreshOpponent(true); warriorManager.sendUpdateOpponentMessage(); warriorManager.addWarriorHeartNum(winRewardWarriorHeartNum); warriorManager.updateQuestCounter(1); }