mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
* Hushwing Gryff - Fixed not correct implemented rule modifying effect.
This commit is contained in:
parent
a541d24a20
commit
726fc48e49
1 changed files with 10 additions and 10 deletions
|
@ -36,13 +36,13 @@ import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
|||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.AbilityType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -106,13 +106,13 @@ class HushwingGryffEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = ((EntersTheBattlefieldEvent)event).getTarget();
|
||||
if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) {
|
||||
// Because replacement events have to be executed
|
||||
// call replaceEvent here without calling the triggering event after
|
||||
game.getContinuousEffects().replaceEvent(event, game);
|
||||
Ability ability = (Ability) getValue("targetAbility");
|
||||
if (ability != null && AbilityType.TRIGGERED.equals(ability.getAbilityType())) {
|
||||
Permanent p = game.getPermanent(event.getTargetId());
|
||||
if (p != null && p.getCardType().contains(CardType.CREATURE)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue