mirror of
https://github.com/magefree/mage.git
synced 2025-12-29 23:12:10 -08:00
[MIR] fixed Jungle Wurm calculating incorrectly (fixes #7449)
This commit is contained in:
parent
3d8d85fbbd
commit
4db79ae3c1
2 changed files with 15 additions and 16 deletions
|
|
@ -1,41 +1,41 @@
|
||||||
|
|
||||||
package mage.cards.j;
|
package mage.cards.j;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.BecomesBlockedSourceTriggeredAbility;
|
import mage.abilities.common.BecomesBlockedSourceTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.MultipliedValue;
|
import mage.abilities.dynamicvalue.MultipliedValue;
|
||||||
import mage.abilities.dynamicvalue.common.BlockedCreatureCount;
|
import mage.abilities.dynamicvalue.common.BlockedCreatureCount;
|
||||||
import mage.abilities.effects.Effect;
|
|
||||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LoneFox
|
* @author LoneFox
|
||||||
*/
|
*/
|
||||||
public final class JungleWurm extends CardImpl {
|
public final class JungleWurm extends CardImpl {
|
||||||
|
|
||||||
|
private static final DynamicValue xValue = new MultipliedValue(
|
||||||
|
new BlockedCreatureCount("", true), -1
|
||||||
|
);
|
||||||
|
|
||||||
public JungleWurm(UUID ownerId, CardSetInfo setInfo) {
|
public JungleWurm(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||||
this.subtype.add(SubType.WURM);
|
this.subtype.add(SubType.WURM);
|
||||||
this.power = new MageInt(5);
|
this.power = new MageInt(5);
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
// Whenever Jungle Wurm becomes blocked, it gets -1/-1 until end of turn for each creature blocking it beyond the first.
|
// Whenever Jungle Wurm becomes blocked, it gets -1/-1 until end of turn for each creature blocking it beyond the first.
|
||||||
BlockedCreatureCount blockedCreatureCount = new BlockedCreatureCount("each creature blocking it beyond the first", true);
|
this.addAbility(new BecomesBlockedSourceTriggeredAbility(new BoostSourceEffect(
|
||||||
DynamicValue value = new MultipliedValue(blockedCreatureCount, -1);
|
xValue, xValue, Duration.EndOfTurn, true
|
||||||
Effect effect = new BoostSourceEffect(value, value, Duration.EndOfTurn, true);
|
).setText("it gets -1/-1 until end of turn for each creature blocking it beyond the first"), false));
|
||||||
effect.setText("it gets -1/-1 until end of turn for each creature blocking it beyond the first");
|
|
||||||
this.addAbility(new BecomesBlockedSourceTriggeredAbility(effect, false));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public JungleWurm(final JungleWurm card) {
|
private JungleWurm(final JungleWurm card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,12 @@ import mage.game.Game;
|
||||||
import mage.game.combat.CombatGroup;
|
import mage.game.combat.CombatGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Markedagain
|
* @author Markedagain
|
||||||
*/
|
*/
|
||||||
public class BlockedCreatureCount implements DynamicValue {
|
public class BlockedCreatureCount implements DynamicValue {
|
||||||
|
|
||||||
private String message;
|
private final String message;
|
||||||
boolean beyondTheFirst;
|
private final boolean beyondTheFirst;
|
||||||
|
|
||||||
public BlockedCreatureCount() {
|
public BlockedCreatureCount() {
|
||||||
this("each creature blocking it");
|
this("each creature blocking it");
|
||||||
|
|
@ -26,7 +25,7 @@ public class BlockedCreatureCount implements DynamicValue {
|
||||||
|
|
||||||
public BlockedCreatureCount(String message, boolean beyondTheFirst) {
|
public BlockedCreatureCount(String message, boolean beyondTheFirst) {
|
||||||
this.message = message;
|
this.message = message;
|
||||||
//this.beyondTheFirst = beyondTheFirst; this was never set in the original, so not setting here just in case ??
|
this.beyondTheFirst = beyondTheFirst;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockedCreatureCount(final BlockedCreatureCount dynamicValue) {
|
public BlockedCreatureCount(final BlockedCreatureCount dynamicValue) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue