Support Faramir, Prince of Ithilien (#3520)

* Fix Curse of Vitality

* Support Faramir, Prince of Ithilien

* Fix cards

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
This commit is contained in:
tool4ever
2023-07-24 09:17:25 +02:00
committed by GitHub
parent 245a5c5885
commit d01d9d486f
6 changed files with 14 additions and 14 deletions

View File

@@ -1,7 +1,5 @@
package forge.game.ability.effects; package forge.game.ability.effects;
import java.util.List;
import forge.game.ability.AbilityUtils; import forge.game.ability.AbilityUtils;
import forge.game.ability.SpellAbilityEffect; import forge.game.ability.SpellAbilityEffect;
import forge.game.player.Player; import forge.game.player.Player;
@@ -44,10 +42,6 @@ public class LifeGainEffect extends SpellAbilityEffect {
*/ */
@Override @Override
public void resolve(SpellAbility sa) { public void resolve(SpellAbility sa) {
List<Player> tgtPlayers = getDefinedPlayersOrTargeted(sa);
if (tgtPlayers.isEmpty()) {
tgtPlayers.add(sa.getActivatingPlayer());
}
String amount = sa.getParam("LifeAmount"); String amount = sa.getParam("LifeAmount");
boolean variableAmount = amount.equals("AFNotDrawnNum"); boolean variableAmount = amount.equals("AFNotDrawnNum");
int lifeAmount = 0; int lifeAmount = 0;
@@ -57,7 +51,7 @@ public class LifeGainEffect extends SpellAbilityEffect {
lifeAmount = AbilityUtils.calculateAmount(sa.getHostCard(), amount, sa); lifeAmount = AbilityUtils.calculateAmount(sa.getHostCard(), amount, sa);
} }
for (final Player p : tgtPlayers) { for (final Player p : getDefinedPlayersOrTargeted(sa)) {
if (!p.isInGame()) { if (!p.isInGame()) {
continue; continue;
} }

View File

@@ -6,6 +6,8 @@ import java.util.List;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import com.google.common.collect.Iterables;
import forge.game.CardTraitBase; import forge.game.CardTraitBase;
import forge.game.Game; import forge.game.Game;
import forge.game.ability.AbilityUtils; import forge.game.ability.AbilityUtils;
@@ -404,6 +406,10 @@ public class PlayerProperty {
} }
} }
return false; return false;
} else if (property.equals("attackedYouTheirCurrentTurn")) {
if (!Iterables.contains(player.getAttackedPlayersMyTurn(), sourceController)) {
return false;
}
} else if (property.equals("attackedYouTheirLastTurn")) { } else if (property.equals("attackedYouTheirLastTurn")) {
if (!player.getAttackedPlayersMyLastTurn().contains(sourceController)) { if (!player.getAttackedPlayersMyLastTurn().contains(sourceController)) {
return false; return false;

View File

@@ -3,6 +3,6 @@ ManaCost:2 W W
Types:Enchantment Types:Enchantment
T:Mode$ ChangesZone | ValidCard$ Creature.YouCtrl,Planeswalker.YouCtrl | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigDiesToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever a creature or planeswalker you control dies, you may sacrifice CARDNAME. If you do, create a 4/4 white Avatar creature token with flying. T:Mode$ ChangesZone | ValidCard$ Creature.YouCtrl,Planeswalker.YouCtrl | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigDiesToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever a creature or planeswalker you control dies, you may sacrifice CARDNAME. If you do, create a 4/4 white Avatar creature token with flying.
SVar:TrigDiesToken:AB$ Token | Cost$ Sac<1/CARDNAME> | TokenOwner$ You | TokenAmount$ 1 | TokenScript$ w_4_4_avatar_flying SVar:TrigDiesToken:AB$ Token | Cost$ Sac<1/CARDNAME> | TokenOwner$ You | TokenAmount$ 1 | TokenScript$ w_4_4_avatar_flying
T:Mode$ Discarded | ValidCard$ Card.Self | ValidCause$ Card.OppCtrl | Execute$ TrigDiscardedToken | TriggerZones$ Battlefield | TriggerDescription$ When a spell or ability an opponent controls causes you to discard this card, if you control a Plains, create a 4/4 white Avatar creature token with flying. T:Mode$ Discarded | ValidCard$ Card.Self | ValidCause$ Card.OppCtrl | IsPresent$ Plains.YouCtrl | Execute$ TrigDiscardedToken | TriggerZones$ Battlefield | TriggerDescription$ When a spell or ability an opponent controls causes you to discard this card, if you control a Plains, create a 4/4 white Avatar creature token with flying.
SVar:TrigDiscardedToken:DB$ Token | ConditionPresent$ Plains.YouCtrl | ConditionCompare$ GE1 | TokenOwner$ You | TokenAmount$ 1 | TokenScript$ w_4_4_avatar_flying SVar:TrigDiscardedToken:DB$ Token | TokenOwner$ You | TokenAmount$ 1 | TokenScript$ w_4_4_avatar_flying
Oracle:Whenever a creature or planeswalker you control dies, you may sacrifice Ajani's Last Stand. If you do, create a 4/4 white Avatar creature token with flying.\nWhen a spell or ability an opponent controls causes you to discard this card, if you control a Plains, create a 4/4 white Avatar creature token with flying. Oracle:Whenever a creature or planeswalker you control dies, you may sacrifice Ajani's Last Stand. If you do, create a 4/4 white Avatar creature token with flying.\nWhen a spell or ability an opponent controls causes you to discard this card, if you control a Plains, create a 4/4 white Avatar creature token with flying.

View File

@@ -3,6 +3,6 @@ ManaCost:3 R R
Types:Legendary Creature Viashino Shaman Types:Legendary Creature Viashino Shaman
PT:3/4 PT:3/4
K:You may choose not to untap CARDNAME during your untap step. K:You may choose not to untap CARDNAME during your untap step.
A:AB$ GainControl | Cost$ T | ValidTgts$ Dragon | TgtPrompt$ Select target Dragon. | LoseControl$ Untap,LeavesPlay,LoseControl | SpellDescription$ Gain control of target Dragon for as long as you control CARDNAME and CARDNAME remains tapped. A:AB$ GainControl | Cost$ T | ValidTgts$ Dragon | TgtPrompt$ Select target Dragon. | LoseControl$ Untap,LeavesPlay,LoseControl | SpellDescription$ Gain control of target Dragon for as long as you control NICKNAME and NICKNAME remains tapped.
AI:RemoveDeck:Random AI:RemoveDeck:Random
Oracle:You may choose not to untap Hivis of the Scale during your untap step.\n{T}: Gain control of target Dragon for as long as you control Hivis and Hivis remains tapped. Oracle:You may choose not to untap Hivis of the Scale during your untap step.\n{T}: Gain control of target Dragon for as long as you control Hivis and Hivis remains tapped.

View File

@@ -5,9 +5,9 @@ PT:2/4
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a shield counter on target creature an opponent controls. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a shield counter on target creature an opponent controls.
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | CounterType$ SHIELD | AILogic$ Curse SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | CounterType$ SHIELD | AILogic$ Curse
T:Mode$ CounterPlayerAddedAll | ValidObject$ Creature.YouDontCtrl+inRealZoneBattlefield | ValidSource$ You | TriggerZones$ Battlefield | Execute$ TrigTap | TriggerDescription$ Whenever you put one or more counters on a creature you don't control, tap that creature and goad it. It gains trample until your next turn. (Until your next turn, that creature attacks each combat if able and attacks a player other than you if able.) T:Mode$ CounterPlayerAddedAll | ValidObject$ Creature.YouDontCtrl+inRealZoneBattlefield | ValidSource$ You | TriggerZones$ Battlefield | Execute$ TrigTap | TriggerDescription$ Whenever you put one or more counters on a creature you don't control, tap that creature and goad it. It gains trample until your next turn. (Until your next turn, that creature attacks each combat if able and attacks a player other than you if able.)
SVar:TrigTap:DB$ Tap | Defined$ TriggeredCardLKICopy | SubAbility$ DBGoad SVar:TrigTap:DB$ Tap | Defined$ TriggeredObjectLKICopy | SubAbility$ DBGoad
SVar:DBGoad:DB$ Goad | Defined$ TriggeredCardLKICopy | SubAbility$ DBPump SVar:DBGoad:DB$ Goad | Defined$ TriggeredObjectLKICopy | SubAbility$ DBPump
SVar:DBPump:DB$ Pump | Defined$ TriggeredCardLKICopy | KW$ Trample | Duration$ UntilYourNextTurn SVar:DBPump:DB$ Pump | Defined$ TriggeredObjectLKICopy | KW$ Trample | Duration$ UntilYourNextTurn
#Card doesn't make sense to run unless you have 2 or more opponents #Card doesn't make sense to run unless you have 2 or more opponents
AI:RemoveDeck:Random AI:RemoveDeck:Random
Oracle:At the beginning of your upkeep, put a shield counter on target creature an opponent controls.\nWhenever you put one or more counters on a creature you don't control, tap that creature and goad it. It gains trample until your next turn. (Until your next turn, that creature attacks each combat if able and attacks a player other than you if able.) Oracle:At the beginning of your upkeep, put a shield counter on target creature an opponent controls.\nWhenever you put one or more counters on a creature you don't control, tap that creature and goad it. It gains trample until your next turn. (Until your next turn, that creature attacks each combat if able and attacks a player other than you if able.)

View File

@@ -2,7 +2,7 @@ Name:Shadow of the Enemy
ManaCost:3 B B B ManaCost:3 B B B
Types:Sorcery Types:Sorcery
Oracle: Oracle:
A:SP$ ChangeZoneAll | Cost$ 2 B | Origin$ Graveyard | Destination$ Exile | ValidTgts$ Player | TgtPrompt$ Select target player | ChangeType$ Creature | RememberChanged$ True | SubAbility$ DBMayPlay | SpellDescription$ Exile all creature cards from target player's graveyard. You may cast spells from among those cards for as long as they remain exiled, and mana of any type can be spent to cast them. A:SP$ ChangeZoneAll | Origin$ Graveyard | Destination$ Exile | ValidTgts$ Player | TgtPrompt$ Select target player | ChangeType$ Creature | RememberChanged$ True | SubAbility$ DBMayPlay | SpellDescription$ Exile all creature cards from target player's graveyard. You may cast spells from among those cards for as long as they remain exiled, and mana of any type can be spent to cast them.
SVar:DBMayPlay:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ MayPlay | SubAbility$ DBCleanup | Duration$ Permanent | ForgetOnMoved$ Exile SVar:DBMayPlay:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ MayPlay | SubAbility$ DBCleanup | Duration$ Permanent | ForgetOnMoved$ Exile
SVar:MayPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreType$ True | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand | AffectedZone$ Exile | Description$ You may cast spells from among those cards for as long as they remain exiled, and mana of any type can be spent to cast them. SVar:MayPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreType$ True | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand | AffectedZone$ Exile | Description$ You may cast spells from among those cards for as long as they remain exiled, and mana of any type can be spent to cast them.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True