mirror of
https://github.com/correl/mage.git
synced 2025-04-13 01:01:11 -09:00
* Vito, Thorn of the Dusk Rose - Added hint to triggered ability to show how much damage goes to the opponent (#6646).
This commit is contained in:
parent
84370ee5ab
commit
fbfb55f99c
1 changed files with 9 additions and 1 deletions
|
@ -16,6 +16,8 @@ import mage.game.events.GameEvent;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.MageObject;
|
||||||
|
import mage.abilities.hint.StaticHint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
|
@ -73,8 +75,14 @@ class VitoThornOfTheDuskRoseTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getPlayerId().equals(this.controllerId)) {
|
if (event.getPlayerId().equals(getControllerId())) {
|
||||||
|
MageObject mageObject = game.getObject(event.getSourceId());
|
||||||
this.getEffects().clear();
|
this.getEffects().clear();
|
||||||
|
this.getHints().clear();
|
||||||
|
this.addHint(new StaticHint("Lose life amount: " + event.getAmount()));
|
||||||
|
if (mageObject != null) {
|
||||||
|
this.addHint(new StaticHint("Caused by: " + mageObject.getLogName()));
|
||||||
|
}
|
||||||
this.addEffect(new LoseLifeTargetEffect(event.getAmount()));
|
this.addEffect(new LoseLifeTargetEffect(event.getAmount()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue