mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Fixed Heroic
- Fixed FightEffect
This commit is contained in:
@@ -22,7 +22,7 @@ public class FightEffect extends SpellAbilityEffect {
|
|||||||
if (fighters.size() > 1) {
|
if (fighters.size() > 1) {
|
||||||
sb.append(fighters.get(0) + " fights " + fighters.get(1));
|
sb.append(fighters.get(0) + " fights " + fighters.get(1));
|
||||||
}
|
}
|
||||||
else {
|
else if (fighters.size() == 1) {
|
||||||
sb.append(fighters.get(0) + " fights unknown");
|
sb.append(fighters.get(0) + " fights unknown");
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class TriggerPlaneswalkedFrom extends Trigger {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setTriggeringObjects(SpellAbility sa) {
|
public void setTriggeringObjects(SpellAbility sa) {
|
||||||
sa.setTriggeringObject("Card", this.getRunParams().get("Card"));
|
sa.setTriggeringObject("Cards", this.getRunParams().get("Card"));
|
||||||
// The 'Card' triggered object above is actually an array list of the current planes being left,
|
// The 'Card' triggered object above is actually an array list of the current planes being left,
|
||||||
// so the actual source has to be determined differently than usual
|
// so the actual source has to be determined differently than usual
|
||||||
sa.setTriggeringObject("Source", this.hostCard);
|
sa.setTriggeringObject("Source", this.hostCard);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class TriggerPlaneswalkedTo extends Trigger {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setTriggeringObjects(SpellAbility sa) {
|
public void setTriggeringObjects(SpellAbility sa) {
|
||||||
sa.setTriggeringObject("Card", this.getRunParams().get("Card"));
|
sa.setTriggeringObject("Cards", this.getRunParams().get("Card"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,24 +106,7 @@ public class TriggerSpellAbilityCast extends Trigger {
|
|||||||
if (si != null) {
|
if (si != null) {
|
||||||
sa = si.getSpellAbility();
|
sa = si.getSpellAbility();
|
||||||
}
|
}
|
||||||
if (sa.getTargetRestrictions() == null) {
|
|
||||||
if (sa.getTargetCard() == null) {
|
|
||||||
Player targetPl = sa.getTargets().getFirstTargetedPlayer();
|
|
||||||
if (targetPl == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!matchesValid(targetPl, this.mapParams.get("TargetsValid").split(","), this.getHostCard())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (!matchesValid(sa.getTargetCard(), this.mapParams.get("TargetsValid").split(","),
|
|
||||||
this.getHostCard())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (sa.getTargetRestrictions().doesTarget()) {
|
|
||||||
boolean validTgtFound = false;
|
boolean validTgtFound = false;
|
||||||
while (sa != null && !validTgtFound) {
|
while (sa != null && !validTgtFound) {
|
||||||
for (final Card tgt : sa.getTargets().getTargetCards()) {
|
for (final Card tgt : sa.getTargets().getTargetCards()) {
|
||||||
@@ -142,14 +125,9 @@ public class TriggerSpellAbilityCast extends Trigger {
|
|||||||
}
|
}
|
||||||
sa = sa.getSubAbility();
|
sa = sa.getSubAbility();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!validTgtFound) {
|
if (!validTgtFound) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mapParams.containsKey("NonTapCost")) {
|
if (this.mapParams.containsKey("NonTapCost")) {
|
||||||
@@ -203,6 +181,7 @@ public class TriggerSpellAbilityCast extends Trigger {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
public final void setTriggeringObjects(final SpellAbility sa) {
|
public final void setTriggeringObjects(final SpellAbility sa) {
|
||||||
|
|||||||
Reference in New Issue
Block a user