Commit Graph

4208 Commits

Author SHA1 Message Date
tool4ever
d4a981379f Fix mandatory (#3334)
* Fix mandatory

* Fix Retether crash
2023-06-25 10:44:50 +00:00
Agetian
9da75737c3 AI: AttachAi should avoid enchanting or equipping crewed vehicles (#3303)
* - AI: AttachAi should avoid enchanting or equipping crewed vehicles

* - Attempt to detect attachments that can attach to things other than creatures.
2023-06-21 18:53:12 +03:00
tool4ever
9de61f8be3 Fix UnlessCost breaking if spell changed controllers (#3298)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2023-06-19 18:48:12 +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
Agetian
aa4c5e7cde ChangeZone AI: bail if ChangeNum is a variable and will be 0 (#3295)
* - Clean up the old (and disabled) version of the puzzle file.

* - AI NeedsToPlay hint for Traverse the Outlands.

* - AI: ChangeZone should bail if X=0 in ChangeNum
2023-06-18 18:40:09 +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
5e6c433a42 Fix AI not being able to use mana from tapped sources (#3264)
* Fix AI not being able to use mana from tapped sources

* Clean up

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2023-06-14 16:28:39 +03:00
Agetian
582f949791 - Simplify source lookup 2023-06-12 18:56:18 +03:00
Agetian
4b9ff0d23f - For Dragon's Fire, only reveal stuff if power is 4 or greater. 2023-06-12 18:39:33 +03:00
Agetian
83b8cacdd4 - More robust RevealOrChoose detection 2023-06-12 18:24:29 +03:00
Agetian
59e8c5aab3 - Fix imports + avoid using variable assignment 2023-06-12 18:23:05 +03:00
Agetian
67e0610d38 - Add logic for RevealOrChoose cost for the AI (Dragon's Fire) 2023-06-12 18:21:00 +03:00
tool4ever
900f8d2406 Consider fog effects ruining assaults (#3251)
* Consider fog effects ruining assaults

* Fix Open the Way

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2023-06-12 10:43:08 +03:00
Agetian
eb83a1006c AI: simple Reveal logic, example implementation for Delver of Secrets (#3242)
* - Fix rankings for Tura Kennerud, Skyknight

* - Implement simple logic for revealing the cards to AI through the memory set.
- Implement an example logic (for Delver of Secrets) where it matters.

* - Change the comment for REVEALED_CARDS

* - Simplify the implementation for reveal with List<CardView>

* - Use confirmAction params to pass the revealed cards to PeekAndRevealAi.

* - Fix imports.
2023-06-11 22:17:48 +03:00
tool4ever
9bdb08cde6 Clean up attack logic vs vehicles (#3247)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2023-06-11 22:05:08 +03:00
tool4ever
4bc8c05a5e Attack fixes (#3241) 2023-06-11 13:21:33 +00:00
Agetian
a27f3a9550 AI: Account for transformable cards (e.g. Incubator tokens) when considering defenders (#3232)
* - AI: Account for transformable cards (e.g. Incubator tokens) when looking for possible defenders.

* - Check if the transformed card is actually a creature

* - Some recommended improvements to the logic
- Comment out a block of code which might not be as useful under the current rules and with contemporary cards anymore

* - Style fix

* - Attempt to count the total mana spent on transforming stuff when determining how many extra defenders are available.

* - Check pay costs for Animate as well as for Transform.
- NPE guard for pay costs check.
2023-06-11 12:14:12 +03: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
Agetian
86bd82aa37 - Fix Entreat the Angels AI while attempting to maintain the fix for the forced cast. (#3214) 2023-06-06 19:52:30 +02:00
Agetian
f8814df5fb Improve AI playability for Nissa, Genesis Mage (#3208)
* - Improve AI playability for Nissa, Genesis Mage.

* - Check the root ability for Planeswalker costs in activateForCost.
- UntapAi: Reset targets earlier so that they don't linger on the SA (fixes the AI mistakenly assuming that something has already been targeted by the API when just starting a new iteration of the check).

* - Fix imports.
2023-06-06 11:44:41 +03:00
Anthony Calosa
b45d543e1a include setcode and artid for gamestate 2023-05-31 11:55:59 +08:00
Agetian
a1a24b3270 - Fix AI not playing Jhoira in MoJhoSto. (#3160) 2023-05-27 12:06:20 +00:00
tool4EvEr
d4030e0f1d Treat replaceAbilityText bandaids 2023-05-25 22:13:03 +02:00
TRT
05c34c1459 Add TODO 2023-05-22 10:53:21 +02:00
TRT
0230d29a4f Tweaks 2023-05-22 07:53:50 +02:00
tool4EvEr
3a8213fcca Chain comparators correctly 2023-05-21 23:59:37 +02:00
Michael Kamensky
0824842f1d - Use Round instead of Ceil (for hopefully a bit more granularity). 2023-05-21 16:27:51 +03:00
Michael Kamensky
456f1af310 - Attempt to make a formula for evaluating relative priority of creature spells. 2023-05-21 16:26:30 +03:00
Michael Kamensky
0e4ac8859c - AI: always evaluate creatures via evaluateCreature when deciding priority (better approach) 2023-05-21 12:48:57 +03:00
Michael Kamensky
581c25c610 - AI: always evaluate creatures via evaluateCreature when deciding priority. 2023-05-21 08:47:19 +03:00
Michael Kamensky
76753886e7 - Improve AI for Tempered Veteran. 2023-05-20 14:38:42 +03:00
Agetian
1a76a7e81f AI: Evaluate creature spells when deciding between two spells with the same CMC (#3133)
* - Fix the name of the swamp tribal town.

* - Update deck conversion toolchain to the one that was used for the May 2023 MTGDecks.net archive update.

* - Evaluate creature spells when deciding priority for two spells with the same CMC

* - Evaluate the card based on its state.

* - Evaluate the card based on its state, wrapper approach.
2023-05-18 16:19:14 +03:00
tool4ever
6de7dd6bcc Use current shard when trying to pay with combo mana (#3130)
* Use current shard when trying to pay with combo mana
2023-05-18 07:21:08 +00:00
tool4ever
b397be8cea PlayAi tweak (#3127)
Co-authored-by: TRT <>
2023-05-17 13:37:18 +03:00
Agetian
345db4e2c7 Fix AI not choosing to fight when putting counters from a trigger (#3126)
* - Fix the name of the swamp tribal town.

* - Fix AILogic$ Fight when checked from a trigger.

* - Move the code to a better location.

* - Only return in the FightAi branch if canFightAi succeeded.

* - Remove a comment for now, since the AI logic check is different compared to the one in checkApiLogic.
2023-05-17 13:31:58 +03:00
Agetian
6753ad23ad AI: Fix counters calculation for Wildborn Preserver activation (#3119)
* - Remove legacy hacky code that's apparently not needed anymore.

* - Fix imports.

* - Restore the original code but tweak it to hopefully accomodate for Wildborn Preserver.

* - Clean up / clarify.

* Remove fake SVar

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2023-05-16 21:42:48 +03:00
Agetian
38990aff32 Battle AI support + improve Battle mechanics support (#3107)
* - First draft of (very sketchy) Battle AI code.

* - Imports fix.

* - Slightly cleaner refreshCombatants.

* - Update Combat to allow the protecting player to participate in declaring blocks to defend a battle.

* - Update AiBlockController in order to allow the AI to participate in defending battles it's protecting.

* Clean up

* - Minor cleanup.

* Fix checking backside

* Add TODO

* Fix missing combat removal

* - Suggested minor cleanup.

* - Fix imports.

* - Improve support for battles in getAllPossibleDefenders.

* - AI: prefer own Battles before choosing allied Battles.

* Fix ClassCastException

---------

Co-authored-by: TRT <>
2023-05-15 19:56:31 +03:00
Agetian
71362ce82b Update support for Meld in GameState/Puzzle Mode. (#3078)
* - Simplify MeldedWith support in GameState (as a parameter for Meld).

* - Maintain support for old-style "|Meld" game states just in case.
2023-05-08 14:12:33 +02:00
Michael Kamensky
f4984495f4 - Add support for MeldedWith in Game State.
- Add proper support for PS_ONE3 (goal and all).
2023-05-08 14:08:46 +03:00
Hans Mackowiak
bb3709ebad CardFactory: Token Copy of transforming permanent 2023-05-07 22:53:24 +02:00
tool4EvEr
906204554a Battle support 2023-05-02 17:19:07 +02:00
Hans Mackowiak
d6109fe219 ComputerUtil: mark keywordcounter as useless if Card already has that keyword 2023-04-30 15:13:25 +02:00
tool4ever
9cdc7a27c1 Fix CounterAdded triggers (#3030)
* Fix CounterAdded triggers

* Fix invalid param

* Fix NPE

---------

Co-authored-by: TRT <>
2023-04-29 07:34:43 +03:00
TRT
1035592fb7 Fix incomplete removal due to FCollection 2023-04-28 11:10:05 +02:00
tool4EvEr
2924329e57 Fix AI assigning more than 1 dmg with trampling deathtouch attacker 2023-04-26 21:28:08 +02:00
tool4EvEr
19510914b4 Fix ClassCastException when adding attacker 2023-04-26 20:21:01 +02:00
tool4EvEr
49bf19948e Fix treating Battle as PW 2023-04-26 20:03:42 +02:00
GitHub Actions
53bed72fe5 [maven-release-plugin] prepare for next development iteration 2023-04-24 13:03:27 -04:00
GitHub Actions
b8c6086cc0 [maven-release-plugin] prepare release forge-1.6.56 2023-04-24 13:03:27 -04:00