mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Added Jotun Grunt
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -5606,6 +5606,7 @@ res/cardsfolder/j/jor_kadeen_the_prevailer.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/j/joraga_bard.txt svneol=native#text/plain
|
res/cardsfolder/j/joraga_bard.txt svneol=native#text/plain
|
||||||
res/cardsfolder/j/joraga_treespeaker.txt svneol=native#text/plain
|
res/cardsfolder/j/joraga_treespeaker.txt svneol=native#text/plain
|
||||||
res/cardsfolder/j/joraga_warcaller.txt svneol=native#text/plain
|
res/cardsfolder/j/joraga_warcaller.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/j/jotun_grunt.txt -text
|
||||||
res/cardsfolder/j/jotun_owl_keeper.txt -text
|
res/cardsfolder/j/jotun_owl_keeper.txt -text
|
||||||
res/cardsfolder/j/journey_of_discovery.txt -text
|
res/cardsfolder/j/journey_of_discovery.txt -text
|
||||||
res/cardsfolder/j/journey_to_nowhere.txt svneol=native#text/plain
|
res/cardsfolder/j/journey_to_nowhere.txt svneol=native#text/plain
|
||||||
|
|||||||
9
res/cardsfolder/j/jotun_grunt.txt
Normal file
9
res/cardsfolder/j/jotun_grunt.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Name:Jotun Grunt
|
||||||
|
ManaCost:1 W
|
||||||
|
Types:Creature Giant Soldier
|
||||||
|
PT:4/4
|
||||||
|
K:Cumulative upkeep:PutCardToLibFromSameGrave<2/-1/Card>:Put two cards from a single graveyard on the bottom of their owner's library.
|
||||||
|
SVar:X:PlayerCountPlayers$HighestValidGraveyard Card.YouOwn
|
||||||
|
SVar:NeedsToPlayVar:X GE2
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/jotun_grunt.jpg
|
||||||
|
Oracle:Cumulative upkeep-Put two cards from a single graveyard on the bottom of their owner's library. (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.)
|
||||||
@@ -319,6 +319,16 @@ public class CostPutCardToLib extends CostPartWithList {
|
|||||||
@Override
|
@Override
|
||||||
public PaymentDecision decideAIPayment(Player ai, SpellAbility ability, Card source) {
|
public PaymentDecision decideAIPayment(Player ai, SpellAbility ability, Card source) {
|
||||||
Integer c = this.convertAmount();
|
Integer c = this.convertAmount();
|
||||||
|
final Game game = ai.getGame();
|
||||||
|
List<Card> chosen = new ArrayList<Card>();
|
||||||
|
List<Card> list;
|
||||||
|
|
||||||
|
if (this.sameZone) {
|
||||||
|
list = new ArrayList<Card>(game.getCardsIn(this.getFrom()));
|
||||||
|
} else {
|
||||||
|
list = new ArrayList<Card>(ai.getCardsIn(this.getFrom()));
|
||||||
|
}
|
||||||
|
|
||||||
if (c == null) {
|
if (c == null) {
|
||||||
final String sVar = ability.getSVar(this.getAmount());
|
final String sVar = ability.getSVar(this.getAmount());
|
||||||
// Generalize this
|
// Generalize this
|
||||||
@@ -328,12 +338,24 @@ public class CostPutCardToLib extends CostPartWithList {
|
|||||||
|
|
||||||
c = AbilityUtils.calculateAmount(source, this.getAmount(), ability);
|
c = AbilityUtils.calculateAmount(source, this.getAmount(), ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list = CardLists.getValidCards(list, this.getType().split(";"), ai, source);
|
||||||
|
|
||||||
if (this.sameZone) {
|
if (this.sameZone) {
|
||||||
// TODO Determine exile from same zone for AI
|
// Jotun Grunt
|
||||||
return null;
|
// TODO: improve AI
|
||||||
|
final List<Player> players = game.getPlayers();
|
||||||
|
for (Player p : players) {
|
||||||
|
List<Card> enoughType = CardLists.filter(list, CardPredicates.isOwner(p));
|
||||||
|
if (enoughType.size() >= c) {
|
||||||
|
chosen.addAll(enoughType);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chosen = chosen.subList(0, c);
|
||||||
} else {
|
} else {
|
||||||
List<Card> chosen = ComputerUtil.choosePutToLibraryFrom(ai, this.getFrom(), this.getType(), source, ability.getTargetCard(), c);
|
chosen = ComputerUtil.choosePutToLibraryFrom(ai, this.getFrom(), this.getType(), source, ability.getTargetCard(), c);
|
||||||
return null == chosen ? null : new PaymentDecision(chosen);
|
|
||||||
}
|
}
|
||||||
|
return chosen.isEmpty() ? null : new PaymentDecision(chosen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user