mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Added AI support for Divide counters.
- Card conversions by marc.
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
Name:Elven Rite
|
Name:Elven Rite
|
||||||
ManaCost:1 G
|
ManaCost:1 G
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ PutCounter | Cost$ 1 G | ValidTgts$ Creature | TgtPrompt$ Select target creature (1) | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DBPutCounter | SpellDescription$ Distribute two +1/+1 counters among one or two target creatures.
|
A:SP$ PutCounter | Cost$ 1 G | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute counters to | CounterType$ P1P1 | CounterNum$ 2 | TargetMin$ 1 | TargetMax$ 2 | DividedAsYouChoose$ 2 | SpellDescription$ Distribute two +1/+1 counters among one or two target creatures.
|
||||||
SVar:DBPutCounter:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (2) | CounterType$ P1P1 | CounterNum$ 1
|
SVar:RemAIDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/elven_rite.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/elven_rite.jpg
|
||||||
Oracle:Distribute two +1/+1 counters among one or two target creatures.
|
Oracle:Distribute two +1/+1 counters among one or two target creatures.
|
||||||
SetInfo:STH Uncommon
|
SetInfo:STH Uncommon
|
||||||
@@ -4,11 +4,7 @@ Types:Legendary Creature Dragon Spirit
|
|||||||
PT:5/5
|
PT:5/5
|
||||||
K:Flying
|
K:Flying
|
||||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigPutCounter | OptionalDecider$ TriggeredCardController | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, you may distribute five +1/+1 counters among any number of target creatures.
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigPutCounter | OptionalDecider$ TriggeredCardController | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, you may distribute five +1/+1 counters among any number of target creatures.
|
||||||
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature (1) | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ PutCounter2
|
SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute counters to | CounterType$ P1P1 | CounterNum$ 5 | TargetMin$ 1 | TargetMax$ 5 | DividedAsYouChoose$ 5
|
||||||
SVar:PutCounter2:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (2) | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ PutCounter3
|
|
||||||
SVar:PutCounter3:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (3) | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ PutCounter4
|
|
||||||
SVar:PutCounter4:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (4) | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ PutCounter5
|
|
||||||
SVar:PutCounter5:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (5) | CounterType$ P1P1 | CounterNum$ 1
|
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/jugan_the_rising_star.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/jugan_the_rising_star.jpg
|
||||||
Oracle:Flying\nWhen Jugan, the Rising Star dies, you may distribute five +1/+1 counters among any number of target creatures.
|
Oracle:Flying\nWhen Jugan, the Rising Star dies, you may distribute five +1/+1 counters among any number of target creatures.
|
||||||
SetInfo:CHK Rare
|
SetInfo:CHK Rare
|
||||||
@@ -3,9 +3,8 @@ ManaCost:5 G G
|
|||||||
Types:Creature Elf Warrior
|
Types:Creature Elf Warrior
|
||||||
PT:2/2
|
PT:2/2
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounter | TriggerDescription$ When CARDNAME enters the battlefield, distribute three +1/+1 counters among one, two, or three target creatures.
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounter | TriggerDescription$ When CARDNAME enters the battlefield, distribute three +1/+1 counters among one, two, or three target creatures.
|
||||||
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ PutCounter2
|
SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute counters to | CounterType$ P1P1 | CounterNum$ 3 | TargetMin$ 1 | TargetMax$ 3 | DividedAsYouChoose$ 3
|
||||||
SVar:PutCounter2:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ PutCounter3
|
SVar:RemAIDeck:True
|
||||||
SVar:PutCounter3:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1
|
|
||||||
SVar:PlayMain1:TRUE
|
SVar:PlayMain1:TRUE
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/wurmskin_forger.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/wurmskin_forger.jpg
|
||||||
Oracle:When Wurmskin Forger enters the battlefield, distribute three +1/+1 counters among one, two, or three target creatures.
|
Oracle:When Wurmskin Forger enters the battlefield, distribute three +1/+1 counters among one, two, or three target creatures.
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
Card choice = null;
|
Card choice = null;
|
||||||
final String type = sa.getParam("CounterType");
|
final String type = sa.getParam("CounterType");
|
||||||
final String amountStr = sa.getParam("CounterNum");
|
final String amountStr = sa.getParam("CounterNum");
|
||||||
|
final boolean divided = sa.hasParam("DividedAsYouChoose");
|
||||||
|
|
||||||
final Player player = sa.isCurse() ? ai.getOpponent() : ai;
|
final Player player = sa.isCurse() ? ai.getOpponent() : ai;
|
||||||
|
|
||||||
@@ -128,7 +129,11 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
// TODO is this good enough? for up to amounts?
|
// TODO is this good enough? for up to amounts?
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else if (divided) {
|
||||||
|
abTgt.addDividedAllocation(choice, amount);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
list.remove(choice);
|
list.remove(choice);
|
||||||
abTgt.addTarget(choice);
|
abTgt.addTarget(choice);
|
||||||
}
|
}
|
||||||
@@ -171,6 +176,7 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
Card choice = null;
|
Card choice = null;
|
||||||
final String type = sa.getParam("CounterType");
|
final String type = sa.getParam("CounterType");
|
||||||
final String amountStr = sa.getParam("CounterNum");
|
final String amountStr = sa.getParam("CounterNum");
|
||||||
|
final boolean divided = sa.hasParam("DividedAsYouChoose");
|
||||||
final int amount = AbilityUtils.calculateAmount(sa.getSourceCard(), amountStr, sa);
|
final int amount = AbilityUtils.calculateAmount(sa.getSourceCard(), amountStr, sa);
|
||||||
|
|
||||||
final Player player = sa.isCurse() ? ai.getOpponent() : ai;
|
final Player player = sa.isCurse() ? ai.getOpponent() : ai;
|
||||||
@@ -217,6 +223,9 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
// TODO is this good enough? for up to amounts?
|
// TODO is this good enough? for up to amounts?
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else if (divided) {
|
||||||
|
abTgt.addDividedAllocation(choice, amount);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
list.remove(choice);
|
list.remove(choice);
|
||||||
abTgt.addTarget(choice);
|
abTgt.addTarget(choice);
|
||||||
@@ -237,6 +246,7 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
final Player player = isCurse ? ai.getOpponent() : ai;
|
final Player player = isCurse ? ai.getOpponent() : ai;
|
||||||
final String type = sa.getParam("CounterType");
|
final String type = sa.getParam("CounterType");
|
||||||
final String amountStr = sa.getParam("CounterNum");
|
final String amountStr = sa.getParam("CounterNum");
|
||||||
|
final boolean divided = sa.hasParam("DividedAsYouChoose");
|
||||||
final int amount = AbilityUtils.calculateAmount(sa.getSourceCard(), amountStr, sa);
|
final int amount = AbilityUtils.calculateAmount(sa.getSourceCard(), amountStr, sa);
|
||||||
|
|
||||||
if (abTgt == null) {
|
if (abTgt == null) {
|
||||||
@@ -294,6 +304,9 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
choice = ComputerUtilCard.getRandomCard(list);
|
choice = ComputerUtilCard.getRandomCard(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (choice != null && divided) {
|
||||||
|
abTgt.addDividedAllocation(choice, amount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO - I think choice can be null here. Is that ok for
|
// TODO - I think choice can be null here. Is that ok for
|
||||||
|
|||||||
Reference in New Issue
Block a user