Commit Graph

3556 Commits

Author SHA1 Message Date
TRT
35810fcb66 Fix counting 2022-12-14 22:41:09 +01:00
TRT
8d2e56e4dc Improve damage check logic for losing + performance 2022-12-14 17:01:09 +01:00
Paul Hammerton
42a441d63a Merge pull request #2064 from asvitkine/more_copy
GameCopier: Handle copying of more game and player properties.
2022-12-13 09:19:37 +00:00
tool4ever
c303222f6f Fix ante cards (#2089) 2022-12-12 21:23:32 +00:00
asvitkine
671b0e8985 Use playerMap for starting player. 2022-12-10 13:24:46 -05:00
asvitkine
e6e2950a6e Fix crash in AI simulation code caused by a not found token. 2022-12-10 01:09:16 -05:00
asvitkine
8bd9759494 GameCopier: Handle copying of more game and player properties. 2022-12-09 23:27:49 -05:00
asvitkine
96b6bafc2b Fix simulation AI exception with random effects.
Uses a seeded deterministic random generator when simulating choices, which ensures  the same number of sub-choices are always used, which the code requires. Adds a test.
2022-12-09 16:08:44 -05:00
Anthony Calosa
693dbbdd48 fix ConcurrentModificationException and reloading WorldSave 2022-12-07 10:57:14 +08:00
tool4ever
bdf09485a2 Clean up (#2025) 2022-12-05 18:43:56 +00:00
tool4EvEr
5ab6cca220 Extend logic 2022-12-02 22:30:05 +01:00
tool4EvEr
4834a0cc9a Fix Bishop of Binding 2022-12-02 22:26:50 +01:00
tool4ever
5fa7d23196 StrictAmount fix (#1993) 2022-12-01 18:21:00 +00:00
TRT
24b1e9de31 Fix imports 2022-11-29 20:19:31 +01:00
TRT
f7fd335b10 Fix phasing in attached when entity stopped existing 2022-11-29 20:12:30 +01:00
TRT
56963e6d07 Clean up 2022-11-29 15:31:35 +01:00
tool4EvEr
cfc92a54f0 Fix zone choosing when searching 2022-11-28 10:07:10 +01:00
Anthony Calosa
4396a509d4 Merge pull request #1973 from tool4ever/phasingfix
Phasing: store under which control it phased out
2022-11-28 15:17:48 +08:00
tool4ever
57c8644469 Clean up (#1978) 2022-11-27 22:51:42 +00:00
tool4EvEr
fbd2b1eaee Phasing: store under which control it phased out 2022-11-27 12:21:25 +01:00
tool4EvEr
363631990a Better fix for Bow of Nylea / avoid view update if AI only 2022-11-24 09:34:36 +01:00
Anthony Calosa
b8ea883259 Merge pull request #1902 from Northmoc/spaceb
UNF: space_beleren.txt and support
2022-11-22 08:54:01 +08:00
tool4ever
ac3d9ce8ee Misc cleanup (#1940)
* Misc cleanup

* Fix check passing with no own creatures

* Improve StackDescription for Unsubstantiate
2022-11-21 20:37:24 +00:00
Northmoc
35365c0893 Solve issue 1472 (#1528)
* ManaEffect.resolve add runTriggers boolean

* AbilityManaPart.produceMana incorporate runTriggers boolean

* caged_sun.txt refactor

* AbilityManaPart.produceMana split to add TriggerManaAdded

* TriggerManaAdded.java

* TriggerTapsForMana.java refactor out unneeded

* TriggerType.ManaAdded

* Adjust checks for new Trigger

* Caged Sun fix

* Fix False Dawn only affecting mana abilities

* Rework tapsForMana call

* Clean up

* Support default rules value

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2022-11-21 20:37:01 +00:00
Northmoc
06e9827464 localize sector prompts 2022-11-19 10:37:29 -05:00
Northmoc
15b7909171 space_beleren.txt and support 2022-11-19 10:37:18 -05:00
tool4ever
8eca58e9e4 3 fixes (#1925)
* Improve logic / avoid cheating

* Fix Aggregates.random on FCollection disaster

* Fix finding wrong SA

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2022-11-18 22:37:34 +03:00
tool4ever
3728e926cc Some fixes (#1911) 2022-11-16 20:55:43 +00:00
tool4EvEr
5e1af59453 Fix being able to pay mana for Hogaak 2022-11-15 21:36:32 +01:00
tool4EvEr
41ef4fe2ce Fix canFaceDownBeShownTo 2022-11-14 13:49:22 +01:00
TRT
60862e7537 Some card fixes 2022-11-11 14:16:04 +01:00
Northmoc
d40cfb985a ChooseCardAi add error message 2022-11-06 14:38:53 -05:00
Northmoc
0c06184da8 update ChooseCardAi with "NotSelf" consumable 2022-11-06 14:38:52 -05:00
Anthony Calosa
e570479e8d Merge pull request #1786 from asvitkine/fix_lands
Fix simulation AI logic related to playing lands.
2022-11-03 20:52:28 +08:00
asvitkine
2804206776 Improve AI logic for cavern of souls. (#1787)
* Improve AI logic for cavern of souls.

Improve AI logic for cavern of souls.

- Don't count token creature types when looking for most prominent creature type, since cavern of souls doesn't help with them.
- Weigh cards in hand and commanders double, as they are more likely to be cast.

I tested with a Tiny Leaders deck running Geist of Saint Traft that didn't have any creature type synergy and confirmed that the changes make the AI choose Spirit for Geist, rather than Human as before.

* Apply this to a few more cards.

* Remove a print statement.

* Address review comments.
2022-11-03 08:03:37 +03:00
asvitkine
b0120eedf0 Fix simulation AI logic related to playing lands.
This got broken by the following refactor:
79c9c914e2

The result was that simulation AI was ignoring certain decision trees that involved
playing lands, leading to not considering certain lines of play and some log
messages printed to standard error. I've added a test that covers this logic to prevent
it breaking again in the future.

Also, a couple small clean ups to related tests.
2022-11-02 10:26:37 -04:00
tool4EvEr
d656bed11c Update AI checks 2022-11-01 15:25:14 +01:00
tool4EvEr
d954f9dcb3 Cleanup 2022-11-01 14:37:51 +01:00
tool4EvEr
8481540237 Fix Sigarda's Aid failed to target & AITapDown 2022-10-31 18:15:13 +01:00
tool4EvEr
f40a26f52c Fix color choice 2022-10-29 12:48:59 +02:00
Anthony Calosa
e4be03378a fix colorchoice 2022-10-29 14:05:01 +08:00
tool4ever
ae255a8e8f Fix Bargaining Table (#1727) 2022-10-22 12:10:39 +00:00
tool4EvEr
d6e51db755 Random cleanup + fixes 2022-10-20 22:58:51 +02:00
Northmoc
e00387f0fa BOT: "new" mechanics (#1679)
* CardFactoryUtil.addStaticAbility support "Living metal" keyword

* GameActionUtil.getAlternativeCosts() add "More Than Meets the Eye"

* Keyword.LIVING_METAL and Keyword.MORE_THAN_MEETS_THE_EYE

* TypeLists add Robot

* AlternativeCost.MTMtE

* ultra_magnus_tactician_ultra_magnus_armored_carrier.txt

* CardSplitType.Convert

* CardStateName.Converted

* GameState.addCard Converted check

* DevModeCheats for Converted

* Card.changeCardState() add Convert mode

* Card.isConvertable()

* PaperCard.hasBackFace add Convert

* Card implement convertedTimestamp

* Card.keywordsToText add Living metal to list

* DamageDealEffect.internalDamageDeal move "ExcessSVar" for more flexibility

* ComputerUtil.choosePermanentsToSacrifice improve AI for Megatron

* megatron_tyrant_megatron_destructive_force.txt

* optimus_prime_hero_optimus_prime_autobot_leader.txt

* ChangeZoneEffect.changeKnownOriginResolve support "Converted"

* Card.changeCardState() fixup
2022-10-17 19:04:06 +03:00
tool4ever
a75c68e640 Fix Ozolith logic (#1698) 2022-10-17 06:47:56 +00:00
tool4ever
acea8aa75d Radiate fix (#1688) 2022-10-14 10:23:26 +02:00
tool4ever
b614b9b46f Cleanup cards (#1667)
* Card cleanup

* FailedToTarget fix

* Fix card

* Use ColorSet cache in favor of parsing

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2022-10-12 15:54:07 +03:00
rikimbo
b5b41186ce Add additional AI logic for playing blink effects (try to get own stuff back or trigger ETB effects). (#1664) 2022-10-11 11:01:36 +03:00
tool4ever
839a9c8402 Unblockable fixes (#1662)
* Add shortcuts

* Fix cards

* Clean up

* Fix CantBlockBy checks

* Fix stack overflow

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2022-10-10 06:57:30 +03:00
Northmoc
2834993cb5 Refactor K:Unblockable > Static (#1551)
* round 1

* round 2

* 10 more (Oct 1)

* attempt to add "Pump" to EffectAi

* more 10/4

* more/fixes 10/4

* more 10/4 (80 to go...)

* more 10/4 (70 to go...)

* 10/5 (60 to go...)

* more 10/5 (50 to go...)

* more 10/5 (40 to go...)

* more 10/5 (30 to go...)

* 10/6 (20 to go...)

* more 10/6 (10 to go...)

* more 10/6 (last of pump -> effect)

* more 10/6 (continuous kw static > cantblockby... 30 to go)

* more 10/6 (continuous > cantblockby... 20 to go)

* more 10/6 (continuous > cantblockby... 10 to go)

* last 10/6 (continuous > cantblockby)

* Final keyword cleanup?

* GameSimulationTest.testEquippedAbilities use Shroud instead of Unblockable

* fish token!

* CreatureEvaluator evaluate for unblockable

* AttachAi evaluate for unblockable
2022-10-08 11:39:26 +03:00