mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Improved Slapshot's Phase shortcut to handle Ranges to help clean up Phase Restrictions
- Converted Arcum's Sleigh and Reset
This commit is contained in:
@@ -2,7 +2,7 @@ Name:Arcum's Sleigh
|
|||||||
ManaCost:1
|
ManaCost:1
|
||||||
Types:Artifact
|
Types:Artifact
|
||||||
Text:no text
|
Text:no text
|
||||||
A:AB$Pump | Cost$ 2 T | KW$ Vigilance | ValidTgts$ Creature | TgtPrompt$ Select target creature | IsPresent$ Land.Snow+YouDontCtrl | ActivatingPhases$ BeginCombat,Declare Attackers - Play Instants and Abilities,Declare Blockers - Play Instants and Abilities,Combat Damage,First Strike Damage,EndCombat | SpellDescription$ Target creature gains vigilance until end of turn. Activate this ability only during combat and only if defending player controls a snow land.
|
A:AB$Pump | Cost$ 2 T | KW$ Vigilance | ValidTgts$ Creature | TgtPrompt$ Select target creature | IsPresent$ Land.Snow+YouDontCtrl | ActivatingPhases$ BeginCombat->EndCombat | SpellDescription$ Target creature gains vigilance until end of turn. Activate this ability only during combat and only if defending player controls a snow land.
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/arcums_sleigh.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/arcums_sleigh.jpg
|
||||||
SetInfo:ICE|Uncommon|http://magiccards.info/scans/en/ia/284.jpg
|
SetInfo:ICE|Uncommon|http://magiccards.info/scans/en/ia/284.jpg
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Reset
|
|||||||
ManaCost:U U
|
ManaCost:U U
|
||||||
Types:Instant
|
Types:Instant
|
||||||
Text:no text
|
Text:no text
|
||||||
A:SP$UntapAll|Cost$U U|ValidCards$Land.YouCtrl|OpponentTurn$True|ActivatingPhases$AfterUpkeep|SpellDescription$Cast Reset only during an opponent's turn after his or her upkeep step. Untap all lands you control.
|
A:SP$UntapAll|Cost$U U|ValidCards$Land.YouCtrl|OpponentTurn$True|ActivatingPhases$Draw->|SpellDescription$Cast Reset only during an opponent's turn after his or her upkeep step. Untap all lands you control.
|
||||||
SVar:RemAIDeck:True
|
SVar:RemAIDeck:True
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/reset.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/reset.jpg
|
||||||
|
|||||||
@@ -493,25 +493,18 @@ public class AbilityFactory {
|
|||||||
|
|
||||||
if (mapParams.containsKey("ActivatingPhases")) {
|
if (mapParams.containsKey("ActivatingPhases")) {
|
||||||
String phases = mapParams.get("ActivatingPhases");
|
String phases = mapParams.get("ActivatingPhases");
|
||||||
if(phases.equals("AfterUpkeep")) {
|
|
||||||
String newPhase = "";
|
|
||||||
newPhase = newPhase + Constant.Phase.Draw +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.Main1 +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.Combat_Begin +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.Combat_Declare_Attackers +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.Combat_Declare_Attackers_InstantAbility +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.Combat_Declare_Blockers +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.Combat_Declare_Blockers_InstantAbility +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.Combat_Damage +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.Combat_FirstStrikeDamage +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.Combat_End +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.Main2 +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.End_Of_Turn +",";
|
|
||||||
newPhase = newPhase + Constant.Phase.Cleanup;
|
|
||||||
|
|
||||||
restrict.setActivatePhases(newPhase);
|
if (phases.contains("->")){
|
||||||
|
// If phases lists a Range, split and Build Activate String
|
||||||
|
// Combat_Begin->Combat_End (During Combat)
|
||||||
|
// Draw-> (After Upkeep)
|
||||||
|
// Upkeep->Combat_Begin (Before Declare Attackers)
|
||||||
|
|
||||||
|
String[] split = phases.split("->", 2);
|
||||||
|
phases = AllZone.Phase.buildActivateString(split[0], split[1]);
|
||||||
}
|
}
|
||||||
else restrict.setActivatePhases(phases);
|
|
||||||
|
restrict.setActivatePhases(phases);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mapParams.containsKey("ActivatingCardsInHand"))
|
if (mapParams.containsKey("ActivatingCardsInHand"))
|
||||||
|
|||||||
@@ -23,9 +23,11 @@ public class AllZone implements NewConstants {
|
|||||||
public static EndOfTurn EndOfTurn = new EndOfTurn();
|
public static EndOfTurn EndOfTurn = new EndOfTurn();
|
||||||
public static EndOfCombat EndOfCombat = new EndOfCombat();
|
public static EndOfCombat EndOfCombat = new EndOfCombat();
|
||||||
|
|
||||||
|
public static final Phase Phase = new Phase();
|
||||||
|
|
||||||
|
// Phase is now a prerequisite for CardFactory
|
||||||
public static final CardFactory CardFactory = new CardFactory(ForgeProps.getFile(CARDSFOLDER));
|
public static final CardFactory CardFactory = new CardFactory(ForgeProps.getFile(CARDSFOLDER));
|
||||||
|
|
||||||
public static final Phase Phase = new Phase();
|
|
||||||
public static final MagicStack Stack = new MagicStack();
|
public static final MagicStack Stack = new MagicStack();
|
||||||
public static final InputControl InputControl = new InputControl();
|
public static final InputControl InputControl = new InputControl();
|
||||||
public static final GameAction GameAction = new GameAction();
|
public static final GameAction GameAction = new GameAction();
|
||||||
|
|||||||
@@ -606,6 +606,27 @@ public class Phase extends MyObservable
|
|||||||
AllZone.Phase.getPhase().equals(Constant.Phase.Main1)) && AllZone.Stack.size() == 0;
|
AllZone.Phase.getPhase().equals(Constant.Phase.Main1)) && AllZone.Stack.size() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String buildActivateString(String startPhase, String endPhase){
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
boolean add = false;
|
||||||
|
for(int i = 0; i < phaseOrder.length; i++){
|
||||||
|
if (phaseOrder[i].equals(startPhase))
|
||||||
|
add = true;
|
||||||
|
|
||||||
|
if (add){
|
||||||
|
if (sb.length() != 0)
|
||||||
|
sb.append(",");
|
||||||
|
sb.append(phaseOrder[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (phaseOrder[i].equals(endPhase))
|
||||||
|
add = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean canPlayDuringCombat() {
|
public static boolean canPlayDuringCombat() {
|
||||||
String phase = AllZone.Phase.getPhase();
|
String phase = AllZone.Phase.getPhase();
|
||||||
ArrayList<String> validPhases = new ArrayList<String>();
|
ArrayList<String> validPhases = new ArrayList<String>();
|
||||||
@@ -621,12 +642,6 @@ public class Phase extends MyObservable
|
|||||||
return validPhases.contains(phase);
|
return validPhases.contains(phase);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean canPlayAfterUpkeep() {
|
|
||||||
String phase = AllZone.Phase.getPhase();
|
|
||||||
|
|
||||||
return !phase.equals(Constant.Phase.Upkeep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
Phase phase = new Phase();
|
Phase phase = new Phase();
|
||||||
for(int i = 0; i < phase.phaseOrder.length; i++) {
|
for(int i = 0; i < phase.phaseOrder.length; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user