- DOM: Added Firesong and Sunspeaker

This commit is contained in:
swordshine
2018-03-11 18:23:47 +08:00
parent d8b31ec4bc
commit b560df49a3
3 changed files with 16 additions and 0 deletions

View File

@@ -405,6 +405,7 @@ public class Player extends GameEntity implements Comparable<Player> {
final Map<String, Object> runParams = Maps.newHashMap();
runParams.put("Player", this);
runParams.put("LifeAmount", lifeGain);
runParams.put("Source", source);
game.getTriggerHandler().runTrigger(TriggerType.LifeGained, runParams, false);
game.fireEvent(new GameEventPlayerLivesChanged(this, oldLife, life));

View File

@@ -55,6 +55,12 @@ public class TriggerLifeGained extends Trigger {
return false;
}
}
if (this.mapParams.containsKey("ValidSource")) {
if (!matchesValid(runParams2.get("Source"), this.mapParams.get("ValidSource").split(","),
this.getHostCard())) {
return false;
}
}
return true;
}

View File

@@ -0,0 +1,9 @@
Name:Firesong and Sunspeaker
ManaCost:4 R W
Types:Legendary Creature Minotaur Cleric
PT:4/6
S:Mode$ Continuous | AddKeyword$ Lifelink | Affected$ Instant.Red+YouCtrl,Sorcery.Red+YouCtrl | AffectedZone$ Stack | Description$ Red instant and sorcery spells you control have lifelink.
T:Mode$ LifeGained | ValidPlayer$ You | ValidSource$ Instant.White,Sorcery.White | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ Whenever a white instant or sorcery spell causes you to gain life, CARDNAME deals 3 damage to target creature or player.
SVar:TrigDealDamage:DB$ DealDamage | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 3
SVar:Picture:http://www.wizards.com/global/images/magic/general/firesong_and_sunspeaker.jpg
Oracle:Red instant and sorcery spells you control have lifelink.\nWhenever a white instant or sorcery spell causes you to gain life, Firesong and Sunspeaker deals 3 damage to target creature or player.