mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00: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 java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.hint.StaticHint;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
@ -73,8 +75,14 @@ class VitoThornOfTheDuskRoseTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
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.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()));
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue