mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Added Not of This World
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -7222,6 +7222,7 @@ res/cardsfolder/n/norwood_riders.txt svneol=native#text/plain
|
||||
res/cardsfolder/n/norwood_warrior.txt svneol=native#text/plain
|
||||
res/cardsfolder/n/nostalgic_dreams.txt -text
|
||||
res/cardsfolder/n/nosy_goblin.txt svneol=native#text/plain
|
||||
res/cardsfolder/n/not_of_this_world.txt -text
|
||||
res/cardsfolder/n/nothing_can_stop_me_now.txt -text
|
||||
res/cardsfolder/n/notorious_assassin.txt svneol=native#text/plain
|
||||
res/cardsfolder/n/notorious_throng.txt -text svneol=unset#text/plain
|
||||
|
||||
10
res/cardsfolder/n/not_of_this_world.txt
Normal file
10
res/cardsfolder/n/not_of_this_world.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Name:Not of This World
|
||||
ManaCost:7
|
||||
Types:Tribal Instant Eldrazi
|
||||
A:SP$ Counter | Cost$ X | TargetType$ Spell,Activated,Triggered | TgtPrompt$ Select target spell or ability to counter | ValidTgts$ Card | TargetValidTargeting$ Permanent.YouCtrl | SpellDescription$ Counter target spell or ability that targets a permanent you control. CARDNAME costs 7 less to cast if it targets a spell or ability that targets a creature you control with power 7 or greater.
|
||||
SVar:X:Count$Compare CheckTgt GE1.0.7
|
||||
SVar:CheckTgt:TargetedByTarget$Valid Card.powerGE7+YouCtrl
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/not_of_this_world.jpg
|
||||
SetInfo:ROE|Uncommon|http://magiccards.info/scans/en/roe/8.jpg
|
||||
Oracle:Counter target spell or ability that targets a permanent you control.\nNot of This World costs {7} less to cast if it targets a spell or ability that targets a creature you control with power 7 or greater.
|
||||
@@ -27,6 +27,7 @@ import forge.game.ai.ComputerUtilCost;
|
||||
import forge.game.player.AIPlayer;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.util.Expressions;
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for this type.
|
||||
@@ -447,6 +448,15 @@ public class AbilityUtils {
|
||||
}
|
||||
return CardFactoryUtil.playerXCount(players, calcX[1], card) * multiplier;
|
||||
}
|
||||
if (calcX[0].startsWith("TargetedByTarget")) {
|
||||
final List<Card> tgtList = new ArrayList<Card>();
|
||||
final List<SpellAbility> saList = getDefinedSpellAbilities(card, "Targeted", ability);
|
||||
|
||||
for (final SpellAbility s : saList) {
|
||||
tgtList.addAll(getDefinedCards(s.getSourceCard(), "Targeted", s));
|
||||
}
|
||||
return CardFactoryUtil.handlePaid(tgtList, calcX[1], card) * multiplier;
|
||||
}
|
||||
if (calcX[0].startsWith("TriggeredPlayer") || calcX[0].startsWith("TriggeredTarget")) {
|
||||
final SpellAbility root = ability.getRootAbility();
|
||||
Object o = root.getTriggeringObject(calcX[0].substring(9));
|
||||
@@ -1210,13 +1220,13 @@ public class AbilityUtils {
|
||||
* @return a int.
|
||||
*/
|
||||
public static int xCount(final Card c, final String s, final SpellAbility sa) {
|
||||
|
||||
|
||||
final String[] l = s.split("/");
|
||||
final String[] m = CardFactoryUtil.parseMath(l);
|
||||
|
||||
|
||||
final String[] sq;
|
||||
sq = l[0].split("\\.");
|
||||
|
||||
|
||||
if (sa != null) {
|
||||
// Count$Kicked.<numHB>.<numNotHB>
|
||||
if (sq[0].startsWith("Kicked")) {
|
||||
@@ -1226,6 +1236,18 @@ public class AbilityUtils {
|
||||
return CardFactoryUtil.doXMath(Integer.parseInt(sq[2]), m, c); // not Kicked
|
||||
}
|
||||
}
|
||||
|
||||
// Count$Compare <int comparator value>.<True>.<False>
|
||||
if (sq[0].startsWith("Compare")) {
|
||||
final String[] compString = sq[0].split(" ");
|
||||
final int lhs = calculateAmount(c, compString[1], sa);
|
||||
final int rhs = calculateAmount(c, compString[2].substring(2), sa);
|
||||
if (Expressions.compare(lhs, compString[2], rhs)) {
|
||||
return CardFactoryUtil.doXMath(Integer.parseInt(sq[1]), m, c);
|
||||
} else {
|
||||
return CardFactoryUtil.doXMath(Integer.parseInt(sq[2]), m, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
return CardFactoryUtil.xCount(c, s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user