* Can't attack or block until pay abilities - fixed missing card texts (Floodtide Serpent, Qal Sisma Behemoth);

This commit is contained in:
Oleg Agafonov 2020-04-18 22:11:32 +04:00
parent 2fbf1589a1
commit 80ffa1652f

View file

@ -1,4 +1,3 @@
package mage.abilities.effects.common.combat; package mage.abilities.effects.common.combat;
import mage.abilities.Ability; import mage.abilities.Ability;
@ -12,22 +11,19 @@ import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public class CantAttackBlockUnlessPaysSourceEffect extends PayCostToAttackBlockEffectImpl { public class CantAttackBlockUnlessPaysSourceEffect extends PayCostToAttackBlockEffectImpl {
public CantAttackBlockUnlessPaysSourceEffect(Cost cost, RestrictType restrictType) { public CantAttackBlockUnlessPaysSourceEffect(Cost cost, RestrictType restrictType) {
super(Duration.WhileOnBattlefield, Outcome.Detriment, restrictType, cost); super(Duration.WhileOnBattlefield, Outcome.Detriment, restrictType, cost);
staticText = "{this} can't " + restrictType.toString() + " unless you " staticText = "{this} can't " + restrictType.toString() + " unless you " + (cost == null ? "" : cost.getText())
+ cost == null ? "" : cost.getText() + (restrictType == RestrictType.ATTACK ? " <i>(This cost is paid as attackers are declared.)</i>" : "");
+ (restrictType == RestrictType.ATTACK ? " <i>(This cost is paid as attackers are declared.)</i>" : "");
} }
public CantAttackBlockUnlessPaysSourceEffect(ManaCosts manaCosts, RestrictType restrictType) { public CantAttackBlockUnlessPaysSourceEffect(ManaCosts manaCosts, RestrictType restrictType) {
super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK_AND_BLOCK, manaCosts); super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK_AND_BLOCK, manaCosts);
staticText = "{this} can't " + restrictType.toString() + " unless you pay " staticText = "{this} can't " + restrictType.toString() + " unless you pay " + (manaCosts == null ? "" : manaCosts.getText());
+ manaCosts == null ? "" : manaCosts.getText();
} }
public CantAttackBlockUnlessPaysSourceEffect(CantAttackBlockUnlessPaysSourceEffect effect) { public CantAttackBlockUnlessPaysSourceEffect(CantAttackBlockUnlessPaysSourceEffect effect) {