* Myth Unbound - Fixed the two working abilities(fixe #5347).

This commit is contained in:
LevelX2 2019-01-07 16:39:49 +01:00
parent 15ba067be5
commit e938f91e3e
5 changed files with 133 additions and 8 deletions

View file

@ -80,7 +80,7 @@ class MythUnboundCostReductionEffect extends CostModificationEffectImpl {
public boolean apply(Game game, Ability source, Ability abilityToModify) {
Ability spellAbility = abilityToModify;
if (spellAbility != null) {
Integer amount = (Integer) game.getState().getValue(abilityToModify.getControllerId() + "_castCount");
Integer amount = (Integer) game.getState().getValue(abilityToModify.getSourceId() + "_castCount");
if (amount != null && amount > 0) {
CardUtil.reduceCost(spellAbility, amount);
return true;
@ -99,7 +99,7 @@ class MythUnboundCostReductionEffect extends CostModificationEffectImpl {
if (abilityToModify.isControlledBy(source.getControllerId())) {
Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId());
if (spell != null) {
return player.getCommandersIds().contains(spell.getId());
return player.getCommandersIds().contains(spell.getSourceId());
}
}
}