Commit graph

2175 commits

Author SHA1 Message Date
jimga150
52ddcac59d
refactor: added counter removal events (#11989) 2024-05-02 17:32:55 +04:00
Susucre
bada7d054a implement [PIP] Recon Craft Theta 2024-05-02 11:05:40 +02:00
Susucre
ab69e05115 clean DamagedBatchCouldHaveFiredEvent isCombat
no longer flag to be more in line with other damage events
2024-05-02 10:39:42 +02:00
Susucre
f24b3d988d clean MILLED_EVENT to not store Card directly. 2024-05-02 10:18:36 +02:00
xenohedron
30d498b80f consolidate batch event constructor (related to 7c3bbed8) 2024-05-02 01:28:06 -04:00
Susucre
53898eeb8b implement [PIP] Screeching Scorchbeast 2024-05-01 20:56:07 +02:00
Susucre
7c3bbed8f3 make batchs for milling cards (per player, all)
Rework and test the couple of existing cards triggering on mill.
2024-05-01 20:55:50 +02:00
Susucre
0884d7d4f6 implement [PIP] Raul, Trouble Shooter 2024-05-01 15:27:51 +02:00
Susucre
95adcf0e9a revert the GameEvent::setSourceId removal
xenodron mentionned that one of the use of setSourceId is to more easily find the Event that use non-standard
sourceId.

So reverting the change made in a previous commit.

It was a non-functional change meant to ease new
BatchEvent sharing sourceId, but I'll use setSourceId
instead there.
2024-04-30 11:51:11 +02:00
PurpleCrowbar
66f09decfc Add OTP token images 2024-04-28 21:37:40 +01:00
PurpleCrowbar
371391b2e3 Add OTC token images 2024-04-28 21:09:06 +01:00
Susucre
868cd4d8fd clean all usage of GameEvent::setSourceId 2024-04-28 14:21:43 +02:00
Susucre
d645facdc0
rework PhantomReplacementEffect used by 7 Phantom cards (#12189) 2024-04-27 17:34:59 +02:00
Susucre
1ae48593a8 have separate turn events for extra beginning.
I did check the BEGINNING_PHASE_PRE usage, and found none that wanted to watch the extra beginning phases.

Of note, we may want to have separate 'beginning of turn'/'beginning of game' events, if there is ever a way to skip beginning phases.
2024-04-25 18:58:32 +02:00
Susucre
ff4bd9b430 fix Obeka, Splitter of Seconds' extra phase calling beginning of turn method 2024-04-25 12:16:37 +02:00
jimga150
28a1442899
Krark's Thumb - fixed that it can generates too many flip triggers (#12152)
---------

Co-authored-by: Susucre <34709007+Susucre@users.noreply.github.com>
2024-04-22 11:22:42 +04:00
Susucre
c0c05579ba fix client NPE if Radiation trigger in trigger order panel
The frameStyle was unexpectedly null when displaying the trigger in the view to choose trigger panels.
It was good on the stack so I missed that in initial implementation.

Bug showed up once there was another trigger on Beginning of Main Phase, for instance Coalition Relic.
The lack of frameStyle lead to a rendering NPE.
2024-04-21 18:52:46 +02:00
Susucre
9d7bf27d38
[PIP] Implement Rad Counters mechanic (#12087) 2024-04-17 20:04:17 +02:00
Oleg Agafonov
88eb35ebc7 code clean 2024-04-16 23:37:22 +04:00
Oleg Agafonov
e8e2f23284 server: improved server stability (#11285) and reworked triggers/playable logic (#8426):
* game: now all playable calculations done in game simulation, outside real game (no more freeze and ruined games by wrong Nyxbloom Ancient and other cards with wrong replacement dialog);
* game: fixed multiple problems with triggers (wrong order, duplicated calls or "too many mana" bugs, see #8426, #12087);
* tests: added data integrity checks for game's triggers (3 enabled and 3 disabled due current game engine logic);
2024-04-16 23:10:18 +04:00
Susucre
c77634c843
separate 'you may play'|'you may cast' AsThoughtEffect approuvers
Also, reworked Gonti, Lord of Luxury and checks it now works properly with Zoetic Cavern.
2024-04-13 12:10:53 +02:00
xenohedron
8853e7d875
refactor: clean up static filters for sacrifice targets (#12120)
* simplify sacrifice target filters, part 1

* minor cleanup

* adjust SacrificeXTargetCost

* adjust Arctic Merfolk

* more cleanup

* remove unused

* adjust filters not used for sacrifice

* fix Hew the Entwood

* fix Nahiri's Lithoforming

* remove unused

* remove another

* cleanup more

* fix MegatronDestructiveForce

* remove next

* next batch of replacements

* remove next

* rename filter to match text

* finish removing

* use existing static filter
2024-04-12 22:24:10 -04:00
Susucre
72a2e32d1c
fix 514.3a, give player priority on cleanup when something happened (#12115) 2024-04-12 15:31:53 +02:00
Oleg Agafonov
f1791a3c70 Merge fix 2024-04-11 23:02:25 +04:00
Oleg Agafonov
367defd995 tests: added tests for non-stack delayed trigger and details docs about problem 2024-04-11 22:46:25 +04:00
Susucre
8a29dcc735 fix Obeka, Splitter of Seconds (#12085)
Now adding BeginningPhases with all but Upkeep skipped.
Previously upkeep steps were added during combat phase, which was incorrect.

fix #12085
2024-04-11 13:24:56 +02:00
Oleg Agafonov
7817a5cac6 deck improves:
* gui: removed public deck hash info;
* gui: improved xmage dck-file - now it correctly load a card's amount (related to files from third party services);
* server: fixed wrong cheating warning on deck construction (closes #11877);
* refactor: removed outdated hash code and calculations;
* other: added docs, added multiple deck hash tests;
2024-04-10 22:18:07 +04:00
Susucre
68dfcf4eac Fix some more inexact rule texts 2024-04-06 17:16:33 +02:00
Susucre
62131f2a5d [OTC] Implement Yuma, Proud Protector 2024-04-06 01:49:21 +02:00
Susucre
821b0d069f
Return to battlefield transfromed - fixed that it was able to return non transformable cards, fixed #12066 (#12072) 2024-04-05 20:51:34 +04:00
Susucre
4b60e82b83 [MH3] Implement Ajani Nacatl Pariah 2024-04-05 16:05:18 +02:00
theelk801
e4cd084b1b [OTC] Implement Elemental Eruption 2024-04-05 09:05:40 -04:00
jimga150
525e013ebd
Fix damage triggers (#12033)
* Fix DealtDamageAttachedTriggeredAbility and update test

* Fix AegarTheFreezingFlameTriggeredAbility and add test

* fix enum reference for DealtDamageAttachedTriggeredAbility

* fix Pious Warrior

* Fix souls of the faultless

* fix Stuffy Doll

* Fix Vengeful Pharoah and add test

* fix Wall of Essence

* fix Wall of Souls

* fix Rite of Passage and add test

* incorporate simple fixes - these cards use no methods that aren't re-implemented in DamagedBatchForOnePermanentEvent

* fix Chandra's Spitfire

* fix Darien, King of Kjeldor

* fix Jace, Cunning Castaway

* fix Mindblade Render

* fix Popular Entertainer

* fix Swarmborn Giant

* fix The Raven's Warning

* fix War Elemental

* fix Wildfire Elemental

* make simple player damage trigger fixes

* Add isCombatDamage to DamagedBatchForOnePermanentEvent and utilize in trigger fixes

* fix Fall of Cair Andros

* fix Toralf, God of Fury

* optimize some imports
2024-04-04 22:16:44 -04:00
theelk801
b9b9889a87 [BIG] Implement Greed's Gambit 2024-04-04 14:13:24 -04:00
Evan Kranzler
ba20e97b71
[OTJ] Implementing "spree" mechanic (#12018)
* [OTJ] Implement Unfortunate Accident

* fix errors

* a few more things

* [OTJ] Implement Three Steps Ahead

* [OTJ] Implement Caught in the Crossfire

* [OTJ] Implement Insatiable Avarice

* add test

* [OTJ] Implement Explosive Derailment

* [OTJ] Implement Requisition Raid

* [OTJ] Implement Rustler Rampage

* add comment to test

* [OTJ] Implement Metamorphic Blast

* [OTJ] Implement Final Showdown

* rework cost addition, add test

* move cost application to its own loop
2024-03-31 12:11:34 -04:00
Susucre
97ab8074b3
[OTJ] Implement Plot mechanic (+8 cards) (#12017)
[OTJ] Implement Aloe Alchemist
[OTJ] Implement Aven Interrupter
[OTJ] Implement Longhorn Shapshooter
[OTJ] Implement Kellan Joins Up
[OTJ] Implement Make Your Own Luck
[OTJ] Implement Jace Reawakened
[OTJ] Implement Lilah, Undefeated Slickshot
[OTJ] Implement Doc Aurlock, Grizzled Genius
2024-03-31 17:06:55 +02:00
Susucre
9a03bc675b [OTJ] Fix a few rule text 2024-03-31 01:11:26 +01:00
Susucre
a215bbb9e9 [OTJ] Implement Bonny Pall, Clearcutter 2024-03-31 01:11:19 +01:00
Susucre
ef6ee4d0ea [OTJ] Implement Baron Bertram Graywater 2024-03-30 17:28:46 +01:00
Susucre
c42e67ea0f [OTJ] Implement Roxanne, Starfall Savant 2024-03-30 14:53:08 +01:00
theelk801
c501abaae8 [OTJ] Implement Bridled Bighorn 2024-03-29 23:10:21 -04:00
Evan Kranzler
8fbc7c9507
[OTJ] Implementing "saddle" mechanic (#12012)
* [OTJ] Implement Trained Arynx

* implement saddle cost

* update saddled effect

* add test

* add sorcery speed to saddle ability

* apply requested changes

* [OTJ] Implement Quilled Charger

* rework test
2024-03-29 23:00:22 -04:00
Susucre
94a714b1b7 [OTJ] Implement Magda, the Hoardmaster 2024-03-29 23:03:33 +01:00
Susucre
97347a864f [OTJ] Implement Rictus Robber 2024-03-29 21:06:10 +01:00
Susucre
8ffaaedaf3 [OTJ] Implement Rise of the Varmints 2024-03-29 21:05:54 +01:00
xenohedron
cb28fb5a56
Refactor batch events (#11995)
* create new abstract class for batch event framework

* adjust CardUtil.getEventTargets to support new framework

* update TappedBatchEvent to new framework

* update UntappedBatchEvent to new framework

* slight cleanup

* update LifeLostBatchEvent to new framework

* update ZoneChangeBatchEvent to new framework

* complete refactor by moving damage events to new framework

* remove old code no longer used

* clean up some nonsense code in star wars card

* fix watcher checking id before event type

* fix wrong id usage

* fix missed wrong id usage
2024-03-28 23:19:20 -04:00
xenohedron
8869d282b2 fix #12015 (match result string for draws)
some linting from IDE
2024-03-28 23:12:06 -04:00
jimga150
8ece278435
refactor: rename combat damage checker on single life loss event (#12019) 2024-03-29 04:45:53 +04:00
Evan Kranzler
fa0f9f3d00
[OTJ] Implementing "commit crime" mechanic (#11859)
* [OTJ] Implement Oko the Ringleader

* [OTJ] Implement Duelist of the Mind

* update implementation of crime mechanic to match new info

* [OTJ] Implement Marauding Sphinx

* [OTJ] Implement Hardbristle Bandit

* [OTJ] Implement Intimidation Campaign

* [OTJ] Implement Freestrider Lookout

* add initial test

* add more tests

* apply requested changes

* applied requested changes

* fix verify failure
2024-03-28 11:19:27 -04:00
Susucre
e465eab1bc [OTJ] Implement Bovine Intervention 2024-03-27 22:27:11 +01:00