Examples of persistanceChance()


Examples of org.jpokemon.pokemon.ConditionEffect.persistanceChance()

    for (Slot slot : this) {
      // Condition effects
      for (Iterator<ConditionEffect> conditionEffectIterator = slot.leader().getConditionEffects().iterator(); conditionEffectIterator.hasNext();) {
        ConditionEffect conditionEffect = conditionEffectIterator.next();

        if (Math.random() <= conditionEffect.persistanceChance()) {
          log(slot.leader().name() + conditionEffect.getPersistanceMessage());

          if (conditionEffect.damagePercentage() > 0) {
            int damage = (int) (slot.leader().maxHealth() * conditionEffect.damagePercentage());
            slot.leader().takeDamage(damage);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.