mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
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:
@@ -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_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_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
|
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
|
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
|
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
|
brassclaw_orcs.jpg http://www.wizards.com/global/images/magic/general/brassclaw_orcs.jpg
|
||||||
|
|||||||
@@ -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
|
Goblin Mutant
|
||||||
2 R R
|
2 R R
|
||||||
Creature Goblin Mutant
|
Creature Goblin Mutant
|
||||||
|
|||||||
@@ -194,35 +194,36 @@ public class CombatUtil {
|
|||||||
|
|
||||||
ArrayList<String> attackerKeywords = c.getKeyword();
|
ArrayList<String> attackerKeywords = c.getKeyword();
|
||||||
for (int i = 0; i < attackerKeywords.size(); i++) {
|
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;
|
hasKeyword = true;
|
||||||
keywordPosition = i;
|
keywordPosition = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasKeyword) { // The keyword "CARDNAME can't attack if defending player controls an untapped creature with power" ... is present
|
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 tmpString = c.getKeyword().get(keywordPosition).toString();
|
||||||
String asSeparateWords[] = tmpString.trim().split(" ");
|
final String asSeparateWords[] = tmpString.trim().split(" ");
|
||||||
|
|
||||||
if (asSeparateWords.length >= 13) {
|
if (asSeparateWords.length >= 15) {
|
||||||
if (asSeparateWords[12].matches("[0-9][0-9]?")) {
|
if (asSeparateWords[12].matches("[0-9][0-9]?")) {
|
||||||
powerLimit[0] = Integer.parseInt((asSeparateWords[12]).trim());
|
powerLimit[0] = Integer.parseInt((asSeparateWords[12]).trim());
|
||||||
|
|
||||||
CardList list = null;
|
CardList list = null;
|
||||||
if(c.getController().equals(Constant.Player.Human)) {
|
if (c.getController().equals(Constant.Player.Human)) {
|
||||||
list = new CardList(AllZone.Computer_Play.getCards());
|
list = new CardList(AllZone.Computer_Play.getCards());
|
||||||
} else {
|
} else {
|
||||||
list = new CardList(AllZone.Human_Play.getCards());
|
list = new CardList(AllZone.Human_Play.getCards());
|
||||||
}
|
}
|
||||||
|
|
||||||
list = list.getType("Creature");
|
list = list.getType("Creature");
|
||||||
list = list.filter(new CardListFilter() {
|
list = list.filter(new CardListFilter() {
|
||||||
public boolean addCard(Card ct) {
|
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;
|
if (!list.isEmpty()) return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // hasKeyword = CARDNAME can't attack if defending player controls an untapped creature with power ...
|
} // hasKeyword = CARDNAME can't attack if defending player controls an untapped creature with power ...
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user