Added Mogg Jailer to cards.txt and I added it's LQ pic url to card-pictures.txt. I missed this one while I was adding Goblin Mutant and Orgg. I had to modify the keyword to test for "greater" or "less".

This commit is contained in:
jendave
2011-08-06 03:55:27 +00:00
parent 2cce4554ef
commit 64e47b6d9b
3 changed files with 22 additions and 13 deletions

View File

@@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene
snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg
snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
mogg_jailer.jpg http://www.wizards.com/global/images/magic/general/mogg_jailer.jpg
goblin_mutant.jpg http://www.wizards.com/global/images/magic/general/goblin_mutant.jpg
orgg.jpg http://www.wizards.com/global/images/magic/general/orgg.jpg
brassclaw_orcs.jpg http://www.wizards.com/global/images/magic/general/brassclaw_orcs.jpg

View File

@@ -1,3 +1,10 @@
Mogg Jailer
1 R
Creature Goblin
no text
2/2
CARDNAME can't attack if defending player controls an untapped creature with power 2 or less.
Goblin Mutant
2 R R
Creature Goblin Mutant

View File

@@ -194,35 +194,36 @@ public class CombatUtil {
ArrayList<String> attackerKeywords = c.getKeyword();
for (int i = 0; i < attackerKeywords.size(); i++) {
if (attackerKeywords.get(i).toString().startsWith("CARDNAME can't attack if defending player controls an untapped creature with power")) {
if (attackerKeywords.get(i).toString().startsWith("CARDNAME can't attack if defending player controls an untapped creature with power")) {
hasKeyword = true;
keywordPosition = i;
}
}
if (hasKeyword) { // The keyword "CARDNAME can't attack if defending player controls an untapped creature with power" ... is present
String tmpString = c.getKeyword().get(keywordPosition).toString();
String asSeparateWords[] = tmpString.trim().split(" ");
String tmpString = c.getKeyword().get(keywordPosition).toString();
final String asSeparateWords[] = tmpString.trim().split(" ");
if (asSeparateWords.length >= 13) {
if (asSeparateWords[12].matches("[0-9][0-9]?")) {
powerLimit[0] = Integer.parseInt((asSeparateWords[12]).trim());
if (asSeparateWords.length >= 15) {
if (asSeparateWords[12].matches("[0-9][0-9]?")) {
powerLimit[0] = Integer.parseInt((asSeparateWords[12]).trim());
CardList list = null;
if(c.getController().equals(Constant.Player.Human)) {
CardList list = null;
if (c.getController().equals(Constant.Player.Human)) {
list = new CardList(AllZone.Computer_Play.getCards());
} else {
list = new CardList(AllZone.Human_Play.getCards());
}
list = list.getType("Creature");
list = list.getType("Creature");
list = list.filter(new CardListFilter() {
public boolean addCard(Card ct) {
return (ct.isUntapped() && ct.getNetAttack() >= powerLimit[0]);
return ((ct.isUntapped() && ct.getNetAttack() >= powerLimit[0] && asSeparateWords[14].contains("greater")) ||
(ct.isUntapped() && ct.getNetAttack() <= powerLimit[0] && asSeparateWords[14].contains("less")));
}
});
if (!list.isEmpty()) return false;
}
}
}
} // hasKeyword = CARDNAME can't attack if defending player controls an untapped creature with power ...