[MH3] Implement Fangs of Kalonia, The Hunger Tide Rises, Wastescape Battlemage (#12383)

This commit is contained in:
ssk97 2024-06-04 01:46:49 -07:00 committed by GitHub
parent fd8cb28fc2
commit 53a5f53f78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 494 additions and 4 deletions

View file

@ -20,6 +20,7 @@ public class KickedCostCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
return KickerAbility.getKickedCounterStrict(game, source, kickerCostText) > 0;
return KickerAbility.getKickedCounterStrict(game, source, kickerCostText) > 0
|| KickerAbility.getSpellKickedCountStrict(game, source.getSourceId(), kickerCostText) > 0;
}
}

View file

@ -273,9 +273,16 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo
* Find spell's kicked stats. Must be used on stack only, e.g. for SPELL_CAST events
*/
public static int getSpellKickedCount(Game game, UUID spellId) {
return getSpellKickedCountStrict(game, spellId, "");
}
/**
* Find spell's kicked stats. Must be used on stack only, e.g. for SPELL_CAST events
*/
public static int getSpellKickedCountStrict(Game game, UUID spellId, String needKickerCost) {
Spell spell = game.getSpellOrLKIStack(spellId);
if (spell != null) {
return KickerAbility.getKickedCounter(game, spell.getSpellAbility());
return KickerAbility.getKickedCounterStrict(game, spell.getSpellAbility(), needKickerCost);
}
return 0;
}

View file

@ -795,6 +795,8 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
GameEvent addedAllEvent = GameEvent.getEvent(GameEvent.EventType.COUNTERS_ADDED, objectId, source, playerAddingCounters, counter.getName(), amount);
addedAllEvent.setFlag(isEffectFlag);
game.fireEvent(addedAllEvent);
} else {
returnCode = false;
}
} else {
returnCode = false;