mirror of
https://github.com/Relintai/mtg-forge-ios.git
synced 2025-01-08 15:39:35 +01:00
- Improved AI logic for Firecannon Blast.
git-svn-id: http://svn.slightlymagic.net/forge/trunk@35712 269b9781-a132-4a9b-9d4e-f004f1b56b58
This commit is contained in:
parent
d0d0ad4ae2
commit
a2165f3f42
@ -123,9 +123,20 @@ public class DamageDealAi extends DamageAiBase {
|
||||
dmg += 2;
|
||||
}
|
||||
|
||||
String logic = sa.getParam("AILogic");
|
||||
String logic = sa.getParamOrDefault("AILogic", "");
|
||||
if ("DiscardLands".equals(logic)) {
|
||||
dmg = 2;
|
||||
} else if (logic.startsWith("ProcRaid.")) {
|
||||
if (ai.getGame().getPhaseHandler().isPlayerTurn(ai) && ai.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS)) {
|
||||
for (Card potentialAtkr : ai.getCreaturesInPlay()) {
|
||||
if (ComputerUtilCard.doesCreatureAttackAI(ai, potentialAtkr)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ai.getAttackedWithCreatureThisTurn()) {
|
||||
dmg = Integer.parseInt(logic.substring(logic.indexOf(".") + 1));
|
||||
}
|
||||
} else if ("WildHunt".equals(logic)) {
|
||||
// This dummy ability will just deal 0 damage, but holds the logic for the AI for Master of Wild Hunt
|
||||
List<Card> wolves = CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), "Creature.Wolf+untapped+YouCtrl+Other", ai, source);
|
||||
|
@ -1,7 +1,7 @@
|
||||
Name:Firecannon Blast
|
||||
ManaCost:1 R R
|
||||
Types:Sorcery
|
||||
A:SP$ DealDamage | Cost$ 1 R R | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 3 | ConditionCheckSVar$ RaidTest | ConditionSVarCompare$ EQ0 | References$ RaidTest | SubAbility$ DBDealDamage | SpellDescription$ CARDNAME deals 3 damage to target creature. Raid — CARDNAME deals 6 damage to that creature instead if you attacked with a creature this turn.
|
||||
A:SP$ DealDamage | Cost$ 1 R R | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 3 | AILogic$ ProcRaid.6 | ConditionCheckSVar$ RaidTest | ConditionSVarCompare$ EQ0 | References$ RaidTest | SubAbility$ DBDealDamage | SpellDescription$ CARDNAME deals 3 damage to target creature. Raid — CARDNAME deals 6 damage to that creature instead if you attacked with a creature this turn.
|
||||
SVar:DBDealDamage:DB$ DealDamage | Defined$ Targeted | NumDmg$ 6 | ConditionCheckSVar$ RaidTest | ConditionSVarCompare$ GE1 | References$ RaidTest
|
||||
SVar:RaidTest:Count$AttackersDeclared
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/firecannon_blast.jpg
|
||||
|
Loading…
Reference in New Issue
Block a user