-
Notifications
You must be signed in to change notification settings - Fork 571
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
240 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
forge-game/src/main/java/forge/game/trigger/TriggerUnlockDoor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package forge.game.trigger; | ||
|
||
import java.util.Map; | ||
|
||
import forge.game.ability.AbilityKey; | ||
import forge.game.card.Card; | ||
import forge.game.card.CardState; | ||
import forge.game.spellability.SpellAbility; | ||
import forge.util.Localizer; | ||
|
||
public class TriggerUnlockDoor extends Trigger { | ||
|
||
public TriggerUnlockDoor(final Map<String, String> params, final Card host, final boolean intrinsic) { | ||
super(params, host, intrinsic); | ||
} | ||
|
||
@Override | ||
public boolean performTest(Map<AbilityKey, Object> runParams) { | ||
if (!matchesValidParam("ValidCard", runParams.get(AbilityKey.Card))) { | ||
return false; | ||
} | ||
|
||
if (!matchesValidParam("ValidPlayer", runParams.get(AbilityKey.Player))) { | ||
return false; | ||
} | ||
|
||
if (hasParam("ThisDoor")) { | ||
CardState state = (CardState) runParams.get(AbilityKey.CardState); | ||
if (!getCardState().equals(state)) { | ||
return false; | ||
} | ||
} | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public void setTriggeringObjects(SpellAbility sa, Map<AbilityKey, Object> runParams) { | ||
sa.setTriggeringObjectsFrom(runParams, AbilityKey.Card, AbilityKey.Player); | ||
} | ||
|
||
@Override | ||
public String getImportantStackObjects(SpellAbility sa) { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append(Localizer.getInstance().getMessage("lblPlayer")).append(": ").append(sa.getTriggeringObject(AbilityKey.Player)); | ||
sb.append(", ").append(Localizer.getInstance().getMessage("lblCard")).append(": ").append(sa.getTriggeringObject(AbilityKey.Card)); | ||
return sb.toString(); | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
forge-gui/res/cardsfolder/upcoming/glassworks_shattered_yard.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Name:Glassworks | ||
ManaCost:2 R | ||
Types:Enchantment Room | ||
T:Mode$ UnlockDoor | ValidPlayer$ You | ThisDoor$ True | Execute$ TrigDamage | TriggerDescription$ When you unlock this door, this Room deals 4 damage to target creature an opponent controls. | ||
SVar:TrigDamage:DB$ DealDamage | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | NumDmg$ 4 | ||
AlternateMode:Split | ||
Oracle:(You may cast either half. That door unlocks on the battlefield. As a sorcery, you may pay the mana cost of a locked door to unlock it.)\nWhen you unlock this door, this Room deals 4 damage to target creature an opponent controls. | ||
|
||
ALTERNATE | ||
|
||
Name:Shattered Yard | ||
ManaCost:4 R R | ||
Types:Enchantment Room | ||
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigAllDamage | TriggerDescription$ At the beginning of your end step, this Room deals 1 damage to each opponent. | ||
SVar:TrigAllDamage:DB$ DamageAll | ValidPlayers$ Player.Opponent | NumDmg$ 1 | ||
Oracle:(You may cast either half. That door unlocks on the battlefield. As a sorcery, you may pay the mana cost of a locked door to unlock it.)\nAt the beginning of your end step, this Room deals 1 damage to each opponent. |