Commit graph

47 commits

Author SHA1 Message Date
Steven Knipe
d785193b97 implement Orcish Farmer 2025-11-09 20:48:13 -05:00
Oleg Agafonov
384ce67cc3 refactor: improved search in stack 2025-08-10 02:07:15 +04:00
ssk97
1a6c2eede4
Effect withTargetDescription, other fixes for discrepencies with "target" text with reference (#13867)
* Add withTargetDescription support to all Effects

* use withTargetDescription for effects incorrectly with "target" in text

* CommanderStormAbility add support for non-target rules text

* Heliods Emissary use OrTriggeredAbility

* support all effects withTargetDescription, rename overwriteTargetDescription to targetDescription

* copy target description from old pointer when using setTargetPointer

* Text cleanup/simplifications

* Remove outdated warning
2025-07-19 00:11:26 -07:00
Grath
49bce836f9 Change Duration.UntilTheNextEndStep to statically end during the beginning of EndStep. 2024-09-30 22:08:58 -04:00
Grath
a200351190 Rename fields for 'until the beginning of the next end step' duration; update comment to reflect that 'until the next end step' happens before the cleanup step and 514.2 does not apply. 2024-09-30 13:19:33 -04:00
Grath
4a432b61f9
[DSK] Implement Niko, Light of Hope (#12942)
Add UntilTheNextEndstep duration for 'until the beginning of the next end step' on the copy effect.
2024-09-30 01:31:32 -04:00
Susucre
79165f269c implement [MH3] Sorin of House Markov // Sorin, Ravenous Neonate 2024-05-22 22:18:52 +02:00
Susucre
017286ed94
fix ContinuousEffect that access affectedObjectsSet before it is initialized (#12080) 2024-04-13 16:50:06 +02:00
Oleg Agafonov
46d751f996 refactor: improved usage of target pointers 2024-02-18 15:38:53 +04:00
Oleg Agafonov
78612ddc91 multiple changes:
* refactor: improved target pointer init code and logic, added docs and runtime checks;
* game: fixed miss or wrong init calls in some continuous effects;
* game: fixed wrong usage of target pointers (miss copy code, miss npe checks);
2024-02-18 15:05:05 +04:00
Oleg Agafonov
3a92d67d10 tests: added verify test to check miss of controlled filter in equip abilities (related to #11473); 2023-11-27 23:08:23 +04:00
Alex Vasile
a2162ec3e7
Refactor: private fields and performance tweaks (#9625)
1a. Make `costs`, `manaCosts`, and `manaCostsToPay` private in `AbilityImpl` with access through getters/setters 
1b. fix cost adjuster for imprinted cards affected by the above

2a. Lazy instantiation for rarely used `data` field in `TargetPointerImpl`

3a. Pre-allocate certain array sizes in `Modes` and `CostsImpl`

4a. Make `manaTemplate` private in `BasicManaEffect`, copy when passing outside the class 
4b. Don't copy `manaTemplate` in copy constructor since it doesn't change 
4c. Add comments explaining copy usage for `manaTemplate` 
4d. Remove redundant variable assignment and make fields final 

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-08-27 17:58:19 -04:00
Susucre
f75b1c9f0a
Code cleanup: protect all copy constructors (#10750)
* apply regex to change public copy constructors to protected
* cleanup code using now protected constructors
* fix manaBuilder weird casting of Mana into ConditionalMana
2023-08-04 19:34:58 -04:00
Susucre
6a9340f1aa
Introduce Duration.UntilYourNextUpkeepStep (#10600)
* add new Duration

* refactor cards with new Duration.

* fix both Durations and add unit tests.

* fix text
2023-07-12 19:40:27 -04:00
Sean Walsh
7db278bdf1
Implement Brazen Cannonade, and new UntilEndOfNextCombatStep duration (#10047) 2023-04-10 20:36:21 -04:00
Alex W. Jackson
7233061ae3
Remove lockedIn parameter from BoostTargetEffect. Fixes #9329 (#9334) 2022-08-02 02:40:59 -04:00
Evan Kranzler
6437ca119c [CLB] Implemented Raised by Giants 2022-05-18 08:19:40 -04:00
Evan Kranzler
04dbdcc1db [NCC] Implemented Life of the Party 2022-04-27 08:57:35 -04:00
Evan Kranzler
6e65db284c
Implemented "Until your next end step" duration (#8831)
* initial implementation of until next end step duration

* added test, reworked effect duration
2022-04-10 17:57:58 -04:00
Evan Kranzler
26ae7b7281 replaced various instances of instanceof lambda functions with 2022-04-03 11:11:07 -04:00
Raphael-Schulz
e1f018d53d Adjust canLookAtNextTopLibraryCard 2021-08-01 17:05:52 +02:00
Oleg Agafonov
48e9cc3e07 PlayTheTopCard improves: added correct usage check, fixed outdated rule texts, Bolas's Citadel simplified (related to #7605); 2021-02-21 05:48:09 +04:00
Oleg Agafonov
6dcbcbe962 Tyvar Kell and gain ability fixes:
* GainAbilityTargetEffect - reworked to support static/dynamic targets, added support of spells (card + related permanent);
* SpellCastControllerTriggeredAbility - now it can setup the target to a card instead a spell;
* Added checks/errors on wrong ability adding code (example: if you add permanent's ability by game state instead permanent's method);
* Tyvar Kell Emblem now use a standard code;
* Test framework: added additional logs for some errors;
2021-01-12 04:41:35 +04:00
Oleg Agafonov
c2e7b02e13 Reworked and improved special mana payment abilities (convoke, delve, assist, improvise):
* now it can be used to calc and find available mana and playable abilities;
* now tests and AI can use that abilities;
* now it follows mtg's rules and restrictions for mana activation order (rule 601.2f, see #768);
2020-06-19 13:09:45 +04:00
LevelX2
1e36b39434 - Reworked SourceOnBattlefieldControlUnchangedCondition checking now the LOST_CONTROL event which solves the problem with the old code to not be able to detect all controller changes of layered changeController effects when applied later.
- Simplified and fixed some problems of the handling of the "Until end of your next turn" duration.
- Fixed that some continous effects changed controller but shouldn't dependant from their duration type. Controller chnage will now done duration type dependant.
  (that change fixes #6581 in a more general way undoing the effect specific changes of 2e8ece1dbd).
2020-06-10 22:28:23 +02:00
jeffwadsworth
d6c2f031d0 - Fixed #6236 2020-02-06 17:47:08 -06:00
Oleg Agafonov
5adab75324
Revert "format: organize imports" 2020-02-05 02:17:00 +04:00
Leandro Doctors
8a0a9acff7 format: organize imports 2020-02-04 16:21:48 -03:00
Oleg Agafonov
85e65c8f44 Code cleanup 2020-01-08 05:19:52 +04:00
Oleg Agafonov
ca4a4528fb * Play with top card library - fixed that player can see next top card before casting current top card; 2020-01-08 04:54:17 +04:00
Oleg Agafonov
b6d76a7c02 * Gain abilities - fixed wrong order effects with changeling ability (all creature type effect, #6147); 2020-01-07 06:38:34 +04:00
Oleg Agafonov
2460408da8 * Until your next turn effects - fixed that continuous effects of lost/leaved players can be discarded by combat or some cards before next turn starts; 2019-12-26 07:44:46 +04:00
Evan Kranzler
48a678fad9 Implemented Covetous Urge 2019-09-21 19:40:19 -04:00
Oleg Agafonov
367a1fd189 Added ConditionalPreventionEffect to support prevention effects with conditions (#5738) 2019-05-01 12:49:19 +04:00
Oleg Agafonov
534037e095 * Until end of your turn - fixed that effects discarded too early in multiplayer games (#5759, #5676);
Tests: added dozen tests for end of turn effects and related cards.
2019-04-28 11:27:08 +04:00
Oleg Agafonov
081ac7ca3c Fixed Single Combat that it does not prevent cast on next turn; 2019-04-23 16:05:34 +04:00
igoudt
dcb1affb9d use isActivePlayer where possible, some minor text fixes 2018-06-29 21:18:05 +02:00
GrayedFox
3953f3dbdd
remove all MIT copyright notices from files 2018-06-02 17:59:49 +02:00
Evan Kranzler
d645c1a5d8 Implemented Will Kenrith 2018-05-21 19:59:17 -04:00
LevelX2
b9dff66fcb * Kormus Bell - Fixed a bug with order land type changing effects are applied (fixes #3470). 2017-07-28 16:56:31 +02:00
LevelX2
ffd0c24c9c Some minor changes. 2017-07-28 12:21:52 +02:00
ingmargoudt
972ed6a3f2 changed enum comparison to ==.
isDependentTo returns empty set rather than null
2017-02-19 23:38:47 +01:00
spjspj
51a1c8d345 spjspj - Fixes for KormusBell not creating 1/1s from swamps. Copies of ContinuousEffect weren't having dependendToType set (was defaulting to null). Add addDependencyType to UrborgTombOfYawgmoth and setDependedToType to KormusBell. 2016-06-14 22:30:06 +10:00
Kenny Wottrich
f3c83d54f5 Remove Unused Imports
Delete unused java imports that cause compiler warnings
2016-04-24 19:50:29 -05:00
LevelX2
436c82d25a * Manor Gargoyle - Fixed that the lose of defender ability did not stop it having indestructibility. 2016-03-12 10:31:12 +01:00
LevelX2
6b643fbda8 * Fixed that some P/T settings were handled as character defining abilities but they were not. 2015-12-31 18:25:51 +01:00
poixen
46eb6c0525 Restructured Mage module 2015-11-29 21:56:49 +01:00
Renamed from Mage/src/mage/abilities/effects/ContinuousEffectImpl.java (Browse further)