mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Added the missing stack description to AF_Fog.
This commit is contained in:
@@ -13,6 +13,12 @@ public class AbilityFactory_Combat {
|
|||||||
|
|
||||||
final AbilityFactory af = AF;
|
final AbilityFactory af = AF;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStackDescription(){
|
||||||
|
// when getStackDesc is called, just build exactly what is happening
|
||||||
|
return fogStackDescription(af, this);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean canPlayAI()
|
public boolean canPlayAI()
|
||||||
{
|
{
|
||||||
return fogCanPlayAI(af, this);
|
return fogCanPlayAI(af, this);
|
||||||
@@ -33,6 +39,12 @@ public class AbilityFactory_Combat {
|
|||||||
|
|
||||||
final AbilityFactory af = AF;
|
final AbilityFactory af = AF;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStackDescription(){
|
||||||
|
// when getStackDesc is called, just build exactly what is happening
|
||||||
|
return fogStackDescription(af, this);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean canPlayAI()
|
public boolean canPlayAI()
|
||||||
{
|
{
|
||||||
return fogCanPlayAI(af, this);
|
return fogCanPlayAI(af, this);
|
||||||
@@ -67,6 +79,25 @@ public class AbilityFactory_Combat {
|
|||||||
return dbFog;
|
return dbFog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String fogStackDescription(AbilityFactory af, SpellAbility sa) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
if (!(sa instanceof Ability_Sub))
|
||||||
|
sb.append(sa.getSourceCard().getName()).append(" - ");
|
||||||
|
else
|
||||||
|
sb.append(" ");
|
||||||
|
|
||||||
|
sb.append(sa.getSourceCard().getController());
|
||||||
|
sb.append(" prevents all combat damage this turn.");
|
||||||
|
|
||||||
|
Ability_Sub abSub = sa.getSubAbility();
|
||||||
|
if (abSub != null){
|
||||||
|
sb.append(abSub.getStackDescription());
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean fogCanPlayAI(final AbilityFactory af, SpellAbility sa){
|
public static boolean fogCanPlayAI(final AbilityFactory af, SpellAbility sa){
|
||||||
// AI should only activate this during Human's Declare Blockers phase
|
// AI should only activate this during Human's Declare Blockers phase
|
||||||
boolean chance = AllZone.Phase.is(Constant.Phase.Combat_Declare_Blockers_InstantAbility, sa.getActivatingPlayer().getOpponent());
|
boolean chance = AllZone.Phase.is(Constant.Phase.Combat_Declare_Blockers_InstantAbility, sa.getActivatingPlayer().getOpponent());
|
||||||
|
|||||||
Reference in New Issue
Block a user