mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
* Wildfire Eternal - Fixed that the ability triggered multiple times if more than one player blocked during the turn (fixes #4466).
This commit is contained in:
parent
7afc157ba0
commit
f9ca04dfbb
3 changed files with 3 additions and 4 deletions
|
@ -42,7 +42,6 @@ import mage.constants.Outcome;
|
|||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
|
@ -97,8 +96,7 @@ class WildfireEternalCastEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (controller != null && sourceObject != null) {
|
||||
if (controller != null) {
|
||||
FilterCard filter = new FilterInstantOrSorceryCard();
|
||||
int cardsToCast = controller.getHand().count(filter, source.getControllerId(), source.getSourceId(), game);
|
||||
if (cardsToCast > 0 && controller.chooseUse(outcome, "Cast an instant or sorcery card from your hand without paying its mana cost?", source, game)) {
|
||||
|
|
|
@ -66,7 +66,7 @@ public class AttacksAndIsNotBlockedTriggeredAbility extends TriggeredAbilityImpl
|
|||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.DECLARED_BLOCKERS;
|
||||
return event.getType() == EventType.DECLARE_BLOCKERS_STEP;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -83,6 +83,7 @@ public abstract class Step implements Serializable {
|
|||
public void priority(Game game, UUID activePlayerId, boolean resuming) {
|
||||
if (hasPriority) {
|
||||
stepPart = StepPart.PRIORITY;
|
||||
game.fireEvent(new GameEvent(stepEvent, null, null, activePlayerId));
|
||||
game.playPriority(activePlayerId, resuming);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue