Commit graph

1596 commits

Author SHA1 Message Date
Susucre
5062c84098
Refactor: removed server side objects from a client side game's data (#10788)
* Clean original values transmitted with CardView.originalObject
* Move RateCard to mage.Common, support cardView as argument.
* Clean PermanentView constructor for TestCardRenderDialog
2023-08-24 12:04:07 +04:00
names-are-hrad
5468e2f7e5
update modern/legacy banlists (#10779)
https://magic.wizards.com/en/news/announcements/august-7-2023-banned-and-restricted-announcement

Co-authored-by: MrMoo <>
2023-08-11 08:57:48 -04:00
Artemis Kearney
9ba0da00ff
Basic groundwork for extra decks (contraptions, attractions) (#10378)
* extra deck cards not counted in deck size

* extra deck handling in deckbuilder

* move responsibility for extraDeckCard boolean to CardImpl

* remove redundant field copy
2023-08-06 21:06:32 -04:00
theelk801
8830fd0cc8 [WHO] Implement The Thirteenth Doctor 2023-08-05 13:44:40 -04:00
mgrochowski
005f32cfff
update Premodern ban list (#10738)
* On July 15th Land Tax got banned, see more details:
https://premodernmagic.com/blog/ban-list-update-2023/

* Update Ban List (added "playing for ante" cards)
2023-08-03 01:02:10 -04:00
Oleg Agafonov
8d938926b6 refactor: improved usage of one time turn modifications (skip step, extra turn, etc) 2023-07-31 20:16:28 +04:00
xenohedron
b7543af939 Update Brawl ban list (closes #10686) 2023-07-28 21:33:22 -04:00
Alexander Novotny
a36a7d9b7f
[LTR] Add Goldberry, River-Daughter (#10524)
* Added Goldberry

* Slight optimizaztion

* Happy Path Test

* More unhappy tests

* Sanity check for Goldberry's counter choices

* Updated player.getMultiAmount to support individual constraints

* Some cleanup

Also modified ResourcefulDefense to use new multi amount api

* Updated logging

* Added hint for number of counters

* Fixed issue with Resourceful Defense

* Improvements to defaults

Default list will properly make sure to stay within individual maximums
If a player is asked for a choice that isn't actually a choice because each choice's min and max are equal, instead the default response is immediately returned. This helps with situations like moving a counter off of Goldberry when she only has one counter on her.

* -1/-1 Counter test

* Fixed issue with -1/-1 counters

* Adjusted dialog to properly enforce constraints
2023-07-28 21:29:40 -04:00
Susucre
574321f034
game: added Pillar of the Paruns custom mode (#10633)
* Introduce a new custom match mode: Each player with a Pillar of the Paruns in play.
2023-07-18 08:55:46 +04:00
Susucre
6b616dbf20
refactor: expose startingHandSize in GameImpl constructor. (#10629)
For now, it is 7 in every game mode.
2023-07-16 18:36:26 +04:00
Susucre
b960b77774
Refactor name of minimum deck size (was startingHandSize) (#10628)
* Refactor: rename starting hand size, it was actually minimum deck size (40, 60 or 100 most of the time)
2023-07-16 01:45:19 +04:00
xenohedron
0fa971514a
code style: eliminate unnecessary static imports (#10585)
* SacrificeTargetCost(StaticFilters)

* remove import static mage.constants.Outcome

* remove import static mage.constants.Duration

* remove other import static

* a few more sacrifice filters

* simpler constructors

* remove import static mage.filter

* remove a few more import static
2023-07-08 13:08:28 -04:00
Alexander Novotny
fb8424556e
Player auto-choose respects required targets (#10557)
* Player auto-choose respects required targets
2023-07-04 07:02:46 +04:00
Oleg Agafonov
6529ead72f refactor: simplified extra turn code, fixed NPE error on usage (Alchemist's Gambit) 2023-06-30 06:39:01 +04:00
Oleg Agafonov
afe89a1056 momir game: fixed game error on start, added momir emblem image 2023-06-17 09:29:47 +04:00
Juneau
eebb82c591
Update CanadianHighlander.java (#10459)
Update Canadian Highlander points list to match the most recent update as of 6/12/23
2023-06-12 12:37:53 -04:00
KungensBadkar
7daafe27f1
Update CanadianHighlander.java (#10448)
Updated points list.
2023-06-09 17:07:07 -04:00
xenohedron
44f3ef444e Merge branch 'glee--feature/addRichManSwiss' 2023-06-07 19:45:34 -04:00
xenohedron
b55f8f6c46 Merge fix 2023-06-07 19:36:55 -04:00
sprangg
99701e08e7
Improvements to limited with Freeform Unlimited Commander (#10114)
* Limited-style sideboarding with unlimited basics enabled for Freeform Unlimited Commander

* FreeformUnlimitedCommander does not depend on FreeformCommanderFreeForAll anymore.
FreeformUnlimitedCommander has sideboarding.
In two-player matches of FreeformUnlimitedCommander, the player who goes first doesn't draw a card on their first turn anymore.

* FreeformUnlimitedCommanderTypeTest takes into account that sideboarding is allowed

* Fix to startingPlayerSkipsDraw condition

---------

Co-authored-by: sprangg <a@b.c>
2023-06-07 19:05:37 -04:00
theelk801
82073bba73 [LTR] Implement Nazgul 2023-05-30 18:24:54 -04:00
theelk801
19f44e90ad update standard ban list 2023-05-29 11:02:57 -04:00
theelk801
fa03c6404f fix and rework commander validation (fixes #10345) 2023-05-23 19:25:00 -04:00
Evan Kranzler
60e488cf05
rename classes (#10383) 2023-05-17 18:49:30 -04:00
Evan Kranzler
a850e3660b
Change supertype method in constructors (#10361)
* replace addSuperType with supertype.add in card constructors

* more supertype replacements

* update MDFC supertype implementation

* remove unnecessary class

* update test
2023-05-12 20:45:07 -04:00
xenohedron
4cc9329b15
New feature: "Chaos Remixed" booster draft (#10328)
* Fix error in draft pick logger that was failing on chaos drafts with fewer than 3 sets

* Implement Remixed Booster Draft

* Add debug test

* minor cleanup

* Cleanup unnecessary checks

* Fix elimination tournament type

* Add note for future improvement
2023-05-12 18:12:23 +04:00
Oleg Agafonov
1dea98cf1f Game: fixed that search by card name was able to return a wrong card (example: cheat command) 2023-05-08 22:58:30 +04:00
Daniel Bomar
92b6d7a531
[BRO] Implemented Gix, Yawgmoth Praetor (#9765)
* [BRO] Implemented Gix, Yawgmoth Praetor

* Add missing TestPlayer, PlayerStub implementations
2023-04-23 11:49:52 -04:00
Oleg Agafonov
5474787641 Refactor: added miss Ability source in some choose methods 2023-04-21 10:08:33 +04:00
Evan Kranzler
947351932b
Ready for Review: Implementing Battles (#10156)
* add types and subtypes

* add startingDefense attribute

* [MOM] Implement Invasion of Ravnica / Guildpact Paragon

* fix two small errors

* refactor various instances of "any target"

* fully implement defense counters

* battles can now be attacked

* [MOM] Implement Invasion of Dominaria / Serra Faithkeeper

* [MOM] Implement Invasion of Innistrad / Deluge of the Dead

* [MOM] Implement Invasion of Kaladesh / Aetherwing, Golden-Scale Flagship

* [MOM] Implement Invasion of Kamigawa / Rooftop Saboteurs

* [MOM] Implement Invasion of Karsus / Refraction Elemental

* [MOM] Implement Invasion of Tolvada / The Broken Sky

* simplify battle info ability

* fix verify failure

* some more fixes for attacking battles

* [MOM] Implement Invasion of Kaldheim / Pyre of the World Tree

* [MOM] Implement Invasion of Lorwyn / Winnowing Forces

* [MOM] Implement Invasion of Moag / Bloomwielder Dryads

* [MOM] Implement Invasion of Shandalar / Leyline Surge

* [MOM] Implement Invasion of Belenon / Belenon War Anthem

* [MOM] Implement Invasion of Pyrulea / Gargantuan Slabhorn

* [MOM] Implement Invasion of Vryn / Overloaded Mage-Ring

* [MOM] Implement Marshal of Zhalfir

* [MOM] Implement Sunfall

* implement protectors for sieges

* partially implement siege defeated trigger

* fix verify failure

* some updates to blocking

* [MOM] Implement Invasion of Mercadia / Kyren Flamewright

* [MOM] Implement Invasion of Theros / Ephara, Ever-Sheltering

* [MOM] Implement Invasion of Ulgrotha / Grandmother Ravi Sengir

* [MOM] Implement Invasion of Xerex / Vertex Paladin

* add initial battle test

* fix verify failure

* [MOM] Implement Invasion of Amonkhet / Lazotep Convert

* [MOM] update spoiler

* update how protectors are chosen

* update text

* battles can't block

* add control change test

* rename battle test for duel

* add multiplayer test

* [MOM] Implement Invasion of Alara / Awaken the Maelstrom

* [MOM] Implement Invasion of Eldraine

* [MOM] Implement Invasion of Ergamon / Truga Cliffhanger

* [MOM] Implement Invasion of Ixalan / Belligerent Regisaur

* battles now cast transformed (this is super hacky but we need to refactor TDFCs anyway)

* add TODO

* add ignore for randomly failing test

* a few small fixes

* add defense to MtgJsonCard (unused like loyalty)

* implement ProtectorIdPredicate

* small fixes
2023-04-13 20:03:16 -04:00
Oleg Agafonov
a15a0daa04 Fixed potential NPE errors in getPhase usage (fixed Berserker's Frenzy, etc) 2023-03-25 16:01:27 +04:00
Oleg Agafonov
cfd7464b49 Refactor: added edit protection for some unmodifiable lists 2023-03-25 15:22:13 +04:00
Alexander Novotny
32002101ad
Prevent backgrounds from being used as commanders no matter what (#10007) 2023-02-20 02:01:16 +00:00
Alex Vasile
84096fca82 Update Duel Commander ban list 2022-10-30 10:44:48 -04:00
Sven Lutz
967291b3e0
Premodern 2022 Ban List Update (#9699) 2022-10-29 23:58:14 -04:00
Evan Kranzler
0379fb70d1 update standard and modern ban lists 2022-10-10 11:26:29 -04:00
Alex Vasile
f68db93683 Fix minor bug in ComputerPlayer mana handling 2022-10-04 02:01:34 -04:00
Alex Vasile
55a6acba22
Refactor: Significant speed-up for ManaOptions (#9233) 2022-10-04 00:08:20 -04:00
Alex Vasile
6035f04140
Disable auto-payment of mana for spells which care about mana color (#9173) 2022-10-03 19:16:45 -04:00
Alex Vasile
b14af42280
[DMU] Karn's Sylex (#9507) 2022-09-17 22:37:56 -04:00
Alex W. Jackson
a6c5209a2a Combat.getAttackers and Combat.getBlockers now return a Set instead of a List, so that two-headed blockers aren't included twice 2022-09-07 22:36:05 -04:00
sprangg
7554a2b6b5
Make Add Land dialog no longer add a random mix of regular and snow-covered basic lands (#9353)
The Add Land dialog now only adds regular basic lands and never snow-covered ones, unless you specifically select a set that only contains snow basics (e.g. MH1) Sets that only contain snow basics are not selectable when adding lands to a Limited deck.
2022-08-10 20:11:01 -04:00
Alex Vasile
8b71e0a444 [DEV] JDK 11+ support. All builds still target Java 1.8. 2022-08-05 00:17:00 -04:00
Alex Vasile
137f02f31b Added AI Targeting for TargetActivatedOrTriggeredAbility. Closes #9276. 2022-07-17 00:29:39 -04:00
Alex Vasile
b85353bf25 Fix double-click needed to auto-choose blockers. Closes #9255. 2022-07-14 11:25:31 -04:00
Alex Vasile
96f6fbefc8
GUI: Autochoose targets if choice can be made (#9206) 2022-07-08 21:58:42 -04:00
Alex Vasile
5e7f145e3d
Fix message for choose target dialog for distributing +1/+1 counters (#9202) 2022-07-08 21:42:42 -04:00
DeepCrimson
33dd776b77
Refactor: Delete Unused ComputerPlayer2 (#9230)
For #9179
2022-07-05 12:59:46 -04:00
DeepCrimson
f99da274cd
Refactor: Remove Unused ComputerPlayer3 (#9220) 2022-07-04 23:13:23 -04:00
DeepCrimson
12595ac651
Refactor: Replace unnecessary Collections.sort with List.sort (#9168) 2022-06-26 22:59:28 -04:00