- Added plane: Velis Vel

- Converted Coat of Arms to script
- Fixed chaos trigger on The Hippodrome
This commit is contained in:
moomarc
2013-02-04 10:08:28 +00:00
parent dc4b8c8e5b
commit 94e8197d4b
8 changed files with 71 additions and 47 deletions

1
.gitattributes vendored
View File

@@ -11308,6 +11308,7 @@ res/cardsfolder/v/veinfire_borderpost.txt svneol=native#text/plain
res/cardsfolder/v/vela_the_night_clad.txt -text
res/cardsfolder/v/veldrane_of_sengir.txt svneol=native#text/plain
res/cardsfolder/v/veldt.txt svneol=native#text/plain
res/cardsfolder/v/velis_vel.txt -text
res/cardsfolder/v/venarian_glimmer.txt -text
res/cardsfolder/v/venarian_gold.txt svneol=native#text/plain
res/cardsfolder/v/vendetta.txt svneol=native#text/plain

View File

@@ -1,7 +1,9 @@
Name:Coat of Arms
ManaCost:5
Types:Artifact
Text:Each creature gets +1/+1 for each other creature on the battlefield that shares at least one creature type with it. (For example, if two Goblin Warriors and a Goblin Shaman are on the battlefield, each gets +2/+2.)
Text:no text
S:Mode$ Continuous | Affected$ Creature | AddPower$ AffectedX | AddToughness$ AffectedX | EffectZone$ Battlefield | Description$ Each creature gets +1/+1 for each other creature on the battlefield that shares at least one creature type with it. (For example, if two Goblin Warriors and a Goblin Shaman are on the battlefield, each gets +2/+2.)
SVar:AffectedX:Count$Valid Creature.sharesCreatureTypeWith+Other
SVar:PlayMain1:TRUE
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/coat_of_arms.jpg

View File

@@ -4,7 +4,7 @@ Types:Plane Segovia
Text:no text
S:Mode$ Continuous | EffectZone$ Command | Affected$ Creature | AddPower$ -5 | Description$ All Creatures get -5/-0.
T:Mode$ PlanarDice | Result$ Chaos | OptionalDecider$ You | TriggerZones$ Command | Execute$ RolledChaos | TriggerDescription$ Whenever you roll Chaos, you may destroy target creature if it's power is 0 or less.
SVar:RolledChaos:AB$ Destroy | Cost$ 0 | ValidCards$ Creature | ConditionCheckSVar$ TgtPow | ConditionCompareSVar$ LE0
SVar:RolledChaos:AB$ Destroy | Cost$ 0 | ValidTgts$ Creature | ConditionCheckSVar$ TgtPow | ConditionCompareSVar$ LE0 | AITgts$ Creature.OpponentCtrl+powerLE0
SVar:TgtPow:Targeted$CardPower
T:Mode$ PlanarDice | Result$ Planeswalk | TriggerZones$ Command | Execute$ RolledWalk | Secondary$ True | TriggerDescription$ Whenever you roll Planeswalk, put this card on the bottom of its owner's planar deck face down, then move the top card of your planar deck off that planar deck and turn it face up.
SVar:RolledWalk:AB$ Planeswalk | Cost$ 0

View File

