mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[MH3] Implement Fangs of Kalonia, The Hunger Tide Rises, Wastescape Battlemage (#12383)
This commit is contained in:
parent
fd8cb28fc2
commit
53a5f53f78
10 changed files with 494 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue