mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
-add a shortcut of AfterUpkeep to ActivatingPhases
-convert Reset to AF_UntapAll
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
Name:Reset
|
||||
ManaCost:U U
|
||||
Types:Instant
|
||||
Text:Cast Reset only during an opponent's turn after his or her upkeep step.\r\nUntap all lands you control.
|
||||
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.
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/reset.jpg
|
||||
|
||||
@@ -491,8 +491,28 @@ public class AbilityFactory {
|
||||
if (mapParams.containsKey("ActivationNumberSacrifice"))
|
||||
restrict.setActivationNumberSacrifice(Integer.parseInt(mapParams.get("ActivationNumberSacrifice")));
|
||||
|
||||
if (mapParams.containsKey("ActivatingPhases"))
|
||||
restrict.setActivatePhases(mapParams.get("ActivatingPhases"));
|
||||
if (mapParams.containsKey("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);
|
||||
}
|
||||
else restrict.setActivatePhases(phases);
|
||||
}
|
||||
|
||||
if (mapParams.containsKey("ActivatingCardsInHand"))
|
||||
restrict.setActivateCardsInHand(Integer.parseInt(mapParams.get("ActivatingCardsInHand")));
|
||||
|
||||
@@ -4104,42 +4104,6 @@ public class CardFactory_Instants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if( cardName.equals("Reset") ) {
|
||||
/*
|
||||
* Cast Reset only during an opponent's turn after his or her upkeep step.
|
||||
* Untap all lands you control.
|
||||
*/
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = 1399682288920959188L;
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
Player opponent = card.getController().getOpponent();
|
||||
return Phase.canPlayAfterUpkeep() && AllZone.Phase.isPlayerTurn(opponent);
|
||||
}//canPlay
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}//canPlayAI
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
CardList lands = AllZoneUtil.getPlayerLandsInPlay(card.getController());
|
||||
for(Card land:lands) land.untap();
|
||||
}
|
||||
};//SpellAbility
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(card.getName()).append(" - untap all lands you control.");
|
||||
spell.setStackDescription(sb.toString());
|
||||
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Mana Short")) {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user