Commit Graph

3798 Commits

Author SHA1 Message Date
TRT
830d0afba2 Clean up 2023-01-09 08:22:29 +01:00
tool4EvEr
58fcee689f Fix cards 2023-01-08 23:50:38 +01:00
tool4EvEr
f783d5a198 Performance: improve deduping 2023-01-08 23:14:47 +01:00
Hans Mackowiak
fb3f14db71 ONE: Toxic Keyword (#2213)
* ONE: Toxic Keyword

* more scripts

* Proliferate Trigger

* add proliferate trigger

* ~ add Toxic to ai part

* ~ more toxic cards

* add Venser Corpse Puppet

* ~ fix jiang

* ~ fix venser

* predictPoisonFromTriggers Toxic+Double Strike
2023-01-08 23:13:58 +03:00
TRT
b1df2d1008 Fix DiscardedThisTurn 2023-01-05 16:10:50 +01:00
tool4ever
359a97462e Few fixes (#2198)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2023-01-04 08:04:17 +03:00
asvitkine
88308ecd5c Support export/import states with arbitrary players. (#2168)
* Support export/import states with arbitrary players.

Previously, the dump/setup game state dev options were only able to handle a 2-player human vs. AI game. This PR expands the functionality to support any number of players and ignores the type of player (naming them p0,p1,...,pN). The previous names of ai and human are supported for backwards compatibility.
2022-12-28 14:56:16 +00:00
tool4ever
b51c6a3f1b Clean up (#2182) 2022-12-28 07:15:17 +00:00
tool4ever
037f1d0b7b Some fixes (#2170) 2022-12-26 09:42:03 +00:00
Anthony Calosa
a5decc0b78 Merge pull request #2157 from asvitkine/sim_imprv
Simulated AI: Fix land pruning logic and skip invalid targets.
2022-12-26 11:43:34 +08:00
asvitkine
6e8a21a58a Simulated AI: Copy changed SVars when copying state. (#2159) 2022-12-24 08:51:54 +00:00
asvitkine
eb0f426adc Use ComputerUtilAbility.isFullyTargetable() and add more tests. 2022-12-23 20:28:05 -07:00
asvitkine
74a37c95c4 Remove unused imports. 2022-12-23 20:00:56 -07:00
asvitkine
7da3605849 . 2022-12-22 22:04:39 -07:00
asvitkine
4a74c936c2 Return null modes when all invalid. 2022-12-22 22:04:30 -07:00
asvitkine
24c56f4731 Use empty iterator if all modes filtered out. 2022-12-22 21:58:40 -07:00
asvitkine
56b22ee73a Simulated AI: Fix land pruning logic and skip invalid targets.
This change improves Simulated AI logic by eliminating many unnecessary simulations, particularly due to:
  - Invalid targets involving counterspells countering themselves (including modal spells).
  - Pruning identical land drop decisions.

Tests are added to cover these cases.

Some core logic is changed, in particular, SpellAbility.canTarget() was not rejecting self-targeting for counterspells. This was likely being done at a higher level somewhere (e.g. in UI code for choosing targets for the human player or AI-specific code for non-simulated AI).

Additionally, a convenience SpellAbility.hasLegalTargets() method is added, from the logic that was previously in AIController.java, so that it can be re-used by the simulation AI code.

A few small style clean ups are included in the code being changed.
2022-12-22 21:40:52 -07:00
Anthony Calosa
72564e16dd Merge pull request #2100 from tool4ever/somefixes
Improve damage check logic for losing + performance
2022-12-15 07:38:42 +08:00
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