mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
added support for Bloodthirst X
This commit is contained in:
@@ -1545,10 +1545,14 @@ public class Card extends MyObservable implements Comparable<Card> {
|
|||||||
String kk[] = k.split(" ");
|
String kk[] = k.split(" ");
|
||||||
sbLong.append(keyword.get(i)).append(" (If an opponent was dealt damage this turn, this creature enters the battlefield with ");
|
sbLong.append(keyword.get(i)).append(" (If an opponent was dealt damage this turn, this creature enters the battlefield with ");
|
||||||
sbLong.append(kk[1]).append(" +1/+1 counter");
|
sbLong.append(kk[1]).append(" +1/+1 counter");
|
||||||
if (Integer.parseInt(kk[1]) > 1) {
|
if (kk[1].equals("X")){
|
||||||
sbLong.append("s");
|
sbLong.append("s on it, where X is the damage dealt to your opponents this turn.)").append("\r\n");
|
||||||
|
} else {
|
||||||
|
if (Integer.parseInt(kk[1]) > 1) {
|
||||||
|
sbLong.append("s");
|
||||||
|
}
|
||||||
|
sbLong.append(" on it.)").append("\r\n");
|
||||||
}
|
}
|
||||||
sbLong.append(" on it.)").append("\r\n");
|
|
||||||
} else if (keyword.get(i).startsWith("Modular")) {
|
} else if (keyword.get(i).startsWith("Modular")) {
|
||||||
String numCounters = keyword.get(i).split(" ")[1];
|
String numCounters = keyword.get(i).split(" ")[1];
|
||||||
sbLong.append(keyword.get(i));
|
sbLong.append(keyword.get(i));
|
||||||
|
|||||||
@@ -4892,15 +4892,20 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
int bloodthirst = hasKeyword(card, "Bloodthirst");
|
int bloodthirst = hasKeyword(card, "Bloodthirst");
|
||||||
if (bloodthirst != -1) {
|
if (bloodthirst != -1) {
|
||||||
final int count = Integer.parseInt(card.getKeyword().get(bloodthirst).split(" ")[1]);
|
final String numCounters = card.getKeyword().get(bloodthirst).split(" ")[1];
|
||||||
|
|
||||||
card.addComesIntoPlayCommand(new Command() {
|
card.addComesIntoPlayCommand(new Command() {
|
||||||
private static final long serialVersionUID = -1849308549161972508L;
|
private static final long serialVersionUID = -1849308549161972508L;
|
||||||
|
|
||||||
public void execute() {
|
public void execute() {
|
||||||
if (card.getController().getOpponent().getAssignedDamage() > 0) {
|
if (card.getController().getOpponent().getAssignedDamage() > 0) {
|
||||||
|
int toAdd = -1;
|
||||||
card.addCounter(Counters.P1P1, count);
|
if (numCounters.equals("X")) {
|
||||||
|
toAdd = card.getController().getOpponent().getAssignedDamage();
|
||||||
|
} else {
|
||||||
|
toAdd = Integer.parseInt(numCounters);
|
||||||
|
}
|
||||||
|
card.addCounter(Counters.P1P1, toAdd);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user