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
|
ManaCost:1 B
|
||||||
Types:Creature Slug
|
Types:Creature Slug
|
||||||
PT:1/1
|
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: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: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
|
SVar:DBPump:DB$ Pump | Defined$ Remembered | KW$ ChosenTypewalk | DefinedChosenKW$ Type | SubAbility$ ExileEffect
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ public class EffectAi extends SpellAbilityAi {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
randomReturn = true;
|
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")) {
|
} else if (logic.equals("Fog")) {
|
||||||
if (game.getPhaseHandler().isPlayerTurn(sa.getActivatingPlayer())) {
|
if (game.getPhaseHandler().isPlayerTurn(sa.getActivatingPlayer())) {
|
||||||
return false;
|
return false;
|
||||||
@@ -95,15 +100,13 @@ public class EffectAi extends SpellAbilityAi {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String stackable = sa.getParam("Stackable");
|
if ("False".equals(sa.getParam("Stackable"))) {
|
||||||
|
|
||||||
if ((stackable != null) && stackable.equals("False")) {
|
|
||||||
String name = sa.getParam("Name");
|
String name = sa.getParam("Name");
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
name = sa.getSourceCard().getName() + "'s Effect";
|
name = sa.getSourceCard().getName() + "'s Effect";
|
||||||
}
|
}
|
||||||
final List<Card> list = sa.getActivatingPlayer().getCardsIn(ZoneType.Battlefield, name);
|
final List<Card> list = sa.getActivatingPlayer().getCardsIn(ZoneType.Command, name);
|
||||||
if (list.size() != 0) {
|
if (!list.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user