mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
fixed Hydroid Krasis cast trigger
This commit is contained in:
parent
c1f9586948
commit
b3510e7f3d
1 changed files with 6 additions and 1 deletions
|
@ -2,6 +2,7 @@ package mage.cards.h;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CastSourceTriggeredAbility;
|
||||
|
@ -80,7 +81,11 @@ class HydroidKrasisEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int halfCost = Math.floorDiv(source.getManaCostsToPay().getX(), 2);
|
||||
Object obj = getValue(CastSourceTriggeredAbility.SOURCE_CAST_SPELL_ABILITY);
|
||||
if (!(obj instanceof SpellAbility)) {
|
||||
return false;
|
||||
}
|
||||
int halfCost = Math.floorDiv(((SpellAbility) obj).getManaCostsToPay().getX(), 2);
|
||||
player.drawCards(halfCost, game);
|
||||
player.gainLife(halfCost, game, source);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue