mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +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> {
|
class KalastriaHighbornTriggeredAbility extends TriggeredAbilityImpl<KalastriaHighbornTriggeredAbility> {
|
||||||
KalastriaHighbornTriggeredAbility ( ) {
|
KalastriaHighbornTriggeredAbility ( ) {
|
||||||
super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), false);
|
super(Zone.ALL, new LoseLifeTargetEffect(2), false);
|
||||||
this.addCost(new ManaCostsImpl("{B}"));
|
this.addCost(new ManaCostsImpl("{B}"));
|
||||||
this.addTarget(new TargetPlayer());
|
this.addTarget(new TargetPlayer());
|
||||||
this.getEffects().add(new GainLifeEffect(2));
|
this.getEffects().add(new GainLifeEffect(2));
|
||||||
|
@ -93,6 +93,16 @@ class KalastriaHighbornTriggeredAbility extends TriggeredAbilityImpl<KalastriaHi
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if ( event.getType() == EventType.ZONE_CHANGE ) {
|
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;
|
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
|
||||||
Permanent permanent = zEvent.getTarget();
|
Permanent permanent = zEvent.getTarget();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue