mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added a first draft of the use of getValidCard in xCount.
- Added Dogpile
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1061,6 +1061,7 @@ res/cardsfolder/djinn_of_the_lamp.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/do_or_die.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/dodecapod.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/dogged_hunter.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/dogpile.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/donate.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/doom_blade.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/doomed_necromancer.txt -text svneol=native#text/plain
|
||||
|
||||
10
res/cardsfolder/dogpile.txt
Normal file
10
res/cardsfolder/dogpile.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Name:Dogpile
|
||||
ManaCost:3 R
|
||||
Types:Instant
|
||||
Text:no text
|
||||
K:spDamageTgtCP:X:Dogpile deals damage to target creature or player equal to the number of attacking creatures you control.
|
||||
SVar:X:Count$Valid Creature.attacking+YouCtrl
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/dogpile.jpg
|
||||
End
|
||||
@@ -3571,6 +3571,21 @@ public class CardFactoryUtil {
|
||||
l = s.split("/"); // separate the specification from any math
|
||||
final String m[] = {"none"};
|
||||
if(l.length > 1) m[0] = l[1];
|
||||
|
||||
// count valid cards on the battlefield
|
||||
if(l[0].contains("Valid")) {
|
||||
final String restrictions = l[0].replace("Valid ", "");
|
||||
final String rest[] = restrictions.split(",");
|
||||
CardList cardsonbattlefield = new CardList();
|
||||
cardsonbattlefield.addAll(myField.getCards());
|
||||
cardsonbattlefield.addAll(opField.getCards());
|
||||
cardsonbattlefield = cardsonbattlefield.getValidCards(rest, c.getController());
|
||||
|
||||
n = cardsonbattlefield.size();
|
||||
|
||||
return doXMath(n, m);
|
||||
}
|
||||
|
||||
final String[] sq;
|
||||
sq = l[0].split("\\.");
|
||||
|
||||
@@ -3722,6 +3737,7 @@ public class CardFactoryUtil {
|
||||
|
||||
// filter lists based on the specified quality
|
||||
|
||||
|
||||
// "Clerics you control" - Count$TypeYouCtrl.Cleric
|
||||
if(sq[0].contains("Type")) {
|
||||
someCards = someCards.filter(new CardListFilter() {
|
||||
|
||||
Reference in New Issue
Block a user