mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Inquisitor's Flail fix
This commit is contained in:
parent
41006a822a
commit
1208c7d359
1 changed files with 11 additions and 7 deletions
|
@ -37,6 +37,7 @@ import mage.abilities.effects.ReplacementEffectImpl;
|
|||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -93,13 +94,16 @@ class InquisitorsFlailEffect extends ReplacementEffectImpl<InquisitorsFlailEffec
|
|||
case DAMAGE_CREATURE:
|
||||
case DAMAGE_PLAYER:
|
||||
case DAMAGE_PLANESWALKER:
|
||||
Permanent equipment = game.getPermanent(source.getSourceId());
|
||||
if (equipment != null && equipment.getAttachedTo() != null) {
|
||||
UUID attachedTo = equipment.getAttachedTo();
|
||||
if (event.getSourceId().equals(attachedTo)) {
|
||||
event.setAmount(event.getAmount() * 2);
|
||||
} else if (event.getTargetId().equals(attachedTo)) {
|
||||
event.setAmount(event.getAmount() * 2);
|
||||
if (((DamagedEvent) event).isCombatDamage()) {
|
||||
Permanent equipment = game.getPermanent(source.getSourceId());
|
||||
if (equipment != null && equipment.getAttachedTo() != null) {
|
||||
UUID attachedTo = equipment.getAttachedTo();
|
||||
if (event.getSourceId().equals(attachedTo)) {
|
||||
event.setAmount(event.getAmount() * 2);
|
||||
} else if (event.getTargetId().equals(attachedTo)) {
|
||||
event.setAmount(event.getAmount() * 2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue