mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added Giant Slug and Illusionary Presence
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -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
|
||||
|
||||
13
res/cardsfolder/g/giant_slug.txt
Normal file
13
res/cardsfolder/g/giant_slug.txt
Normal 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
|
||||
11
res/cardsfolder/i/illusionary_presence.txt
Normal file
11
res/cardsfolder/i/illusionary_presence.txt
Normal 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
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user