mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fix for Issue 41.
This commit is contained in:
parent
b1ab23df37
commit
ddeb0de911
1 changed files with 11 additions and 1 deletions
|
@ -75,7 +75,7 @@ public class KalastriaHighborn extends CardImpl<KalastriaHighborn> {
|
|||
|
||||
class KalastriaHighbornTriggeredAbility extends TriggeredAbilityImpl<KalastriaHighbornTriggeredAbility> {
|
||||
KalastriaHighbornTriggeredAbility ( ) {
|
||||
super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), false);
|
||||
super(Zone.ALL, new LoseLifeTargetEffect(2), false);
|
||||
this.addCost(new ManaCostsImpl("{B}"));
|
||||
this.addTarget(new TargetPlayer());
|
||||
this.getEffects().add(new GainLifeEffect(2));
|
||||
|
@ -93,6 +93,16 @@ class KalastriaHighbornTriggeredAbility extends TriggeredAbilityImpl<KalastriaHi
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if ( event.getType() == EventType.ZONE_CHANGE ) {
|
||||
|
||||
// ayrat: make sure Kalastria Highborn is on battlefield
|
||||
UUID sourceId = getSourceId();
|
||||
if (game.getPermanent(sourceId) == null) {
|
||||
// or it is being removed
|
||||
if (game.getLastKnownInformation(sourceId, Zone.BATTLEFIELD) == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
|
||||
Permanent permanent = zEvent.getTarget();
|
||||
|
||||
|
|
Loading…
Reference in a new issue