Пример #1
0
 /**
  * @param attackList
  * @param effect
  */
 public void checkShieldStatus(List<AttackResult> attackList, Effect effect, Creature attacker) {
   if (attackCalcObservers.size() > 0) {
     for (AttackCalcObserver observer : attackCalcObservers) {
       observer.checkShield(attackList, effect, attacker);
     }
   }
 }
Пример #2
0
 public float getBaseMagicalDamageMultiplier() {
   float multiplier = 1;
   if (attackCalcObservers.size() > 0) {
     for (AttackCalcObserver observer : attackCalcObservers) {
       multiplier *= observer.getBaseMagicalDamageMultiplier();
     }
   }
   return multiplier;
 }
Пример #3
0
 public float getBasePhysicalDamageMultiplier(boolean isSkill) {
   float multiplier = 1;
   if (attackCalcObservers.size() > 0) {
     for (AttackCalcObserver observer : attackCalcObservers) {
       multiplier *= observer.getBasePhysicalDamageMultiplier(isSkill);
     }
   }
   return multiplier;
 }
Пример #4
0
 /**
  * @param status
  * @return
  */
 public boolean checkAttackerStatus(AttackStatus status) {
   if (attackCalcObservers.size() > 0) {
     for (AttackCalcObserver observer : attackCalcObservers) {
       if (observer.checkAttackerStatus(status)) {
         return true;
       }
     }
   }
   return false;
 }
Пример #5
0
 public AttackerCriticalStatus checkAttackerCriticalStatus(AttackStatus status, boolean isSkill) {
   if (attackCalcObservers.size() > 0) {
     for (AttackCalcObserver observer : attackCalcObservers) {
       AttackerCriticalStatus acStatus = observer.checkAttackerCriticalStatus(status, isSkill);
       if (acStatus.isResult()) {
         return acStatus;
       }
     }
   }
   return new AttackerCriticalStatus(false);
 }