mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
TriggerFullyUnlock: Trigger used for Eerie (#6052)
This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
package forge.game.trigger;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import forge.game.ability.AbilityKey;
|
||||||
|
import forge.game.card.Card;
|
||||||
|
import forge.game.spellability.SpellAbility;
|
||||||
|
import forge.util.Localizer;
|
||||||
|
|
||||||
|
public class TriggerFullyUnlock extends Trigger {
|
||||||
|
|
||||||
|
public TriggerFullyUnlock(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;
|
||||||
|
}
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -85,6 +85,7 @@ public enum TriggerType {
|
|||||||
FlippedCoin(TriggerFlippedCoin.class),
|
FlippedCoin(TriggerFlippedCoin.class),
|
||||||
Forage(TriggerForage.class),
|
Forage(TriggerForage.class),
|
||||||
Foretell(TriggerForetell.class),
|
Foretell(TriggerForetell.class),
|
||||||
|
FullyUnlock(TriggerFullyUnlock.class),
|
||||||
GiveGift(TriggerGiveGift.class),
|
GiveGift(TriggerGiveGift.class),
|
||||||
Immediate(TriggerImmediate.class),
|
Immediate(TriggerImmediate.class),
|
||||||
Investigated(TriggerInvestigated.class),
|
Investigated(TriggerInvestigated.class),
|
||||||
|
|||||||
Reference in New Issue
Block a user