@@ -0,0 +1,16 @@
Name:Velis Vel
ManaCost:no cost
Types:Plane Lorwyn
Text:no text
S:Mode$ Continuous | Affected$ Creature | AddPower$ AffectedX | AddToughness$ AffectedX | EffectZone$ Command | Description$ Each creature gets +1/+1 for each other creature on the battlefield that shares at least one creature type with it. (For example, if two Elemental Shamans and an Elemental Spirit are on the battlefield, each gets +2/+2.)
SVar:AffectedX:Count$Valid Creature.sharesCreatureTypeWith+Other
T:Mode$ PlanarDice | Result$ Chaos | TriggerZones$ Command | Execute$ RolledChaos | TriggerDescription$ Whenever you roll Chaos, target creature gains all creature types until end of turn.
SVar:RolledChaos:AB$ Animate | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | Types$ AllCreatureTypes
T:Mode$ PlanarDice | Result$ Planeswalk | TriggerZones$ Command | Execute$ RolledWalk | Secondary$ True | TriggerDescription$ Whenever you roll Planeswalk, put this card on the bottom of its owner's planar deck face down, then move the top card of your planar deck off that planar deck and turn it face up
SVar:RolledWalk:AB$ Planeswalk | Cost$ 0
A:AB$ RollPlanarDice | Cost$ X | SorcerySpeed$ True | ActivationZone$ Command | SpellDescription$ Roll the planar dice.
SVar:X:Count$RolledThisTurn
SVar:Picture:http://www.wizards.com/global/images/magic/general/velis_vel.jpg
SetInfo:HOP|Common|http://magiccards.info/extras/plane/planechase/velis-vel.jpg
Oracle:Each creature gets +1/+1 for each other creature on the battlefield that shares at least one creature type with it. (For example, if two Elemental Shamans and an Elemental Spirit are on the battlefield, each gets +2/+2.)\nWhenever you roll {C}, target creature gains all creature types until end of turn.
End

View File

