mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- improved the AI for Explorer's Scope (for now in a non-generalized manner + may not always be a good idea to activate the optional ability, feel free to improve)
This commit is contained in:
@@ -115,8 +115,18 @@ public class DigAi extends SpellAbilityAi {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean confirmAction(Player player, SpellAbility sa, PlayerActionConfirmMode mode, String message) {
|
public boolean confirmAction(Player player, SpellAbility sa, PlayerActionConfirmMode mode, String message) {
|
||||||
// looks like perfect code for Delver of Secrets, but what about other cards?
|
|
||||||
Card topc = player.getZone(ZoneType.Library).get(0);
|
Card topc = player.getZone(ZoneType.Library).get(0);
|
||||||
|
|
||||||
|
// AI actions for individual cards (until this AI can be generalized)
|
||||||
|
if (sa.getHostCard() != null) {
|
||||||
|
if (sa.getHostCard().getName().equals("Explorer's Scope")) {
|
||||||
|
// for Explorer's Scope, always put a land on the battlefield tapped
|
||||||
|
// (TODO: might not always be a good idea, e.g. when a land ETBing can have detrimental effects)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// looks like perfect code for Delver of Secrets, but what about other cards?
|
||||||
return topc.isInstant() || topc.isSorcery();
|
return topc.isInstant() || topc.isSorcery();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user