mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
*Added AttackersDeclared trigger.
*Converted Lighmine Field.
This commit is contained in:
6
.project
6
.project
@@ -15,15 +15,9 @@
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Lightmine Field
|
||||
ManaCost:2 W W
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
T:Mode$ Attacks | ValidCard$ Creature | Execute$ TrigDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever one or more creatures attack, CARDNAME deals damage to each of those creatures equal to the number of attacking creatures.
|
||||
SVar:TrigDamage:AB$DealDamage | Cost$ 0 | Defined$ TriggeredAttacker | NumDmg$ X
|
||||
T:Mode$ AttackersDeclared | Execute$ TrigDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever one or more creatures attack, CARDNAME deals damage to each of those creatures equal to the number of attacking creatures.
|
||||
SVar:TrigDamage:AB$DealDamage | Cost$ 0 | Defined$ TriggeredAttackers | NumDmg$ X
|
||||
SVar:X:Count$Valid Creature.attacking
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/lightmine_field.jpg
|
||||
|
||||
@@ -4,6 +4,7 @@ import forge.card.cardFactory.CardFactoryUtil;
|
||||
import forge.gui.input.Input;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* <p>PhaseUtil class.</p>
|
||||
@@ -425,7 +426,11 @@ public class PhaseUtil {
|
||||
// Make sure exalted effects get applied only once per combat
|
||||
|
||||
}
|
||||
|
||||
|
||||
HashMap<String,Object> runParams = new HashMap<String,Object>();
|
||||
runParams.put("Attackers", list);
|
||||
AllZone.getTriggerHandler().runTrigger("AttackersDeclared", runParams);
|
||||
|
||||
for (Card c : list)
|
||||
CombatUtil.checkDeclareAttackers(c);
|
||||
AllZone.getStack().unfreezeStack();
|
||||
|
||||
@@ -1343,6 +1343,12 @@ public class AbilityFactory {
|
||||
if (crd instanceof Card) {
|
||||
c = AllZoneUtil.getCardState((Card) crd);
|
||||
}
|
||||
else if (crd instanceof CardList) {
|
||||
for(Card cardItem : (CardList)crd)
|
||||
{
|
||||
cards.add(cardItem);
|
||||
}
|
||||
}
|
||||
} else if (defined.equals("Remembered")) {
|
||||
for (Object o : hostCard.getRemembered()) {
|
||||
if (o instanceof Card) {
|
||||
|
||||
@@ -106,6 +106,8 @@ public class TriggerHandler {
|
||||
ret = new Trigger_Always(mapParams, host, intrinsic);
|
||||
} else if (mode.equals("AttackerBlocked")) {
|
||||
ret = new Trigger_AttackerBlocked(mapParams, host, intrinsic);
|
||||
} else if (mode.equals("AttackersDeclared")) {
|
||||
ret = new Trigger_AttackersDeclared(mapParams, host, intrinsic);
|
||||
} else if (mode.equals("AttackerUnblocked")) {
|
||||
ret = new Trigger_AttackerUnblocked(mapParams, host, intrinsic);
|
||||
} else if (mode.equals("Attacks")) {
|
||||
|
||||
Reference in New Issue
Block a user