mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 04:39:18 -08:00
* Mistcutter Hydra (and other) - Fixed that a previous used and set X value was used again as the card was put onto battlefield again (fixes #573).
This commit is contained in:
parent
212dbc83e8
commit
4afb514735
15 changed files with 106 additions and 0 deletions
|
|
@ -94,6 +94,8 @@ class AstralCornucopiaEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility) obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.CHARGE.createInstance(amount), game);
|
||||
|
|
|
|||
|
|
@ -92,6 +92,8 @@ class OrochiHatcheryEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility) obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.CHARGE.createInstance(amount), game);
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ class ApocalypseHydraEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility)obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
if (amount < 5) {
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ class GrenzoDungeonWardenEtBEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((Ability) obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), game);
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ class SavageBornHydraEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility)obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), game);
|
||||
|
|
|
|||
|
|
@ -92,6 +92,8 @@ class NimbusSwimmerEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility)obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), game);
|
||||
|
|
|
|||
|
|
@ -105,6 +105,8 @@ class VastwoodHydraEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility) obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), game);
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ class GenesisHydraEntersBattlefieldEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
SpellAbility spellAbility = (SpellAbility) obj;
|
||||
if (spellAbility.getSourceId().equals(source.getSourceId())) { // put into play by normal cast
|
||||
int amount = spellAbility.getManaCostsToPay().getX();
|
||||
|
|
|
|||
|
|
@ -90,6 +90,8 @@ class ChaliceOfTheVoidEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility) obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.CHARGE.createInstance(amount), game);
|
||||
|
|
|
|||
|
|
@ -106,6 +106,8 @@ class ManaBloomEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility) obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.CHARGE.createInstance(amount), game);
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@ class ChimericMassEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility) obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.CHARGE.createInstance(amount), game);
|
||||
|
|
|
|||
|
|
@ -97,6 +97,8 @@ class FeralHydraEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility)obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), game);
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ class SigilOfDistinctionEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility) obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.CHARGE.createInstance(amount), game);
|
||||
|
|
|
|||
|
|
@ -104,6 +104,8 @@ class MistcutterHydraEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Object obj = getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (obj != null && obj instanceof SpellAbility) {
|
||||
// delete to prevent using it again if put into battlefield from other effect
|
||||
setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null);
|
||||
int amount = ((SpellAbility)obj).getManaCostsToPay().getX();
|
||||
if (amount > 0) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue