mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Added Halfdane
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -6379,6 +6379,7 @@ forge-gui/res/cardsfolder/h/hakim_loreweaver.txt -text
|
||||
forge-gui/res/cardsfolder/h/halam_djinn.txt -text
|
||||
forge-gui/res/cardsfolder/h/halberdier.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/h/halcyon_glaze.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/h/halfdane.txt -text
|
||||
forge-gui/res/cardsfolder/h/halimar_depths.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/h/halimar_excavator.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/h/halimar_wavewatch.txt svneol=native#text/plain
|
||||
|
||||
@@ -7,6 +7,7 @@ import forge.game.ability.AbilityUtils;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardUtil;
|
||||
import forge.game.event.GameEventCardStatsChanged;
|
||||
import forge.game.phase.PhaseType;
|
||||
import forge.game.replacement.ReplacementEffect;
|
||||
import forge.game.replacement.ReplacementHandler;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
@@ -290,6 +291,12 @@ public class AnimateEffect extends AnimateEffectBase {
|
||||
source.addLeavesPlayCommand(unanimate);
|
||||
} else if (sa.hasParam("UntilYourNextUpkeep")) {
|
||||
game.getUpkeep().addUntil(source.getController(), unanimate);
|
||||
} else if (sa.hasParam("UntilTheEndOfYourNextUpkeep")) {
|
||||
if (game.getPhaseHandler().is(PhaseType.UPKEEP)) {
|
||||
game.getUpkeep().registerUntilEnd(source.getController(), unanimate);
|
||||
} else {
|
||||
game.getUpkeep().addUntilEnd(source.getController(), unanimate);
|
||||
}
|
||||
} else if (sa.hasParam("UntilControllerNextUntap")) {
|
||||
game.getUntap().addUntil(c.getController(), unanimate);
|
||||
} else if (sa.hasParam("UntilYourNextTurn")) {
|
||||
|
||||
@@ -93,7 +93,8 @@ public class Phase implements java.io.Serializable {
|
||||
|
||||
/** The until map. */
|
||||
private final HashMap<Player, List<GameCommand>> untilMap = new HashMap<Player, List<GameCommand>>();
|
||||
|
||||
private final HashMap<Player, List<GameCommand>> untilEndMap = new HashMap<Player, List<GameCommand>>();
|
||||
private final HashMap<Player, List<GameCommand>> registerMap = new HashMap<Player, List<GameCommand>>();
|
||||
/**
|
||||
* <p>
|
||||
* Add a Command that will terminate an effect with "until <Player's> next <phase>".
|
||||
@@ -121,6 +122,35 @@ public class Phase implements java.io.Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public final void registerUntilEnd(Player p, final GameCommand c) {
|
||||
if (this.registerMap.containsKey(p)) {
|
||||
this.registerMap.get(p).add(0, c);
|
||||
} else {
|
||||
this.registerMap.put(p, Lists.newArrayList(c));
|
||||
}
|
||||
}
|
||||
|
||||
public final void addUntilEnd(Player p, final GameCommand c) {
|
||||
if (this.untilEndMap.containsKey(p)) {
|
||||
this.untilEndMap.get(p).add(0, c);
|
||||
} else {
|
||||
this.untilEndMap.put(p, Lists.newArrayList(c));
|
||||
}
|
||||
}
|
||||
|
||||
public final void RegisterUntilEndCommand(final Player p) {
|
||||
if (this.registerMap.containsKey(p)) {
|
||||
this.untilEndMap.put(p, registerMap.get(p));
|
||||
registerMap.remove(p);
|
||||
}
|
||||
}
|
||||
|
||||
public final void executeUntilEndOfPhase(final Player p) {
|
||||
if (this.untilEndMap.containsKey(p)) {
|
||||
this.execute(this.untilEndMap.get(p));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* execute.
|
||||
|
||||
@@ -424,6 +424,8 @@ public class PhaseHandler implements java.io.Serializable {
|
||||
c.getDamageHistory().setNotBlockedSinceLastUpkeepOf(this.getPlayerTurn());
|
||||
c.getDamageHistory().setNotBeenBlockedSinceLastUpkeepOf(this.getPlayerTurn());
|
||||
}
|
||||
game.getUpkeep().executeUntilEndOfPhase(this.getPlayerTurn());
|
||||
game.getUpkeep().RegisterUntilEndCommand(this.getPlayerTurn());
|
||||
break;
|
||||
|
||||
case COMBAT_END:
|
||||
|
||||
11
forge-gui/res/cardsfolder/h/halfdane.txt
Normal file
11
forge-gui/res/cardsfolder/h/halfdane.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Halfdane
|
||||
ManaCost:1 W U B
|
||||
Types:Legendary Creature Shapeshifter
|
||||
PT:3/3
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigAnimate | TriggerDescription$ At the beginning of your upkeep, CARDNAME's power and toughness become equal to the power and toughness of target creature other than CARDNAME until the end of your next upkeep.
|
||||
SVar:TrigAnimate:AB$ Pump | Cost$ 0 | ValidTgts$ Creature.Other | TgtPrompt$ Select target another creature | AILogic$ HighestPower | SubAbility$ DBAnimate
|
||||
SVar:DBAnimate:DB$ Animate | Defined$ Self | Power$ X | Toughness$ Y | References$ X,Y | UntilTheEndOfYourNextUpkeep$ True
|
||||
SVar:X:Targeted$CardPower
|
||||
SVar:Y:Targeted$CardToughness
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/halfdane.jpg
|
||||
Oracle:At the beginning of your upkeep, Halfdane's power and toughness become equal to the power and toughness of target creature other than Halfdane until the end of your next upkeep.
|
||||
Reference in New Issue
Block a user