Skip to content

Commit

Permalink
Some cleanup (#6209)
Browse files Browse the repository at this point in the history
  • Loading branch information
tool4ever authored Sep 27, 2024
1 parent ac335a6 commit cb4e0e5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 23 deletions.
11 changes: 0 additions & 11 deletions forge-game/src/main/java/forge/game/card/CardProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,17 +292,6 @@ public static boolean cardHasProperty(Card card, String property, Player sourceC
if (!source.isRemembered(p)) {
return false;
}
} else if (property.startsWith("nonRememberedPlayerCtrl")) {
if (!source.hasRemembered()) {
final Card newCard = game.getCardState(source);
if (newCard.isRemembered(controller)) {
return false;
}
}

if (source.isRemembered(controller)) {
return false;
}
} else if (property.equals("targetedBy")) {
if (!(spellAbility instanceof SpellAbility)) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion forge-gui/res/cardsfolder/c/choose_your_champion.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Types:Scheme
T:Mode$ SetInMotion | ValidCard$ Card.Self | Execute$ ChooseChampion | TriggerZones$ Command | TriggerDescription$ When you set this scheme in motion, target opponent chooses a player. Until your next turn, only you and the chosen player can cast spells and attack with creatures.
SVar:ChooseChampion:DB$ ChoosePlayer | ValidTgts$ Opponent | Choices$ Player | AILogic$ BestAllyBoardPosition | SubAbility$ PrepChamps
SVar:PrepChamps:DB$ Effect | RememberObjects$ ChosenPlayer,You | Name$ Choose Your Champion Scheme | Duration$ UntilYourNextTurn | StaticAbilities$ RestrictAttackers,RestrictCasting
SVar:RestrictAttackers:Mode$ CantAttack | EffectZone$ Command | ValidCard$ Creature.nonRememberedPlayerCtrl | Description$ Until your next turn, only you and the chosen player can attack with creatures.
SVar:RestrictAttackers:Mode$ CantAttack | EffectZone$ Command | ValidCard$ Creature.!RememberedPlayerCtrl | Description$ Until your next turn, only you and the chosen player can attack with creatures.
SVar:RestrictCasting:Mode$ CantBeCast | ValidCard$ Card | Caster$ Player.IsNotRemembered | EffectZone$ Command | Description$ Until your next turn, only you and the chosen player can cast spells.
Oracle:When you set this scheme in motion, target opponent chooses a player. Until your next turn, only you and the chosen player can cast spells and attack with creatures.
2 changes: 1 addition & 1 deletion forge-gui/res/cardsfolder/f/fortunate_few.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name:Fortunate Few
ManaCost:3 W W
Types:Sorcery
A:SP$ RepeatEach | StartingWithActivator$ True | RepeatPlayers$ Player | RepeatSubAbility$ DBChoose | SubAbility$ DBDestroyAll | SpellDescription$ Choose a nonland permanent you don't control, then each other player chooses a nonland permanent they don't control that hasn't been chosen this way. Destroy all other nonland permanents.
SVar:DBChoose:DB$ ChooseCard | Defined$ Player.IsRemembered | Choices$ Permanent.nonLand+nonRememberedPlayerCtrl+IsNotRemembered | RememberChosen$ True | ChoiceZone$ Battlefield | AILogic$ WorstCard
SVar:DBChoose:DB$ ChooseCard | Defined$ Player.IsRemembered | Choices$ Permanent.nonLand+!RememberedPlayerCtrl+IsNotRemembered | RememberChosen$ True | ChoiceZone$ Battlefield | AILogic$ WorstCard
SVar:DBDestroyAll:DB$ DestroyAll | ValidCards$ Permanent.nonLand+IsNotRemembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
Oracle:Choose a nonland permanent you don't control, then each other player chooses a nonland permanent they don't control that hasn't been chosen this way. Destroy all other nonland permanents.
13 changes: 5 additions & 8 deletions forge-gui/res/cardsfolder/k/keen_duelist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ Name:Keen Duelist
ManaCost:1 B
Types:Creature Human Wizard
PT:2/2
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigRepeatEach | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, you and target opponent each reveal the top card of your library. You each lose life equal to the mana value of the card revealed by the other player. You each put the card you revealed into your hand.
SVar:TrigRepeatEach:DB$ RepeatEach | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | RepeatPlayers$ TargetedAndYou | RepeatSubAbility$ DBReveal | SubAbility$ DBRepeatEach
SVar:DBReveal:DB$ Dig | Defined$ Player.IsRemembered | DigNum$ 1 | Reveal$ True | ChangeNum$ All | ChangeValid$ Card | DestinationZone$ Library | RememberChanged$ True
SVar:DBRepeatEach:DB$ RepeatEach | RepeatPlayers$ TargetedAndYou | RepeatSubAbility$ DBImprint | SubAbility$ DBChangeZoneAll
SVar:DBImprint:DB$ Pump | ImprintCards$ ValidAll Card.IsRemembered+nonRememberedPlayerCtrl | SubAbility$ DBLoseLife
SVar:DBLoseLife:DB$ LoseLife | Defined$ Player.IsRemembered | LifeAmount$ X | SubAbility$ DBClearImprint
SVar:DBClearImprint:DB$ Cleanup | ClearImprinted$ True
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigReveal | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, you and target opponent each reveal the top card of your library. You each lose life equal to the mana value of the card revealed by the other player. You each put the card you revealed into your hand.
SVar:TrigReveal:DB$ PeekAndReveal | NoPeek$ True | ValidTgts$ Opponent | Defined$ TargetedAndYou | RememberRevealed$ True | SubAbility$ DBRepeatEach
SVar:DBRepeatEach:DB$ RepeatEach | RepeatPlayers$ TargetedAndYou | RepeatSubAbility$ DBLoseLife | SubAbility$ DBChangeZoneAll
SVar:DBLoseLife:DB$ LoseLife | Defined$ Player.IsRemembered | LifeAmount$ X
SVar:DBChangeZoneAll:DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered | Origin$ Library | Destination$ Hand | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Imprinted$CardManaCost
SVar:X:Count$ValidLibrary Card.IsRemembered+!RememberedPlayerCtrl$CardManaCost
Oracle:At the beginning of your upkeep, you and target opponent each reveal the top card of your library. You each lose life equal to the mana value of the card revealed by the other player. You each put the card you revealed into your hand.
3 changes: 1 addition & 2 deletions forge-gui/src/main/java/forge/gui/card/CardScriptParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,7 @@ private static boolean isValidLegal(final String valid) {
"YouDontCtrl", "OppCtrl", "ChosenCtrl", "DefenderCtrl",
"DefenderCtrlForRemembered", "DefendingPlayerCtrl",
"EnchantedPlayerCtrl", "EnchantedControllerCtrl",
"RememberedPlayer", "RememberedPlayerCtrl",
"nonRememberedPlayerCtrl", "TargetedPlayerCtrl",
"RememberedPlayer", "RememberedPlayerCtrl", "TargetedPlayerCtrl",
"TargetedControllerCtrl", "ActivePlayerCtrl",
"YouOwn", "YouDontOwn", "OppOwn",
"TargetedPlayerOwn", "OwnerDoesntControl", "Other", "Self",
Expand Down

0 comments on commit cb4e0e5

Please sign in to comment.