Examples of DamagedPlaneswalkerEvent


Examples of mage.game.events.DamagedPlaneswalkerEvent

      if (actualDamage > 0) {
        if (event.getAmount() > this.loyalty.getValue()) {
          actualDamage = this.loyalty.getValue();
        }
        this.loyalty.boostValue(-actualDamage);
        game.fireEvent(new DamagedPlaneswalkerEvent(objectId, sourceId, controllerId, actualDamage, combat));
        return actualDamage;
      }
    }
    return 0;
  }
View Full Code Here

Examples of mage.game.events.DamagedPlaneswalkerEvent

                int countersToRemove = actualDamage;
                if (countersToRemove > getCounters().getCount(CounterType.LOYALTY)) {
                    countersToRemove = getCounters().getCount(CounterType.LOYALTY);
                }
                getCounters().removeCounter(CounterType.LOYALTY, countersToRemove);
                game.fireEvent(new DamagedPlaneswalkerEvent(objectId, sourceId, controllerId, actualDamage, combat));
                return actualDamage;
            }
        }
        return 0;
    }
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.