mirror of
https://github.com/correl/mage.git
synced 2025-01-15 03:00:11 +00:00
* Fixed a transform follow up problem.
This commit is contained in:
parent
04ce4c85c0
commit
941adbca86
1 changed files with 34 additions and 1 deletions
|
@ -116,6 +116,24 @@ class HuntmasterOfTheFellsAbility extends TriggeredAbilityImpl {
|
||||||
return new HuntmasterOfTheFellsAbility(this);
|
return new HuntmasterOfTheFellsAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {
|
||||||
|
if (event.getType() == GameEvent.EventType.TRANSFORMED) {
|
||||||
|
Permanent currentSourceObject = (Permanent) getSourceObjectIfItStillExists(game);
|
||||||
|
if (currentSourceObject != null && !currentSourceObject.isNightCard()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.isInUseableZone(game, source, event);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.TRANSFORMED || event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.TRANSFORMED && event.getTargetId().equals(this.getSourceId())) {
|
if (event.getType() == GameEvent.EventType.TRANSFORMED && event.getTargetId().equals(this.getSourceId())) {
|
||||||
|
@ -157,9 +175,24 @@ class RavagerOfTheFellsAbility extends TriggeredAbilityImpl {
|
||||||
return new RavagerOfTheFellsAbility(this);
|
return new RavagerOfTheFellsAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.TRANSFORMED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {
|
||||||
|
Permanent currentSourceObject = (Permanent) getSourceObjectIfItStillExists(game);
|
||||||
|
if (currentSourceObject != null && currentSourceObject.isNightCard()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.isInUseableZone(game, source, event);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.TRANSFORMED && event.getTargetId().equals(sourceId)) {
|
if (event.getTargetId().equals(sourceId)) {
|
||||||
Permanent permanent = game.getPermanent(sourceId);
|
Permanent permanent = game.getPermanent(sourceId);
|
||||||
if (permanent != null && permanent.isTransformed()) {
|
if (permanent != null && permanent.isTransformed()) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue