mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Adding some code to support for Falkenrath Gorger
This commit is contained in:
@@ -684,7 +684,7 @@ public class AbilityUtils {
|
||||
* a card type
|
||||
* @param sa
|
||||
* a SpellAbility
|
||||
* @return a {@link forge.game.CardCollectionView} object.
|
||||
* @return a {@link forge.game.card.CardCollectionView} object.
|
||||
*/
|
||||
public static CardCollectionView filterListByType(final CardCollectionView list, String type, final SpellAbility sa) {
|
||||
if (type == null) {
|
||||
@@ -1099,6 +1099,7 @@ public class AbilityUtils {
|
||||
players.add(sa.getActivatingPlayer());
|
||||
}
|
||||
else if (defined.equals("Opponent")) {
|
||||
//players.addAll(sa.getActivatingPlayer().getOpponents());
|
||||
players.add(sa.getActivatingPlayer().getOpponent());
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -217,7 +217,13 @@ public class PlayEffect extends SpellAbilityEffect {
|
||||
if (noManaCost) {
|
||||
tgtSA = tgtSA.copyWithNoManaCost();
|
||||
} else if (sa.hasParam("PlayMadness")) {
|
||||
final Cost abCost = new Cost(sa.getParam("PlayMadness"), false);
|
||||
Cost abCost;
|
||||
if ("ManaCost".equals(sa.getParam("PlayMadness"))) {
|
||||
abCost = new Cost(source.getManaCost(), false);
|
||||
} else {
|
||||
abCost = new Cost(sa.getParam("PlayMadness"), false);
|
||||
}
|
||||
|
||||
tgtSA = tgtSA.copyWithDefinedCost(abCost);
|
||||
tgtSA.getHostCard().setMadness(true);
|
||||
}
|
||||
|
||||
@@ -1294,7 +1294,12 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
sbLong.append(keyword.replace(":", " ")).append("\r\n");
|
||||
} else if (keyword.startsWith("Madness")) {
|
||||
String[] parts = keyword.split(":");
|
||||
sbLong.append(parts[0]).append(" ").append(ManaCostParser.parse(parts[1])).append("\r\n");
|
||||
// If no colon exists in Madness keyword, it must have been granted and assumed the cost from host
|
||||
if (parts.length < 2) {
|
||||
sbLong.append(parts[0]).append(" ").append(this.getManaCost()).append("\r\n");
|
||||
} else {
|
||||
sbLong.append(parts[0]).append(" ").append(ManaCostParser.parse(parts[1])).append("\r\n");
|
||||
}
|
||||
} else if (keyword.startsWith("Devour")) {
|
||||
final String[] parts = keyword.split(":");
|
||||
final String extra = parts.length > 2 ? parts[2] : "";
|
||||
|
||||
Reference in New Issue
Block a user