mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- FRF: Added Channel Harm
This commit is contained in:
@@ -275,14 +275,16 @@ public class AbilityUtils {
|
||||
String validDefined = defined.substring("Valid ".length());
|
||||
list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), validDefined.split(","), hostCard.getController(), hostCard);
|
||||
}
|
||||
else if (defined.startsWith("ValidHand ")) {
|
||||
String validDefined = defined.substring("ValidHand ".length());
|
||||
list = CardLists.getValidCards(game.getCardsIn(ZoneType.Hand), validDefined.split(","), hostCard.getController(), hostCard);
|
||||
}
|
||||
else if (defined.startsWith("ValidAll ")) {
|
||||
String validDefined = defined.substring("ValidAll ".length());
|
||||
list = CardLists.getValidCards(game.getCardsInGame(), validDefined.split(","), hostCard.getController(), hostCard);
|
||||
}
|
||||
else if (defined.startsWith("Valid")) {
|
||||
String[] s = defined.split(" ");
|
||||
String zone = s[0].substring("Valid".length());
|
||||
String validDefined = s[1];
|
||||
list = CardLists.getValidCards(game.getCardsIn(ZoneType.smartValueOf(zone)), validDefined.split(","), hostCard.getController(), hostCard);
|
||||
}
|
||||
else {
|
||||
return cards;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
public class DamageDealEffect extends SpellAbilityEffect {
|
||||
|
||||
/* (non-Javadoc)
|
||||
@@ -74,6 +76,12 @@ public class DamageDealEffect extends SpellAbilityEffect {
|
||||
final boolean divideOnResolution = sa.hasParam("DividerOnResolution");
|
||||
|
||||
List<GameObject> tgts = getTargets(sa);
|
||||
if (sa.hasParam("OptionalDecider")) {
|
||||
Player decider = Iterables.getFirst(AbilityUtils.getDefinedPlayers(sa.getHostCard(), sa.getParam("OptionalDecider"), sa), null);
|
||||
if (decider != null && !decider.getController().confirmAction(sa, null, "Do you want to deal " + dmg + " damage to " + tgts + " ?")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Right now for Fireball, maybe later for other stuff
|
||||
if (sa.hasParam("DivideEvenly")) {
|
||||
|
||||
Reference in New Issue
Block a user