mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Rewrote Choose Blockers effect to ContinuousRuleModifyingEffectImpl
This commit is contained in:
parent
197aa33fc0
commit
c5399460b9
1 changed files with 3 additions and 13 deletions
|
@ -34,7 +34,6 @@ import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||||
import mage.abilities.condition.common.BeforeAttackersAreDeclaredCondition;
|
import mage.abilities.condition.common.BeforeAttackersAreDeclaredCondition;
|
||||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.ReplacementEffectImpl;
|
|
||||||
import mage.abilities.effects.RequirementEffect;
|
import mage.abilities.effects.RequirementEffect;
|
||||||
import mage.abilities.effects.RestrictionEffect;
|
import mage.abilities.effects.RestrictionEffect;
|
||||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||||
|
@ -238,10 +237,10 @@ class MasterWarcraftCantAttackRestrictionEffect extends RestrictionEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MasterWarcraftChooseBlockersEffect extends ReplacementEffectImpl { // TODO: replace this with ContinuousRuleModifyingEffectImpl
|
class MasterWarcraftChooseBlockersEffect extends ContinuousRuleModifyingEffectImpl { // TODO: reverse the resolution order in case of effect multiples
|
||||||
|
|
||||||
public MasterWarcraftChooseBlockersEffect() {
|
public MasterWarcraftChooseBlockersEffect() {
|
||||||
super(Duration.EndOfTurn, Outcome.Benefit);
|
super(Duration.EndOfTurn, Outcome.Benefit, false, false);
|
||||||
staticText = "You choose which creatures block this turn and how those creatures block";
|
staticText = "You choose which creatures block this turn and how those creatures block";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,15 +265,6 @@ class MasterWarcraftChooseBlockersEffect extends ReplacementEffectImpl { // TODO
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
Player blockController = game.getPlayer(source.getControllerId());
|
|
||||||
if (blockController != null) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
|
||||||
Player blockController = game.getPlayer(source.getControllerId());
|
Player blockController = game.getPlayer(source.getControllerId());
|
||||||
if (blockController != null) {
|
if (blockController != null) {
|
||||||
game.getCombat().selectBlockers(blockController, game);
|
game.getCombat().selectBlockers(blockController, game);
|
||||||
|
|
Loading…
Reference in a new issue