mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Added Archangel of Strife
- Added to AbilityFactoryEffect: EffectOwner, Duration$UntilHostLeavesPlay, and RememberEffect. - Added exception to Card.java so that Effect cards can be counted when remembered
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -397,6 +397,7 @@ res/cardsfolder/a/arcbound_wanderer.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/a/arcbound_worker.txt svneol=native#text/plain
|
res/cardsfolder/a/arcbound_worker.txt svneol=native#text/plain
|
||||||
res/cardsfolder/a/archaeological_dig.txt svneol=native#text/plain
|
res/cardsfolder/a/archaeological_dig.txt svneol=native#text/plain
|
||||||
res/cardsfolder/a/archangel.txt svneol=native#text/plain
|
res/cardsfolder/a/archangel.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/a/archangel_of_strife.txt -text
|
||||||
res/cardsfolder/a/archangels_light.txt -text
|
res/cardsfolder/a/archangels_light.txt -text
|
||||||
res/cardsfolder/a/archdemon_of_unx.txt svneol=native#text/plain
|
res/cardsfolder/a/archdemon_of_unx.txt svneol=native#text/plain
|
||||||
res/cardsfolder/a/architects_of_will.txt svneol=native#text/plain
|
res/cardsfolder/a/architects_of_will.txt svneol=native#text/plain
|
||||||
|
|||||||
29
res/cardsfolder/a/archangel_of_strife.txt
Normal file
29
res/cardsfolder/a/archangel_of_strife.txt
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
Name:Archangel of Strife
|
||||||
|
ManaCost:5 W W
|
||||||
|
Types:Creature Angel
|
||||||
|
Text:no text
|
||||||
|
PT:6/6
|
||||||
|
K:Flying
|
||||||
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ Tolstoy | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, each player chooses war or peace. Creatures controlled by players who chose war get +3/+0. Creatures controlled by players who chose peace get +0/+3.
|
||||||
|
SVar:Tolstoy:AB$ GenericChoice | Cost$ 0 | Defined$ You | Choices$ WarChoice,PeaceChoice | SubAbility$ OppChoice
|
||||||
|
SVar:OppChoice:DB$ GenericChoice | Cost$ 0 | Defined$ Opponent | Choices$ Attacking,Defensive
|
||||||
|
SVar:WarChoice:DB$ Effect | Name$ Archangel War Effect | ChoiceDescription$ War | Duration$ UntilHostLeavesPlay | RememberEffect$ True
|
||||||
|
SVar:PeaceChoice:DB$ Effect | Name$ Archangel Peace Effect | ChoiceDescription$ Peace | Duration$ UntilHostLeavesPlay | RememberEffect$ True
|
||||||
|
SVar:Attacking:DB$ Effect | Name$ Archangel War Effect | ChoiceDescription$ War | EffectOwner$ Opponent | Duration$ UntilHostLeavesPlay | RememberEffect$ True
|
||||||
|
SVar:Defensive:DB$ Effect | Name$ Archangel Peace Effect | ChoiceDescription$ Peace | EffectOwner$ Opponent | Duration$ UntilHostLeavesPlay | RememberEffect$ True
|
||||||
|
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddPower$ 3 | CheckSVar$ WarYou | SVarCompare$ GE1
|
||||||
|
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddToughness$ 3 | CheckSVar$ PeaceYou | SVarCompare$ GE1
|
||||||
|
S:Mode$ Continuous | Affected$ Creature.YouDontCtrl | AddPower$ 3 | CheckSVar$ WarOpp | SVarCompare$ GE1
|
||||||
|
S:Mode$ Continuous | Affected$ Creature.YouDontCtrl | AddToughness$ 3 | CheckSVar$ PeaceOpp | SVarCompare$ GE1
|
||||||
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Defined$ Self | Execute$ DBCleanup | Static$ True
|
||||||
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
SVar:WarYou:Remembered$Valid Card.namedArchangel War Effect+YouCtrl
|
||||||
|
SVar:PeaceYou:Remembered$Valid Card.namedArchangel Peace Effect+YouCtrl
|
||||||
|
SVar:WarOpp:Remembered$Valid Card.namedArchangel War Effect+YouDontCtrl
|
||||||
|
SVar:PeaceOpp:Remembered$Valid Card.namedArchangel Peace Effect+YouDontCtrl
|
||||||
|
SVar:RemAIDeck:True
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/archangel_of_strife.jpg
|
||||||
|
SetInfo:COM|Rare|http://magiccards.info/scans/en/cmd/7.jpg
|
||||||
|
Oracle:Flying\nAs Archangel of Strife enters the battlefield, each player chooses war or peace.\nCreatures controlled by players who chose war get +3/+0.\nCreatures controlled by players who chose peace get +0/+3.
|
||||||
|
End
|
||||||
@@ -6321,7 +6321,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
@Override
|
@Override
|
||||||
public final boolean isValid(final String restriction, final Player sourceController, final Card source) {
|
public final boolean isValid(final String restriction, final Player sourceController, final Card source) {
|
||||||
|
|
||||||
if (this.isImmutable()) {
|
if (this.isImmutable()
|
||||||
|
&& !source.getRemembered().contains(this)) { // special case exclusion
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
package forge.card.abilityfactory;
|
package forge.card.abilityfactory;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@@ -376,6 +377,7 @@ public class AbilityFactoryEffect {
|
|||||||
String[] effectReplacementEffects = null;
|
String[] effectReplacementEffects = null;
|
||||||
String effectRemembered = null;
|
String effectRemembered = null;
|
||||||
String effectImprinted = null;
|
String effectImprinted = null;
|
||||||
|
Player ownerEff = null;
|
||||||
|
|
||||||
if (params.containsKey("Abilities")) {
|
if (params.containsKey("Abilities")) {
|
||||||
effectAbilities = params.get("Abilities").split(",");
|
effectAbilities = params.get("Abilities").split(",");
|
||||||
@@ -420,7 +422,13 @@ public class AbilityFactoryEffect {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Player controller = sa.getActivatingPlayer();
|
if (params.containsKey("EffectOwner")) {
|
||||||
|
ArrayList<Player> effectOwner;
|
||||||
|
effectOwner = AbilityFactory.getDefinedPlayers(sa.getSourceCard(), params.get("EffectOwner"), sa);
|
||||||
|
ownerEff = effectOwner.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
final Player controller = params.containsKey("EffectOwner") ? ownerEff : sa.getActivatingPlayer();
|
||||||
final Card eff = new Card();
|
final Card eff = new Card();
|
||||||
eff.setName(name);
|
eff.setName(name);
|
||||||
eff.addType("Effect"); // Or Emblem
|
eff.addType("Effect"); // Or Emblem
|
||||||
@@ -513,6 +521,11 @@ public class AbilityFactoryEffect {
|
|||||||
eff.setChosenColor(card.getChosenColor());
|
eff.setChosenColor(card.getChosenColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remember created effect
|
||||||
|
if (params.containsKey("RememberEffect")) {
|
||||||
|
AllZoneUtil.getCardState(card).addRemembered(eff);
|
||||||
|
}
|
||||||
|
|
||||||
// Duration
|
// Duration
|
||||||
final String duration = params.get("Duration");
|
final String duration = params.get("Duration");
|
||||||
if ((duration == null) || !duration.equals("Permanent")) {
|
if ((duration == null) || !duration.equals("Permanent")) {
|
||||||
@@ -528,6 +541,10 @@ public class AbilityFactoryEffect {
|
|||||||
if ((duration == null) || duration.equals("EndOfTurn")) {
|
if ((duration == null) || duration.equals("EndOfTurn")) {
|
||||||
AllZone.getEndOfTurn().addUntil(endEffect);
|
AllZone.getEndOfTurn().addUntil(endEffect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (duration.equals("UntilHostLeavesPlay")) {
|
||||||
|
card.addLeavesPlayCommand(endEffect);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Add targeting to the effect so it knows who it's dealing with
|
// TODO: Add targeting to the effect so it knows who it's dealing with
|
||||||
|
|||||||
Reference in New Issue
Block a user