Example #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);
     }
   }
 }
Example #2
0
 public float getBaseMagicalDamageMultiplier() {
   float multiplier = 1;
   if (attackCalcObservers.size() > 0) {
     for (AttackCalcObserver observer : attackCalcObservers) {
       multiplier *= observer.getBaseMagicalDamageMultiplier();
     }
   }
   return multiplier;
 }
Example #3
0
 public float getBasePhysicalDamageMultiplier(boolean isSkill) {
   float multiplier = 1;
   if (attackCalcObservers.size() > 0) {
     for (AttackCalcObserver observer : attackCalcObservers) {
       multiplier *= observer.getBasePhysicalDamageMultiplier(isSkill);
     }
   }
   return multiplier;
 }
Example #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;
 }
Example #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);
 }