mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Merge branch 'patch' into 'master'
C19 See merge request core-developers/forge!2017
This commit is contained in:
@@ -255,6 +255,8 @@ public class PumpEffect extends SpellAbilityEffect {
|
||||
replaced = host.getChosenType();
|
||||
} else if (defined.equals("CardUIDSource")) {
|
||||
replaced = "CardUID_" + String.valueOf(host.getId());
|
||||
} else if (defined.equals("ActivatorName")) {
|
||||
replaced = sa.getActivatingPlayer().getName();
|
||||
}
|
||||
for (int i = 0; i < keywords.size(); i++) {
|
||||
keywords.set(i, TextUtil.fastReplace(keywords.get(i), defined, replaced));
|
||||
|
||||
@@ -119,8 +119,9 @@ public class SacrificeEffect extends SpellAbilityEffect {
|
||||
|
||||
if (sa.hasParam("Random")) {
|
||||
choosenToSacrifice = Aggregates.random(validTargets, Math.min(amount, validTargets.size()), new CardCollection());
|
||||
}
|
||||
else {
|
||||
} else if (sa.hasParam("OptionalSacrifice") && !p.getController().confirmAction(sa, null, "Do you want to sacrifice?")) {
|
||||
choosenToSacrifice = CardCollection.EMPTY;
|
||||
} else {
|
||||
boolean isOptional = sa.hasParam("Optional");
|
||||
boolean isStrict = sa.hasParam("StrictAmount");
|
||||
int minTargets = isOptional ? 0 : amount;
|
||||
|
||||
@@ -5333,6 +5333,11 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
if (source.getController().equals(chosenPlayer)) {
|
||||
return true;
|
||||
}
|
||||
} else if (kw.startsWith("Protection from opponent of ")) {
|
||||
final String playerName = kw.substring("Protection from opponent of ".length());
|
||||
if (source.getController().isOpponentOf(playerName)) {
|
||||
return true;
|
||||
}
|
||||
} else if (kw.startsWith("Protection from ")) {
|
||||
final String protectType = CardType.getSingularType(kw.substring("Protection from ".length()));
|
||||
if (source.getType().hasStringType(protectType)) {
|
||||
|
||||
@@ -353,6 +353,17 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
return other != this && other != null && (other.teamNumber < 0 || other.teamNumber != teamNumber);
|
||||
}
|
||||
|
||||
public boolean isOpponentOf(String other) {
|
||||
Player otherPlayer = null;
|
||||
for (Player p : game.getPlayers()) {
|
||||
if (p.getName().equals(other)) {
|
||||
otherPlayer = p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return isOpponentOf(otherPlayer);
|
||||
}
|
||||
|
||||
public final boolean setLife(final int newLife, final Card source) {
|
||||
boolean change = false;
|
||||
// rule 118.5
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Name:Second Harvest
|
||||
ManaCost:2 G G
|
||||
Types:Instant
|
||||
A:SP$ CopyPermanent | Cost$ 2 G G | RepeatSubAbility$ DBClone | Defined$ Valid Permanent.token+YouCtrl | AILogic$ DuplicatePerms | SpellDescription$ For each token you control, create a token that's a copy of that permanent.
|
||||
A:SP$ CopyPermanent | Cost$ 2 G G | Defined$ Valid Permanent.token+YouCtrl | AILogic$ DuplicatePerms | SpellDescription$ For each token you control, create a token that's a copy of that permanent.
|
||||
AI:RemoveDeck:Random
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/second_harvest.jpg
|
||||
Oracle:For each token you control, create a token that's a copy of that permanent.
|
||||
|
||||
12
forge-gui/res/cardsfolder/upcoming/archfiend_of_spite.txt
Normal file
12
forge-gui/res/cardsfolder/upcoming/archfiend_of_spite.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Name:Archfiend of Spite
|
||||
ManaCost:5 B B
|
||||
Types:Creature Demon
|
||||
PT:6/6
|
||||
K:Flying
|
||||
T:Mode$ DamageDone | ValidSource$ Card.OppCtrl | ValidTarget$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigSacrifice | TriggerDescription$ Whenever a source an opponent controls deals damage to CARDNAME, that source’s controller loses that much life unless they sacrifice that many permanents.
|
||||
SVar:TrigSacrifice:DB$ Sacrifice | Defined$ TriggeredSourceController | SacValid$ Permanent | Amount$ X | References$ X | StrictAmount$ True | OptionalSacrifice$ True | RememberSacrificed$ True | SubAbility$ DBCurseDamage
|
||||
SVar:DBCurseDamage:DB$ DealDamage | Defined$ TriggeredSourceController | NumDmg$ X | References$ X | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0 | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:X:TriggerCount$DamageAmount
|
||||
K:Madness:3 B B
|
||||
Oracle:Flying\nWhenever a source an opponent controls deals damage to Archfiend of Spite, that source’s controller loses that much life unless they sacrifice that many permanents.\nMadness {3}{B}{B} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)
|
||||
7
forge-gui/res/cardsfolder/upcoming/cliffside_rescuer.txt
Normal file
7
forge-gui/res/cardsfolder/upcoming/cliffside_rescuer.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Name:Cliffside Rescuer
|
||||
ManaCost:1 W
|
||||
Types:Creature Kor Soldier
|
||||
PT:2/2
|
||||
K:Vigilance
|
||||
A:AB$ Pump | Cost$ T Sac<1/CARDNAME> | ValidTgts$ Permanent.YouCtrl | TgtPrompt$ Select target permanent you control | KW$ Protection from opponent of ActivatorName | DefinedKW$ ActivatorName | SpellDescription$ Target permanent you control gets protection from each opponent until end of turn.
|
||||
Oracle:Vigilance\n{T}, Sacrifice Cliffside Rescuer: Target permanent you control gets protection from each opponent until end of turn.
|
||||
5
forge-gui/res/cardsfolder/upcoming/hate_mirage.txt
Normal file
5
forge-gui/res/cardsfolder/upcoming/hate_mirage.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
Name:Hate Mirage
|
||||
ManaCost:3 R
|
||||
Types:Sorcery
|
||||
A:SP$ CopyPermanent | Cost$ 3 R | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select up to two target creatures you don't control | TargetMin$ 0 | TargetMax$ 2 | PumpKeywords$ Haste | AtEOT$ Exile | AILogic$ BeforeCombat | SpellDescription$ Choose up to two target creatures you don't control. For each of those creatures create a token that is a copy of those creatures. These tokens gain Haste. Exile them at the beginning of the next end step.
|
||||
Oracle:Choose up to two target creatures you don't control. For each of those creatures create a token that is a copy of those creatures. These tokens gain Haste. Exile them at the beginning of the next end step.
|
||||
Reference in New Issue
Block a user