mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
add Reset (from Legends)
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -3094,6 +3094,7 @@ res/cardsfolder/repentant_blacksmith.txt -text svneol=native#text/plain
|
|||||||
res/cardsfolder/reprisal.txt -text svneol=native#text/plain
|
res/cardsfolder/reprisal.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/repulse.txt -text svneol=native#text/plain
|
res/cardsfolder/repulse.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/rescind.txt -text svneol=native#text/plain
|
res/cardsfolder/rescind.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/reset.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/respite.txt -text svneol=native#text/plain
|
res/cardsfolder/respite.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/restless_apparition.txt -text svneol=native#text/plain
|
res/cardsfolder/restless_apparition.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/restless_bones.txt -text svneol=native#text/plain
|
res/cardsfolder/restless_bones.txt -text svneol=native#text/plain
|
||||||
|
|||||||
8
res/cardsfolder/reset.txt
Normal file
8
res/cardsfolder/reset.txt
Normal file
@@ -0,0 +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.
|
||||||
|
SVar:RemAIDeck:True
|
||||||
|
SVar:Rarity:Uncommon
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/reset.jpg
|
||||||
|
End
|
||||||
@@ -5088,6 +5088,37 @@ public class CardFactory_Instants {
|
|||||||
card.addSpellAbility(spell);
|
card.addSpellAbility(spell);
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
//*************** START *********** START **************************
|
||||||
|
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() {
|
||||||
|
String opponent = AllZone.GameAction.getOpponent(card.getController());
|
||||||
|
return Phase.canPlayAfterUpkeep() && AllZone.GameAction.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
|
||||||
|
spell.setStackDescription(card.getName() + " - untap all lands you control.");
|
||||||
|
card.clearSpellAbility();
|
||||||
|
card.addSpellAbility(spell);
|
||||||
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
// -1 means keyword "Cycling" not found
|
// -1 means keyword "Cycling" not found
|
||||||
if(hasKeyword(card, "Cycling") != -1) {
|
if(hasKeyword(card, "Cycling") != -1) {
|
||||||
|
|||||||
@@ -452,4 +452,27 @@ public class Phase extends MyObservable
|
|||||||
|
|
||||||
return validPhases.contains(phase);
|
return validPhases.contains(phase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean canPlayAfterUpkeep() {
|
||||||
|
String phase = AllZone.Phase.getPhase();
|
||||||
|
ArrayList<String> validPhases = new ArrayList<String>();
|
||||||
|
|
||||||
|
validPhases.add(Constant.Phase.Draw);
|
||||||
|
validPhases.add(Constant.Phase.Main1);
|
||||||
|
validPhases.add(Constant.Phase.Combat_Before_Declare_Attackers_InstantAbility);
|
||||||
|
validPhases.add(Constant.Phase.Combat_Declare_Attackers);
|
||||||
|
validPhases.add(Constant.Phase.Combat_Declare_Attackers_InstantAbility);
|
||||||
|
validPhases.add(Constant.Phase.Combat_Declare_Blockers);
|
||||||
|
validPhases.add(Constant.Phase.Combat_Declare_Blockers_InstantAbility);
|
||||||
|
validPhases.add(Constant.Phase.Combat_After_Declare_Blockers);
|
||||||
|
validPhases.add(Constant.Phase.Combat_FirstStrikeDamage);
|
||||||
|
validPhases.add(Constant.Phase.Combat_Damage);
|
||||||
|
validPhases.add(Constant.Phase.Main2);
|
||||||
|
validPhases.add(Constant.Phase.At_End_Of_Turn);
|
||||||
|
validPhases.add(Constant.Phase.End_Of_Turn);
|
||||||
|
validPhases.add(Constant.Phase.Until_End_Of_Turn);
|
||||||
|
validPhases.add(Constant.Phase.Cleanup);
|
||||||
|
|
||||||
|
return validPhases.contains(phase);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user