- Added Giant Slug and Illusionary Presence

This commit is contained in:
swordshine
2013-04-07 00:21:27 +00:00
parent 726e350baa
commit f22b20e512
6 changed files with 59 additions and 5 deletions

2
.gitattributes vendored
View File

@@ -4144,6 +4144,7 @@ res/cardsfolder/g/giant_mantis.txt svneol=native#text/plain
res/cardsfolder/g/giant_octopus.txt svneol=native#text/plain
res/cardsfolder/g/giant_scorpion.txt svneol=native#text/plain
res/cardsfolder/g/giant_shark.txt svneol=native#text/plain
res/cardsfolder/g/giant_slug.txt -text
res/cardsfolder/g/giant_solifuge.txt svneol=native#text/plain
res/cardsfolder/g/giant_spider.txt svneol=native#text/plain
res/cardsfolder/g/giant_strength.txt svneol=native#text/plain
@@ -5154,6 +5155,7 @@ res/cardsfolder/i/illuminated_wings.txt svneol=native#text/plain
res/cardsfolder/i/illumination.txt svneol=native#text/plain
res/cardsfolder/i/illusion_reality.txt -text
res/cardsfolder/i/illusionary_forces.txt svneol=native#text/plain
res/cardsfolder/i/illusionary_presence.txt -text
res/cardsfolder/i/illusionary_servant.txt svneol=native#text/plain
res/cardsfolder/i/illusionary_wall.txt svneol=native#text/plain
res/cardsfolder/i/illusionists_bracers.txt -text

View File

@@ -0,0 +1,13 @@
Name:Giant Slug
ManaCost:1 B
Types:Creature Slug
PT:1/1
A:AB$ Effect | Cost$ 5 | Duration$ Permanent | Triggers$ ChooseBasicTrig | AILogic$ Always | SVars$ ChooseB,ExileEffect,DBPump | RememberObjects$ Self | SpellDescription$ At the beginning of your next upkeep, choose a basic land type. CARDNAME gains landwalk of the chosen type until the end of that turn.
SVar:ChooseBasicTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Command | Execute$ ChooseB | TriggerDescription$ At the beginning of your next upkeep, choose a basic land type. Giant Slug gains landwalk of the chosen type until the end of that turn.
SVar:ChooseB:AB$ ChooseType | Cost$ 0 | Defined$ You | Type$ Basic Land | AILogic$ ChosenLandwalk | SubAbility$ DBPump
SVar:DBPump:DB$ Pump | Defined$ Remembered | KW$ ChosenTypewalk | DefinedChosenKW$ Type | SubAbility$ ExileEffect
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
SVar:Picture:http://www.wizards.com/global/images/magic/general/giant_slug.jpg
Oracle:{5}: At the beginning of your next upkeep, choose a basic land type. Giant Slug gains landwalk of the chosen type until the end of that turn.
SetInfo:CHR Common
SetInfo:LEG Common

View File

@@ -0,0 +1,11 @@
Name:Illusionary Presence
ManaCost:1 U U
Types:Creature Illusion
PT:2/2
K:Cumulative upkeep:U
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigCL | TriggerDescription$ At the beginning of your upkeep, choose a land type. CARDNAME gains landwalk of the chosen type until end of turn.
SVar:TrigCL:AB$ ChooseType | Cost$ 0 | Defined$ You | Type$ Land | AILogic$ ChosenLandwalk | SubAbility$ DBPump
SVar:DBPump:DB$ Pump | KW$ ChosenTypewalk | DefinedChosenKW$ Type
SVar:Picture:http://www.wizards.com/global/images/magic/general/illusionary_presence.jpg
Oracle:Cumulative upkeep {U} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.)\nAt the beginning of your upkeep, choose a land type. Illusionary Presence gains landwalk of the chosen type until end of turn.
SetInfo:ICE Rare

View File

@@ -162,6 +162,17 @@ public class ChooseTypeEffect extends SpellAbilityEffect {
}
}
}
} else if (logic.equals("ChosenLandwalk")) {
final List<Card> lands = p.getOpponent().getLandsInPlay();
for (Card c : lands) {
for (String t : c.getType()) {
if (!invalidTypes.contains(t)
&& CardType.isABasicLandType(t)) {
chosen = t;
break;
}
}
}
}
}
@@ -192,15 +203,17 @@ public class ChooseTypeEffect extends SpellAbilityEffect {
final String logic = sa.getParam("AILogic");
if (logic.equals("ChosenLandwalk")) {
final List<Card> lands = p.getOpponent().getLandsInPlay();
final List<String> totallands = CardType.getLandTypes();
for (Card c : lands) {
if (!invalidTypes.contains(c.getName())) {
choice = c.getName();
for (String t : c.getType()) {
if (!invalidTypes.contains(t)
&& CardType.isALandType(t)) {
choice = t;
break;
}
}
}
}
}
card.setChosenType(choice != null ? choice :"Island");
valid = true;
}

View File

@@ -195,7 +195,14 @@ public class PumpEffect extends SpellAbilityEffect {
tgtCards = AbilityUtils.getDefinedCards(sa.getSourceCard(), sa.getParam("Defined"), sa);
}
}
if (sa.hasParam("DefinedChosenKW")) {
if (sa.getParam("DefinedChosenKW").equals("Type")) {
final String t = sa.getSourceCard().getChosenType();
for (int i = 0; i < keywords.size(); i++) {
keywords.set(i, keywords.get(i).replaceAll("ChosenType", t));
}
}
}
if (sa.hasParam("RandomKeyword")) {
final String num = sa.hasParam("RandomKWNum") ? sa.getParam("RandomKWNum") : "1";
final int numkw = AbilityUtils.calculateAmount(sa.getSourceCard(), num, sa);

View File

@@ -35,6 +35,7 @@ import forge.Command;
import forge.Constant;
import forge.GameEntity;
import forge.Singletons;
import forge.card.CardType;
import forge.card.ability.ApiType;
import forge.card.cardfactory.CardFactoryUtil;
import forge.card.cost.Cost;
@@ -269,6 +270,13 @@ public class CombatUtil {
walkTypes.add("Land.nonBasic");
} else if (keyword.equals("Snow landwalk")) {
walkTypes.add("Land.Snow");
} else if (keyword.endsWith("walk")) {
final String landtype = keyword.replace("walk", "");
if (CardType.isALandType(landtype)) {
if (!walkTypes.contains(landtype)) {
walkTypes.add(landtype);
}
}
}
}