mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +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
|
* a card type
|
||||||
* @param sa
|
* @param sa
|
||||||
* a SpellAbility
|
* 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) {
|
public static CardCollectionView filterListByType(final CardCollectionView list, String type, final SpellAbility sa) {
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
@@ -1099,6 +1099,7 @@ public class AbilityUtils {
|
|||||||
players.add(sa.getActivatingPlayer());
|
players.add(sa.getActivatingPlayer());
|
||||||
}
|
}
|
||||||
else if (defined.equals("Opponent")) {
|
else if (defined.equals("Opponent")) {
|
||||||
|
//players.addAll(sa.getActivatingPlayer().getOpponents());
|
||||||
players.add(sa.getActivatingPlayer().getOpponent());
|
players.add(sa.getActivatingPlayer().getOpponent());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -217,7 +217,13 @@ public class PlayEffect extends SpellAbilityEffect {
|
|||||||
if (noManaCost) {
|
if (noManaCost) {
|
||||||
tgtSA = tgtSA.copyWithNoManaCost();
|
tgtSA = tgtSA.copyWithNoManaCost();
|
||||||
} else if (sa.hasParam("PlayMadness")) {
|
} 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 = tgtSA.copyWithDefinedCost(abCost);
|
||||||
tgtSA.getHostCard().setMadness(true);
|
tgtSA.getHostCard().setMadness(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1294,7 +1294,12 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
sbLong.append(keyword.replace(":", " ")).append("\r\n");
|
sbLong.append(keyword.replace(":", " ")).append("\r\n");
|
||||||
} else if (keyword.startsWith("Madness")) {
|
} else if (keyword.startsWith("Madness")) {
|
||||||
String[] parts = keyword.split(":");
|
String[] parts = keyword.split(":");
|
||||||
|
// 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");
|
sbLong.append(parts[0]).append(" ").append(ManaCostParser.parse(parts[1])).append("\r\n");
|
||||||
|
}
|
||||||
} else if (keyword.startsWith("Devour")) {
|
} else if (keyword.startsWith("Devour")) {
|
||||||
final String[] parts = keyword.split(":");
|
final String[] parts = keyword.split(":");
|
||||||
final String extra = parts.length > 2 ? parts[2] : "";
|
final String extra = parts.length > 2 ? parts[2] : "";
|
||||||
|
|||||||
Reference in New Issue
Block a user