mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Implemented AI for Launch the Fleet
This commit is contained in:
@@ -86,6 +86,20 @@ public class AnimateAi extends SpellAbilityAi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Launch the Fleet (why is this an Animate ability?)
|
||||||
|
if (sa.hasParam("AILogic") && "Attacking".equals(sa.getParam("AILogic"))) {
|
||||||
|
if (ph.getPlayerTurn().isOpponentOf(aiPlayer) || ph.getPhase().isAfter(PhaseType.COMBAT_DECLARE_ATTACKERS)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
List<Card> list = CardLists.getValidCards(aiPlayer.getCreaturesInPlay(), tgt.getValidTgts(), aiPlayer, source);
|
||||||
|
for (Card c : list) {
|
||||||
|
if (ComputerUtilCard.doesCreatureAttackAI(aiPlayer, c)) {
|
||||||
|
sa.getTargets().add(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return !sa.getTargets().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
// don't use instant speed animate abilities outside computers
|
// don't use instant speed animate abilities outside computers
|
||||||
// Combat_Begin step
|
// Combat_Begin step
|
||||||
if (!ph.is(PhaseType.COMBAT_BEGIN)
|
if (!ph.is(PhaseType.COMBAT_BEGIN)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Launch the Fleet
|
|||||||
ManaCost:W
|
ManaCost:W
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
S:Mode$ RaiseCost | ValidCard$ Card.Self | Type$ Spell | Amount$ IncreaseCost | References$ IncreaseCost | EffectZone$ All | Description$ Strive - CARDNAME costs {1} more to cast for each target beyond the first.
|
S:Mode$ RaiseCost | ValidCard$ Card.Self | Type$ Spell | Amount$ IncreaseCost | References$ IncreaseCost | EffectZone$ All | Description$ Strive - CARDNAME costs {1} more to cast for each target beyond the first.
|
||||||
A:SP$ Animate | Cost$ W | TargetMin$ 0 | TargetMax$ MaxTargets | ValidTgts$ Creature | Triggers$ AttackTrigger | sVars$ LaunchTokenAttacking | References$ AttackTrigger,MaxTargets,IncreaseCost,LaunchTokenAttacking | SpellDescription$ Until end of turn, any number of target creatures each gain "Whenever this creature attacks, put a 1/1 white Soldier creature token onto the battlefield tapped and attacking."
|
A:SP$ Animate | Cost$ W | TargetMin$ 0 | TargetMax$ MaxTargets | AILogic$ Attacking | ValidTgts$ Creature | Triggers$ AttackTrigger | sVars$ LaunchTokenAttacking | References$ AttackTrigger,MaxTargets,IncreaseCost,LaunchTokenAttacking | SpellDescription$ Until end of turn, any number of target creatures each gain "Whenever this creature attacks, put a 1/1 white Soldier creature token onto the battlefield tapped and attacking."
|
||||||
SVar:AttackTrigger:Mode$ Attacks | ValidCard$ Card.Self | Execute$ LaunchTokenAttacking | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME attacks, put a 1/1 white Soldier creature token onto the battlefield tapped and attacking.
|
SVar:AttackTrigger:Mode$ Attacks | ValidCard$ Card.Self | Execute$ LaunchTokenAttacking | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME attacks, put a 1/1 white Soldier creature token onto the battlefield tapped and attacking.
|
||||||
SVar:LaunchTokenAttacking:AB$ Token | Cost$ 0 | TokenAmount$ 1 | TokenName$ Soldier | TokenTypes$ Creature,Soldier | TokenOwner$ You | TokenColors$ White | TokenPower$ 1 | TokenToughness$ 1 | TokenImage$ w_1_1_soldier2_ths | TokenAttacking$ True | TokenTapped$ True
|
SVar:LaunchTokenAttacking:AB$ Token | Cost$ 0 | TokenAmount$ 1 | TokenName$ Soldier | TokenTypes$ Creature,Soldier | TokenOwner$ You | TokenColors$ White | TokenPower$ 1 | TokenToughness$ 1 | TokenImage$ w_1_1_soldier2_ths | TokenAttacking$ True | TokenTapped$ True
|
||||||
SVar:MaxTargets:Count$Valid Creature
|
SVar:MaxTargets:Count$Valid Creature
|
||||||
|
|||||||
Reference in New Issue
Block a user