Commit Graph

950 Commits

Author SHA1 Message Date
Hans Mackowiak
430dade5b8 Protection rework for Plural removal (#4284)
* Protection rework for Plural removal

* deprecated getSingularType

* Update AbilityUtils.java

getPlural only for Descriptive

* ~ update view

* Update CardChangedWords.java

* Update AbilityUtils.java

fix lowercase color word replacement

* Update Card.java

add changedCardKeywordsByWord to getChangedCardKeywordsList

* Update CardDetailUtil.java

~ update view

* Before resolving apply text changes

---------

Co-authored-by: TRT <>
2023-12-10 17:04:43 +03:00
Paul Hammerton
054e0b984e Migrate released card scripts from upcoming 2023-12-03 11:02:50 +00:00
Northmoc
1a57062b94 LCI - Craft implementation 2023-11-29 19:52:09 -05:00
tool4ever
c6912b2633 Fix scripts affecting battles (#4229)
* Fix scripts affecting battles

* Optimize AI payment order so rarer shard sources are used first

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2023-11-27 21:57:48 +03:00
tool4ever
9da07ed582 Update undo logic (#4186)
* Update undo logic

* Fix NPE
2023-11-22 17:59:54 +01:00
Northmoc
708eca9f75 spacing 2023-11-21 13:15:45 -05:00
Agetian
8e0bc63a8b AI framework to improve sacrificing endangered cards + several AI hints (Stoneforge Mystic, Atog, others) and improvements. (#4014)
* - Implement a fallback mechanism in case getting a card by name and edition fails for whatever reason.

* - Patch up pulling a card without filters in All Card Variants mode.

* - Sacrifice creatures when they're endangered (currently works for
AF LifeGain, LifeLose, and any AFs that do not have phase-based AI restrictions or other factors that will prevent instant speed activation)

* - Tweaks to the requirements for the AI.
- Some AI enablement.

* - Account for non-creature endangered objects

* - Flag Wall of Limbs as RemAIDeck for now.

* - Support for AF PutCounter.

* - Clean up.

* - Logic fix for AF PutCounter.

* - Clean up.

* - Logic tweak/fix for AF Pump.

* - Another slight tweak.

* - Some AI hint fixes/additions.

* - Some AI hint fixes/additions.

* - Improve timing for AF LifeGain/LifeLose.

* - AI profile option for default SacCost AI preference.

* - Default Sacrifice AI preference master toggle.

* - Stoneforge Mystic AI hint.

* - For now, keep the default pref SacCost toggle to the Experimental AI and at minimum values (too extreme for general use).

* - AI hint: Cryptbreaker

* - Don't auto-sac creatures that evaluate above a given threshold, sac smaller CMC first

* - Lower the priority of cards that have a self-sacrifice activated ability

* - Revert the evaluation modification until a better solution is found.

* - AI hint for Hallowed Moonlight.

* - AI hint for Winds of Abandon (AI casts the non-overloaded version in Main 1, so cast the other one in Main 1 as well to be able to prioritize/choose)

* - AI logic for The One Ring.

* - Some logic tweaks/fixes.

* - Winds of Abandon: use the AI logic hint like other similar non-permanent spells.

* - Fix logic for default sacrifice priorities.
- Mark P9 Mox, Black Lotus, and Lotus Petal cards as bad for AI sacrifice.

* - More logic fixes.

* - One more logic fix.

* - Revert the AIDontSacrifice hint for now.

* - Revert Tinker as well

* - Limit LifeLoseAi sac logic to threatened cards.

* - Logic tweak.

* - Logic tweak.

* - Simplify check (part already checked above).

* - Some more minor cleanup.

* - AI shouldn't sacrifice things mid-combat in presence of Trample or Banding because of altered combat rules (likely to backfire/result in a misplay)
- Minor cleanup.

* - A [hacky] way to make the AI understand Anticognition and Bring the Ending.

* - Fix imports.

* - Avoid a crash by ensuring that the AI parameter indeed points to an AI player (and not e.g. predicting/simulating human decisions at the moment)

* - Do not try to sacrifice a card in an attempt to regenerate it

* - Clean up for AiController mustRespond

* - Suppress recursive checkSacrificeCost when called from the predictive code.
- Trample only matters for the attacking side when checking for threatened card SacCost requirements

* - Naming convention.

* - NPE guard.

* - Recommended tweaks and fixes.

* - Don't override X payment for a triggered ability (e.g. Spiteful Banditry)

* - A better attempt at handling X inside trigger code.

* - Process AI logic for EffectAi from triggered abilities.

* - Improve Black Lotus AI by handling it as if it were a Mana Ritual card when processing ManaEffectAi.

* - AI property guarded check + meaningful default for potential non-AI calls
2023-11-05 22:21:11 +03:00
tool4ever
c54133f1ad Fix Cyber Conversion turning face-down card face-up again (#3986)
* Fix Cyber Conversion turning face-down card face-up again

* Tweak AI

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
Co-authored-by: TRT <>
2023-10-28 13:08:40 +03:00
tool4EvEr
7c45cb7653 Update scripts 2023-10-22 23:13:19 +02:00
tool4ever
437d64dc08 Support for Zygon Infiltrator (#3937)
* Support for Zygon Infiltrator

* 614.13a

* Fix filename

* Clean up

* Account for Chains of Mephistopheles

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2023-10-21 21:55:39 +03:00
kevlahnota
e7e0afb65e Update cards CantAttack 2023-10-19 17:04:40 +08:00
tool4EvEr
73c32df030 Clean up 2023-10-14 22:19:18 +02:00
tool4ever
868190af25 Some fixes (#3817)
* Fix how trigger evaluates the event

* Support XMaxLimit

* Clean up

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2023-09-26 23:24:26 +03:00
tool4ever
7dfd44eaef Update Gods (#3793)
* Update Gods

* Fix script

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2023-09-19 16:30:12 +03:00
tool4ever
e233129975 Support for Throne of Eldraine (#3757)
* Fix scripts

* Fix Reflect

* Refactor mana restrictions from SA

* Update scripts

* AltCost fix

* Fix Muraganda Petroglyphs affecting Security Rhox

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2023-09-11 06:04:13 +03:00
paulsnoops
14b5da90d8 UB/SLX rebranded script merging 2023-09-02 14:19:26 +01:00
tool4EvEr
45a59fe77a Treat rebranded versions extra 2023-09-01 21:28:30 +02:00
paulsnoops
dd4c47c9ce Migrate card scripts from upcoming 2023-08-06 09:24:14 +01:00
Hans Mackowiak
c15542f949 Regenerate rework (#3385)
* CardFactoryUtil: remove false keyword

* CardFactoryUtil: remove wrong regenerate Keyword

* CantRegenerate as Static

* ~small fixes

* RegenerationAbility as SubAbility to the Regeneration Effect

* Card: use shieldCount instead of Collection

* remove deprecated trigger

* fix AiLogic vs AILogic

* EffectAi: start of logic for CantRegenerate

* EffectAi: try to do StackPeek for CantRegenerate

* ~ use wither damage

* AI prediction against Damage

* CantRegenerate: begin logic against Combat Damage

* AnimateAi: start logic for Bone Shaman

* fix Runesword
2023-07-29 10:58:14 +03:00
Chris H
abb2ff3cdf Ring tempts you (#3453)
* Ring tempts you WIP

* add ring triggers

* Update RingTemptsYouEffect.java

* Add files via upload

* Update TriggerRingbearerChosen.java

* Update token-images.txt

* Update TrackableProperty.java

* Update CardView.java

* Update CardRenderer.java

* Update RingTemptsYouEffect.java

fix crash

* Update Card.java

* Update CardView.java

* Update TrackableProperty.java

* Update StaticAbilityContinuous.java

* Update StaticEffect.java

* Update RingTemptsYouEffect.java

* update sprite_manaicons.png

* Update FSkinProp.java

* Update FSkinImage.java

* Update CardFaceSymbols.java

* Update CardRenderer.java

* update trigger

* update desktop symbol, add aragorn company leader

* update cleanup, add bilbo, add birthday escape

* update cleanup

* add 3 cards

* add five cards

* add two cards

* update aragorn,update bombadil, add two cards

* add ten cards

* Update horses_of_the_bruinen.txt

* add dunedain rangers + cleanup

* Update gollums_bite.txt

* update cleanup

* add six cards

* delete unnecessary file

* Update rangers_firebrand.txt

* add two cards, add RingTemptedYou playerproperty

* update frodo, add three cards

* update sauron, samwise, add two cards

* Update sauron_the_dark_lord.txt

* update validplayer

* add six cards

* update smeagol

* update sauron ransom two piles

* add four cards

* add three cards

* update card scripts

* Update war_of_the_last_alliance.txt

* update scripts, update ringbearer

* update CardDetailUtil

* remove unused param

* Update affected

* remove unnecesary variables

* update

* update scripts

* update RingTemptsYouEffect

* fix cantblockby RingTemptsYouEffect.java

* The Ring: use numTemptYou for RingLevel

* Update dunedain_rangers.txt

* Update jaces_defeat.txt

* update lord of the nazgul

* fix theRing CardView

* update ringEffect, update translation

* update translation

* update gamestate

* replace switch with if else

* fix effect

* update gamestate, translation

* update restartgameeffect, remove unneeded clearRingBearer

---------

Co-authored-by: Anthony Calosa <anthonycalosa@gmail.com>
Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
Co-authored-by: Hans Mackowiak <hanmac@gmx.de>
2023-07-26 20:07:41 +03:00
tool4ever
d01d9d486f 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>
2023-07-24 10:17:25 +03:00
tool4ever
69d5e1e9da Manifest: Fix missing ChangesZoneAll (#3510)
* Crash fix

* Fix logic

* Fix missing ChangesZoneAll

* Fix scripts

* Clean up

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2023-07-22 07:02:21 +03:00
tool4ever
c1a265f5cc Support scripted switching to different trigger context (#3349)
* Support scripted switching to different trigger context
2023-07-20 10:34:31 +02:00
tool4EvEr
5281bace8e Fix scripts 2023-07-18 22:20:30 +02:00
Northmoc
44388fe3a2 MAT: ob_nixilis_captive_kingpin.txt + support (#3023)
* old card tweaks

* MAT: ob_nixilis_captive_kingpin.txt + support

* Single damage event always gets processed into single life loss too

* Some unless cost are simultaneous
2023-07-17 07:50:33 +00:00
tool4EvEr
40c93acbaa Fix Doubling Cube producing C out of nothing if floating colors have gap 2023-07-12 12:05:22 +02:00
Agetian
dbc2a5b5eb AI: Various logic fixes and improvements (#3416)
* - Fix logic for Elderscale Wurm damage prediction

* - AI logic hint for Tempting Wurm
- Several related AI hint fixes (cards in hand don't have a controller set)

* - Implement AI logic for Grothama, All-Devouring.

* - AI shouldn't fight its own Grothama for card draw (leads to silly results).

* - Attempt two at fixing Elderscale Wurm damage preditions.

* - Improve banding AI so that the AI knows how to tank damage from Trample when the other possibility is multiple chump blockers.

* - Clean up

* - Attempt to defer checking for "...as if it were unblocked" static until after the Banding blocker(s) are assigned.
- Clean up

* - Clean up
2023-07-06 18:01:59 +03:00
Agetian
54acfaff2c - Add AI support for Banding-granting cards 2023-07-04 20:07:54 +03:00
tool4ever
e6524f9e3f Support for The Balrog, Durin's Bane (#3321)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2023-06-23 05:55:09 +03:00
tool4ever
c9425270d3 Fix AnimateAll / AI check creating unwanted ending commands (#3296)
* Fix AnimateAll / AI check creating unwanted ending commands

* Fix crash with PW

* Clean up

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2023-06-19 13:39:18 +03:00
tool4ever
9ace1978f9 Script updates (#3289)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2023-06-18 05:49:33 +03:00
Agetian
26de52f2b3 Several AI improvements (#3284)
* - Improved Blitz AI support (will cast in Main 1 if viable).
- Hold for Ransom AI hint to actually use the ability when able.
- Basic AI support for Grisly Sigil so that at least it doesn't fizzle.
- Basic BranchAi framework, currently will mostly just return true, but may be used for special logic when needed.

* - Only choose from opponent's cards for Grisly Sigil.

* - Simplify implementation.

* - Minor style fix.
2023-06-17 18:30:08 +03:00
tool4EvEr
b363702146 Clean up 2023-06-12 14:17:08 +02:00
tool4ever
4bc8c05a5e Attack fixes (#3241) 2023-06-11 13:21:33 +00:00
tool4ever
ba1d3fbe43 Clean up (#3225) 2023-06-09 11:47:59 +00:00
Hans Mackowiak
8f1100dff3 Amass type (#3222)
* AmassEffect: add Type parameter

* fix AmassAi

* update editions tokenscripts

* Update AmassEffect.java

early return if no Army could be created
2023-06-09 12:56:46 +03:00
tool4EvEr
2b0072ec09 Cleanup more ResolvingChecks 2023-06-04 12:25:03 +02:00
tool4ever
65d385d531 Fix DeckHints only finding SimpleKeyword (#3191)
* Fix DeckHints only finding SimpleKeyword

* Reveal clash correctly

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2023-06-03 13:58:23 +03:00
tool4EvEr
c1d40f05c6 Some script updates 2023-06-01 20:05:10 +02:00
Anthony Calosa
08cdc763bf Update heirloom_mirror_inherited_fiend.txt 2023-05-30 06:51:09 +08:00
paulsnoops
c399799910 Migrate card scripts: MOM, MOC, MAT 2023-05-12 14:26:26 -04:00
Northmoc
7f7e8f0ea0 Merge pull request #3052 from tool4ever/cardfix05
Fix outdated TargetMin
2023-05-02 13:59:01 -04:00
Northmoc
c3f0e0ce10 MAT: remaining card scripts (#3041)
* MAT: remaining card scripts

* Update quirion_beastcaller.txt

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2023-05-02 19:45:44 +03:00
tool4EvEr
901f546dd2 Fix outdated TargetMin 2023-05-02 13:14:01 +02:00
Northmoc
b930e2be97 MOC: Chaos Ensues!! 2023-04-21 17:09:54 -04:00
friarsol
e96fbb968b Any (E-I) 2023-04-17 21:06:57 -04:00
tool4EvEr
6103c7b657 Clean up descriptions 2023-04-13 22:30:12 +02:00
Northmoc
219b06a46a hidetsugu_devouring_chaos.txt better 2023-04-13 12:30:15 -04:00
Northmoc
0a82769405 add some battle cards 2023-04-13 10:32:57 -04:00
tool4ever
76a2023745 Clean up (#2907) 2023-04-12 20:48:12 +00:00