mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added the option Curse to spPumpTgt.
- Added Disfigure.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Disfigure
|
||||||
|
B
|
||||||
|
Instant
|
||||||
|
no text
|
||||||
|
spPumpTgtCurse:-2/-2
|
||||||
|
|
||||||
Serra Avatar
|
Serra Avatar
|
||||||
4 W W W
|
4 W W W
|
||||||
Creature Avatar
|
Creature Avatar
|
||||||
|
|||||||
@@ -4727,6 +4727,9 @@ public class CardFactory implements NewConstants {
|
|||||||
final int NumDefense[] = {-1138};
|
final int NumDefense[] = {-1138};
|
||||||
final String DefenseX[] = {"none"};
|
final String DefenseX[] = {"none"};
|
||||||
final String Keyword[] = {"none"};
|
final String Keyword[] = {"none"};
|
||||||
|
final boolean curse[] = {false};
|
||||||
|
|
||||||
|
curse[0] = k[0].contains("Curse");
|
||||||
|
|
||||||
String ptk[] = k[1].split("/");
|
String ptk[] = k[1].split("/");
|
||||||
|
|
||||||
@@ -4865,19 +4868,38 @@ public class CardFactory implements NewConstants {
|
|||||||
if(curPhase.equals(Constant.Phase.Main2))
|
if(curPhase.equals(Constant.Phase.Main2))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
CardList list = getCreatures();
|
boolean goodt = false;
|
||||||
if(!list.isEmpty()) {
|
Card t = new Card();
|
||||||
boolean goodt = false;
|
|
||||||
Card t = new Card();
|
if (curse[0]) { // Curse means spells with negative effect
|
||||||
while(goodt == false && !list.isEmpty()) {
|
CardList list = new CardList(AllZone.Human_Play.getCards());
|
||||||
t = CardFactoryUtil.AI_getBestCreature(list);
|
list = list.filter(new CardListFilter() {
|
||||||
if((t.getNetDefense() + defense) > 0) goodt = true;
|
public boolean addCard(Card c) {
|
||||||
else list.remove(t);
|
return CardFactoryUtil.canTarget(card, c) && c.isCreature();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (NumDefense[0] < 0 && !list.isEmpty()) { // with spells that give -X/-X, compi will try to destroy a creature
|
||||||
|
int defmalus = - getNumDefense();
|
||||||
|
list = CardListUtil.filterToughness(list, defmalus);
|
||||||
|
} // -X/-X end
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
t = CardFactoryUtil.AI_getBestCreature(list);
|
||||||
|
goodt = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else { // no Curse means spell with positive effect
|
||||||
|
CardList list = getCreatures();
|
||||||
|
if(!list.isEmpty()) {
|
||||||
|
while(goodt == false && !list.isEmpty()) {
|
||||||
|
t = CardFactoryUtil.AI_getBestCreature(list);
|
||||||
|
if((t.getNetDefense() + defense) > 0) goodt = true;
|
||||||
|
else list.remove(t);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(goodt == true) {
|
}
|
||||||
|
if(goodt == true) {
|
||||||
setTargetCard(t);
|
setTargetCard(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user