mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Added canPlayFromEffectAI entries to AF GainLife and LoseLife.
This commit is contained in:
@@ -134,6 +134,14 @@ public class AbilityFactoryAlterLife {
|
|||||||
AbilityFactoryAlterLife.gainLifeResolve(this.af, this);
|
AbilityFactoryAlterLife.gainLifeResolve(this.af, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPlayFromEffectAI(final boolean mandatory, final boolean withOutManaCost) {
|
||||||
|
if (withOutManaCost) {
|
||||||
|
return AbilityFactoryAlterLife.gainLifeDoTriggerAINoCost(af, this, mandatory);
|
||||||
|
}
|
||||||
|
return AbilityFactoryAlterLife.gainLifeDoTriggerAI(af, this, mandatory);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
return spGainLife;
|
return spGainLife;
|
||||||
}
|
}
|
||||||
@@ -348,6 +356,23 @@ public class AbilityFactoryAlterLife {
|
|||||||
// not mandatory
|
// not mandatory
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return gainLifeDoTriggerAINoCost(af, sa, mandatory);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* gainLifeDoTriggerAINoCost.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @param af
|
||||||
|
* a {@link forge.card.abilityfactory.AbilityFactory} object.
|
||||||
|
* @param sa
|
||||||
|
* a {@link forge.card.spellability.SpellAbility} object.
|
||||||
|
* @param mandatory
|
||||||
|
* a boolean.
|
||||||
|
* @return a boolean.
|
||||||
|
*/
|
||||||
|
public static boolean gainLifeDoTriggerAINoCost(final AbilityFactory af, final SpellAbility sa, final boolean mandatory) {
|
||||||
|
|
||||||
final HashMap<String, String> params = af.getMapParams();
|
final HashMap<String, String> params = af.getMapParams();
|
||||||
|
|
||||||
@@ -498,6 +523,14 @@ public class AbilityFactoryAlterLife {
|
|||||||
public void resolve() {
|
public void resolve() {
|
||||||
AbilityFactoryAlterLife.loseLifeResolve(this.af, this);
|
AbilityFactoryAlterLife.loseLifeResolve(this.af, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPlayFromEffectAI(final boolean mandatory, final boolean withOutManaCost) {
|
||||||
|
if (withOutManaCost) {
|
||||||
|
return AbilityFactoryAlterLife.loseLifeDoTriggerAINoCost(af, this, mandatory);
|
||||||
|
}
|
||||||
|
return AbilityFactoryAlterLife.loseLifeDoTriggerAI(af, this, mandatory);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return spLoseLife;
|
return spLoseLife;
|
||||||
}
|
}
|
||||||
@@ -709,6 +742,23 @@ public class AbilityFactoryAlterLife {
|
|||||||
// not mandatory
|
// not mandatory
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return loseLifeDoTriggerAINoCost(af, sa, mandatory);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* loseLifeDoTriggerAINoCost.
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @param af
|
||||||
|
* a {@link forge.card.abilityfactory.AbilityFactory} object.
|
||||||
|
* @param sa
|
||||||
|
* a {@link forge.card.spellability.SpellAbility} object.
|
||||||
|
* @param mandatory
|
||||||
|
* a boolean.
|
||||||
|
* @return a boolean.
|
||||||
|
*/
|
||||||
|
public static boolean loseLifeDoTriggerAINoCost(final AbilityFactory af, final SpellAbility sa, final boolean mandatory) {
|
||||||
|
|
||||||
final HashMap<String, String> params = af.getMapParams();
|
final HashMap<String, String> params = af.getMapParams();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user