mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added "TriggeredCardOpponent" as a defined player.
- Fixed Kokusho, the Evening Star (is there a better solution for this, otherwise a lot of cards need the same treatment).
This commit is contained in:
@@ -5,8 +5,8 @@ Text:no text
|
||||
PT:5/5
|
||||
K:Flying
|
||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigLoseLife | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, each opponent loses 5 life. You gain life equal to the life lost this way.
|
||||
SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ Opponent | LifeAmount$ 5 | SubAbility$ SVar=DBGainLife
|
||||
SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ 5
|
||||
SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ TriggeredCardOpponent | LifeAmount$ 5 | SubAbility$ DBGainLife
|
||||
SVar:DBGainLife:DB$GainLife | Defined$ TriggeredCardController | LifeAmount$ 5
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card50445.jpg
|
||||
SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/122.jpg
|
||||
|
||||
@@ -1773,6 +1773,16 @@ public class AbilityFactory {
|
||||
if (c instanceof SpellAbility) {
|
||||
o = ((SpellAbility) c).getSourceCard().getController();
|
||||
}
|
||||
} else if (defined.endsWith("Opponent")) {
|
||||
String triggeringType = defined.substring(9);
|
||||
triggeringType = triggeringType.substring(0, triggeringType.length() - 8);
|
||||
final Object c = root.getTriggeringObject(triggeringType);
|
||||
if (c instanceof Card) {
|
||||
o = ((Card) c).getController().getOpponent();
|
||||
}
|
||||
if (c instanceof SpellAbility) {
|
||||
o = ((SpellAbility) c).getSourceCard().getController().getOpponent();
|
||||
}
|
||||
} else if (defined.endsWith("Owner")) {
|
||||
String triggeringType = defined.substring(9);
|
||||
triggeringType = triggeringType.substring(0, triggeringType.length() - 5);
|
||||
|
||||
Reference in New Issue
Block a user