forked from External/mage
Fixed Double face cards triggerd ability and Moonscarred Werewolf. Issue #55
This commit is contained in:
parent
5cb18092a0
commit
222b74c8ea
2 changed files with 6 additions and 6 deletions
|
|
@ -57,7 +57,7 @@ public class TriggeredAbilities extends HashMap<String, TriggeredAbility> {
|
|||
if (ability.isInUseableZone(game, null, true)) {
|
||||
MageObject object = getMageObject(event, game, ability);
|
||||
if (object != null) {
|
||||
if (checkAbilityStillExists(ability, object)) {
|
||||
if (checkAbilityStillExists(ability, event, object)) {
|
||||
if (object instanceof Permanent) {
|
||||
ability.setControllerId(((Permanent) object).getControllerId());
|
||||
}
|
||||
|
|
@ -71,14 +71,14 @@ public class TriggeredAbilities extends HashMap<String, TriggeredAbility> {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean checkAbilityStillExists(TriggeredAbility ability, MageObject object) {
|
||||
private boolean checkAbilityStillExists(TriggeredAbility ability, GameEvent event, MageObject object) {
|
||||
boolean exists = true;
|
||||
if (!object.getAbilities().contains(ability)) {
|
||||
exists = false;
|
||||
if (object instanceof PermanentCard) {
|
||||
PermanentCard permanent = (PermanentCard)object;
|
||||
if (permanent.canTransform()) {
|
||||
exists = permanent.getCard().getAbilities().contains(ability);
|
||||
if (permanent.canTransform() && event.getType() == GameEvent.EventType.TRANSFORMED) {
|
||||
exists = permanent.getCard().getAbilities().contains(ability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue