mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
*Added AttackersDeclared trigger.
*Converted Lighmine Field.
This commit is contained in:
6
.project
6
.project
@@ -15,15 +15,9 @@
|
|||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
<buildCommand>
|
|
||||||
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
</buildSpec>
|
||||||
<natures>
|
<natures>
|
||||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
|
|
||||||
</natures>
|
</natures>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ Name:Lightmine Field
|
|||||||
ManaCost:2 W W
|
ManaCost:2 W W
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:no text
|
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.
|
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$ TriggeredAttacker | NumDmg$ X
|
SVar:TrigDamage:AB$DealDamage | Cost$ 0 | Defined$ TriggeredAttackers | NumDmg$ X
|
||||||
SVar:X:Count$Valid Creature.attacking
|
SVar:X:Count$Valid Creature.attacking
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/lightmine_field.jpg
|
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 forge.gui.input.Input;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>PhaseUtil class.</p>
|
* <p>PhaseUtil class.</p>
|
||||||
@@ -426,6 +427,10 @@ public class PhaseUtil {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HashMap<String,Object> runParams = new HashMap<String,Object>();
|
||||||
|
runParams.put("Attackers", list);
|
||||||
|
AllZone.getTriggerHandler().runTrigger("AttackersDeclared", runParams);
|
||||||
|
|
||||||
for (Card c : list)
|
for (Card c : list)
|
||||||
CombatUtil.checkDeclareAttackers(c);
|
CombatUtil.checkDeclareAttackers(c);
|
||||||
AllZone.getStack().unfreezeStack();
|
AllZone.getStack().unfreezeStack();
|
||||||
|
|||||||
@@ -1343,6 +1343,12 @@ public class AbilityFactory {
|
|||||||
if (crd instanceof Card) {
|
if (crd instanceof Card) {
|
||||||
c = AllZoneUtil.getCardState((Card) crd);
|
c = AllZoneUtil.getCardState((Card) crd);
|
||||||
}
|
}
|
||||||
|
else if (crd instanceof CardList) {
|
||||||
|
for(Card cardItem : (CardList)crd)
|
||||||
|
{
|
||||||
|
cards.add(cardItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (defined.equals("Remembered")) {
|
} else if (defined.equals("Remembered")) {
|
||||||
for (Object o : hostCard.getRemembered()) {
|
for (Object o : hostCard.getRemembered()) {
|
||||||
if (o instanceof Card) {
|
if (o instanceof Card) {
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ public class TriggerHandler {
|
|||||||
ret = new Trigger_Always(mapParams, host, intrinsic);
|
ret = new Trigger_Always(mapParams, host, intrinsic);
|
||||||
} else if (mode.equals("AttackerBlocked")) {
|
} else if (mode.equals("AttackerBlocked")) {
|
||||||
ret = new Trigger_AttackerBlocked(mapParams, host, intrinsic);
|
ret = new Trigger_AttackerBlocked(mapParams, host, intrinsic);
|
||||||
|
} else if (mode.equals("AttackersDeclared")) {
|
||||||
|
ret = new Trigger_AttackersDeclared(mapParams, host, intrinsic);
|
||||||
} else if (mode.equals("AttackerUnblocked")) {
|
} else if (mode.equals("AttackerUnblocked")) {
|
||||||
ret = new Trigger_AttackerUnblocked(mapParams, host, intrinsic);
|
ret = new Trigger_AttackerUnblocked(mapParams, host, intrinsic);
|
||||||
} else if (mode.equals("Attacks")) {
|
} else if (mode.equals("Attacks")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user