@@ -6747,6 +6747,10 @@ public class Card extends GameEntity implements Comparable<Card> {
if (!this.sharesTypeWith(source)) {
return false;
}
} else if (property.startsWith("sharesCreatureTypeWith")) {
if (!this.sharesCreatureTypeWith(source)) {
return false;
}
} else if (property.startsWith("withFlashback")) {
boolean fb = false;
if (this.hasStartOfUnHiddenKeyword("Flashback")) {

View File

@@ -956,39 +956,6 @@ public final class GameActionUtil {
}
}
/** Constant <code>coatOfArms</code>. */
private static Command coatOfArms = new Command() {
private static final long serialVersionUID = 583505612126735693L;
private final List<Card> gloriousAnthemList = new ArrayList<Card>();
@Override
public void execute() {
final List<Card> list = this.gloriousAnthemList;
// reset all cards in list - aka "old" cards
for (int i2 = 0; i2 < list.size(); i2++) {
list.get(i2).addSemiPermanentAttackBoost(-1);
list.get(i2).addSemiPermanentDefenseBoost(-1);
}
// add +1/+1 to cards
list.clear();
final int num = CardLists.filter(Singletons.getModel().getGame().getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals("Coat of Arms")).size();
final List<Card> creatures = CardLists.filter(Singletons.getModel().getGame().getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.CREATURES);
for (Card c : creatures) {
for (Card c2 : creatures) {
if (!c.equals(c2) && c.sharesCreatureTypeWith(c2)) {
for (int j = 0; j < num; j++) {
c.addSemiPermanentAttackBoost(1);
c.addSemiPermanentDefenseBoost(1);
this.gloriousAnthemList.add(c);
}
}
}
} // for outer
} // execute
}; // coatOfArms
private static Command alphaStatus = new Command() {
private static final long serialVersionUID = -3213793711304934358L;
@@ -1244,7 +1211,6 @@ public final class GameActionUtil {
GameActionUtil.getCommands().put("Ajani_Avatar_Token", GameActionUtil.ajaniAvatarToken);
GameActionUtil.getCommands().put("Alpha_Status", GameActionUtil.alphaStatus);
GameActionUtil.getCommands().put("Coat_of_Arms", GameActionUtil.coatOfArms);
GameActionUtil.getCommands().put("Liu_Bei", GameActionUtil.liuBei);
GameActionUtil.getCommands().put("Old_Man_of_the_Sea", GameActionUtil.oldManOfTheSea);

View File

@@ -40,6 +40,7 @@ public class StaticEffect {
private int xValue = 0;
private int yValue = 0;
private long timestamp = -1;
private HashMap<Card, Integer> xValueMap = new HashMap<Card, Integer>();
private String chosenType;
private HashMap<String, String> mapParams = new HashMap<String, String>();
@@ -821,6 +822,29 @@ public class StaticEffect {
return this.yValue;
}
/**
* Store xValue relative to a specific card.
* @param affectedCard the card affected
* @param xValue the xValue
*/
public final void addXMapValue(final Card affectedCard, final Integer xValue) {
if (this.xValueMap.containsKey(affectedCard)) {
if (!this.xValueMap.get(affectedCard).equals(xValue)) {
this.xValueMap.remove(affectedCard);
}
}
this.xValueMap.put(affectedCard, xValue);
}
/**
* Get the xValue for specific card.
* @param affectedCard the affected card
* @return an int.
*/
public int getXMapValue(Card affectedCard) {
return this.xValueMap.get(affectedCard);
}
/**
* setParams. TODO Write javadoc for this method.
*

View File

@@ -25,6 +25,8 @@ import java.util.List;
import com.esotericsoftware.minlog.Log;
import forge.card.abilityfactory.AbilityFactory;
import forge.card.cardfactory.CardFactoryUtil;
import forge.card.replacement.ReplacementEffect;
import forge.card.spellability.SpellAbility;
import forge.card.staticability.StaticAbility;
@@ -103,7 +105,9 @@ public class StaticEffects {
final HashMap<String, String> params = se.getParams();
int powerBonus = 0;
String addP = "";
int toughnessBonus = 0;
String addT = "";
int keywordMultiplier = 1;
boolean setPT = false;
String[] addKeywords = null;
@@ -115,22 +119,24 @@ public class StaticEffects {
}
if (params.containsKey("AddPower")) {
if (params.get("AddPower").equals("X")) {
powerBonus = se.getXValue();
} else if (params.get("AddPower").equals("Y")) {
powerBonus = se.getYValue();
addP = params.get("AddPower");
if (addP.matches("[0-9][0-9]?")) {
powerBonus = Integer.valueOf(addP);
} else if (addP.equals("AffectedX")) {
// gets calculated at runtime
} else {
powerBonus = Integer.valueOf(params.get("AddPower"));
powerBonus = se.getXValue();
}
}
if (params.containsKey("AddToughness")) {
if (params.get("AddToughness").equals("X")) {
toughnessBonus = se.getXValue();
} else if (params.get("AddToughness").equals("Y")) {
toughnessBonus = se.getYValue();
addT = params.get("AddToughness");
if (addT.matches("[0-9][0-9]?")) {
toughnessBonus = Integer.valueOf(addT);
} else if (addT.equals("AffectedX")) {
// gets calculated at runtime
} else {
toughnessBonus = Integer.valueOf(params.get("AddToughness"));
toughnessBonus = se.getXValue();
}
}
@@ -186,6 +192,12 @@ public class StaticEffects {
}
// remove P/T bonus
if (addP.startsWith("AffectedX")) {
powerBonus = se.getXMapValue(affectedCard);
}
if (addT.startsWith("AffectedX")) {
toughnessBonus = se.getXMapValue(affectedCard);
}
affectedCard.addSemiPermanentAttackBoost(powerBonus * -1);
affectedCard.addSemiPermanentDefenseBoost(toughnessBonus * -1);
@@ -278,7 +290,6 @@ public class StaticEffects {
StaticEffects.cardToEffectsList.put("Avatar", new String[] { "Ajani_Avatar_Token" });
StaticEffects.cardToEffectsList.put("Alpha Status", new String[] { "Alpha_Status" });
StaticEffects.cardToEffectsList.put("Coat of Arms", new String[] { "Coat_of_Arms" });
StaticEffects.cardToEffectsList.put("Liu Bei, Lord of Shu", new String[] { "Liu_Bei" });
StaticEffects.cardToEffectsList.put("Old Man of the Sea", new String[] { "Old_Man_of_the_Sea" });