mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Improved AI using Giant Slug.
This commit is contained in:
@@ -2,7 +2,7 @@ Name:Giant Slug
|
||||
ManaCost:1 B
|
||||
Types:Creature Slug
|
||||
PT:1/1
|
||||
A:AB$ Effect | Cost$ 5 | Duration$ Permanent | Triggers$ ChooseBasicTrig | AILogic$ Always | SVars$ ChooseB,ExileEffect,DBPump | RememberObjects$ Self | SpellDescription$ At the beginning of your next upkeep, choose a basic land type. CARDNAME gains landwalk of the chosen type until the end of that turn.
|
||||
A:AB$ Effect | Cost$ 5 | Duration$ Permanent | Triggers$ ChooseBasicTrig | AILogic$ EndOfOppTurn | Stackable$ False | SVars$ ChooseB,ExileEffect,DBPump | RememberObjects$ Self | SpellDescription$ At the beginning of your next upkeep, choose a basic land type. CARDNAME gains landwalk of the chosen type until the end of that turn.
|
||||
SVar:ChooseBasicTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Command | Execute$ ChooseB | TriggerDescription$ At the beginning of your next upkeep, choose a basic land type. Giant Slug gains landwalk of the chosen type until the end of that turn.
|
||||
SVar:ChooseB:AB$ ChooseType | Cost$ 0 | Defined$ You | Type$ Basic Land | AILogic$ ChosenLandwalk | SubAbility$ DBPump
|
||||
SVar:DBPump:DB$ Pump | Defined$ Remembered | KW$ ChosenTypewalk | DefinedChosenKW$ Type | SubAbility$ ExileEffect
|
||||
|
||||
@@ -39,6 +39,11 @@ public class EffectAi extends SpellAbilityAi {
|
||||
return false;
|
||||
}
|
||||
randomReturn = true;
|
||||
} else if (logic.equals("EndOfOppTurn")) {
|
||||
if (phase.isPlayerTurn(ai) || phase.getPhase().isBefore(PhaseType.END_OF_TURN)) {
|
||||
return false;
|
||||
}
|
||||
randomReturn = true;
|
||||
} else if (logic.equals("Fog")) {
|
||||
if (game.getPhaseHandler().isPlayerTurn(sa.getActivatingPlayer())) {
|
||||
return false;
|
||||
@@ -95,15 +100,13 @@ public class EffectAi extends SpellAbilityAi {
|
||||
return false;
|
||||
}
|
||||
|
||||
final String stackable = sa.getParam("Stackable");
|
||||
|
||||
if ((stackable != null) && stackable.equals("False")) {
|
||||
if ("False".equals(sa.getParam("Stackable"))) {
|
||||
String name = sa.getParam("Name");
|
||||
if (name == null) {
|
||||
name = sa.getSourceCard().getName() + "'s Effect";
|
||||
}
|
||||
final List<Card> list = sa.getActivatingPlayer().getCardsIn(ZoneType.Battlefield, name);
|
||||
if (list.size() != 0) {
|
||||
final List<Card> list = sa.getActivatingPlayer().getCardsIn(ZoneType.Command, name);
|
||||
if (!list.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user