Compare commits

...

2437 Commits

Author SHA1 Message Date
Hans Mackowiak
f14454e992 fix Tests for now 2025-06-01 23:21:49 +02:00
Hans Mackowiak
e4799a4f73 ImageKeys: unify PaperCard imageKeys 2025-06-01 23:09:27 +02:00
Seth Milliken
7fa89cbc2e fix: do not steal keyboard focus when "Visually Alert on Receipt of Priority" is enabled
When the "Visually Alert on Receipt of Priority" feature is enabled,
the `showTab()` call at the beginning of `forge.gui.framework.SDisplayUtil.remind()`
steals focus from the primary button whenever anything goes on the
stack.

This change, previously suggested by pfps as probably not necessary, is
indeed necessary after all to prevent that focus stealing by restoring
focus to the previous owner only if the owner was an `FButton`.

fixes https://github.com/Card-Forge/forge/issues/7660
2025-06-01 14:17:09 -04:00
Greg Sonnier
567e13c92b fixed locke_treasure_hunter.txt unblockable condition (#7752) 2025-06-01 08:30:27 +00:00
Hans Mackowiak
6f5a933de3 CardState: Refactor LandAbility/Aura/PermSpell (#7680)
* CardState: Refactor LandAbility/Aura/PermSpell

* Update CardState.java

Fix Room

* unify manaAbilities and nonManaAbilities and fix Room cards

* CardView: fix Left&Right Split not update abilities

* AbilityFactory: make Fuse Ability Secondary

* CardFactory: remove extra logic for LeftSplit and RightSplit

* AbilityFactory: set OriginalAbility for Fuse Parts

* SpellPermanent: fix Desc for CardState

* PermanentCreatureEffect: use getBasePowerString/getBaseToughnessString

* LandAbility: fix Modal Lands
2025-06-01 09:53:40 +02:00
kvn1338
e40567c9c8 Add TextBoxExchangeEffect Ability and 'Deadpool, Trading Card' (#7637)
* capure Textboxes to avoid LKI copy

* Fix copying keyworded traits twice

* Support keepTextChanges across all traits

Co-authored-by: kvn <kevni@secure.mailbox.org>
Co-authored-by: tool4EvEr <tool4EvEr@>
2025-06-01 07:19:50 +00:00
tool4ever
928ac875b5 Fix only turning fully unlocked rooms face down (#7742)
Co-authored-by: tool4EvEr <tool4EvEr@>
2025-05-31 13:28:52 +02:00
Paul Hammerton
f4831bc51b Merge pull request #7740 from paulsnoops/edition-updates
Edition updates: FCA, FIC, FIN, SLD
2025-05-31 11:19:28 +01:00
Paul Hammerton
d3e0e79325 Edition updates: FCA, FIC, FIN, SLD 2025-05-31 11:05:48 +01:00
Renato Filipe Vidal Santos
ac3015eff1 Add files via upload (#7730) 2025-05-31 07:52:06 +00:00
tool4ever
554e73e352 Fix Estinien Varlineau (#7738) 2025-05-31 06:42:04 +00:00
Hans Mackowiak
fe86bb1be3 line endings 2025-05-31 00:01:54 +02:00
Fulgur14
f98eca3925 The FINAL Fantasy cards (#7736) 2025-05-30 18:01:51 +00:00
Fulgur14
8506fd2bab 4 FIN cards (#7727) 2025-05-30 18:01:34 +00:00
Hans Mackowiak
c2ffa227e2 Saga: do State-Based and Turn-Based Action only with Chapters (#7737) 2025-05-30 17:16:15 +00:00
Hans Mackowiak
f33f780b25 line endings 2025-05-30 18:58:30 +02:00
Renato Filipe Vidal Santos
855e4dcabd FIN: Memories Returning (#7731) 2025-05-30 10:23:13 +02:00
Fulgur14
40c9a06b21 Couple fixes (#7732)
* Update breaching_hippocamp.txt

* Update skanos_dragon_vassal.txt
2025-05-30 08:52:06 +03:00
Chris H
7c4cf9425f Update INSTALLATION.txt 2025-05-29 10:11:13 -04:00
Fulgur14
d2a6329e03 Leaked Rydia and Exdeath (FIN) (#7725)
* Leaked Rydia and Exdeath (FIN)

* Update exdeath_void_warlock_neo_exdeath_dimensions_end.txt

* Update rydia_summoner_of_mist.txt
2025-05-29 13:33:12 +03:00
Renato Filipe Vidal Santos
6e2717e371 FIN: 11 cards (#7724) 2025-05-29 09:22:54 +00:00
Chris H
2152b7ca7d Fix line endings 2025-05-28 23:25:57 -04:00
Fulgur14
08387f12cb Summon: Brynhildr (FIN) (#7722) 2025-05-28 19:48:22 +00:00
tool4ever
01800d3c49 Update summon_valefor.txt 2025-05-28 19:03:00 +02:00
Fulgur14
2b3735662e 7 FIN cards (#7721) 2025-05-28 18:59:07 +02:00
Renato Filipe Vidal Santos
5ab2b44343 FIN: Golbez, Crystal Collector 2025-05-28 18:48:42 +02:00
Renato Filipe Vidal Santos
0bdb9d7d27 FIN: 7 cards (#7717)
* Add files via upload

* Update thiefs_knife.txt

* Update swallowed_by_leviathan.txt

* Update aether_spike.txt

* Update swallowed_by_leviathan.txt
2025-05-28 15:45:16 +02:00
Renato Filipe Vidal Santos
1f4cebf186 FIN: The Masamune (#7719) 2025-05-28 14:04:50 +02:00
rwalters
f651a7d73d (Adventure Mode) Fix quest references and step requirements (#7697)
* Fixing an issue in which touching the space the map occupies outside of the world map does not allow the player to move (very relevant on maps with content in the top left corner)

* Fixing several text based references that looked created in bulk with similar problems. Kiora and Teferi don't require going back to the town that issued the quest, and the others reference the wrong location when arriving there for where the reputation goes
2025-05-28 11:45:24 +03:00
Fulgur14
453bae6849 Summon: G.F. Cerberus and X-ATM092 (FIN) (#7715) 2025-05-28 09:47:38 +02:00
Fulgur14
292cca0727 10 FIN cards, batch #3 (#7713) 2025-05-28 05:43:27 +00:00
Fulgur14
24f568101f 10 FIN cards, batch #2 (#7712) 2025-05-28 05:41:34 +00:00
tool4ever
ad73651382 Prishe's Wanderings: support CantSearch case (#7711) 2025-05-28 05:40:38 +00:00
Chris H
476f3dfe9c Fix line endings 2025-05-27 16:07:02 -04:00
Fulgur14
5977129096 10 FIN cards (#7710) 2025-05-27 19:58:55 +00:00
Greg Sonnier
44e243d428 fixed hraesvelgr_of_the_first_brood.txt mana cost (#7708) 2025-05-27 18:21:55 +00:00
Fulgur14
491e275b8a Rufus and Seifer (#7707) 2025-05-27 16:54:42 +00:00
Renato Filipe Vidal Santos
7bf6ba0779 FIN: Minwu (#7706) 2025-05-27 16:30:54 +00:00
Fulgur14
ea33d589ae Diamond Weapon (FIN) (#7702) 2025-05-27 16:30:02 +00:00
Renato Filipe Vidal Santos
1314c98a5a Add files via upload (#7701) 2025-05-27 17:29:23 +03:00
Fulgur14
66c1c485f2 Magic Damper (FIN) (#7704) 2025-05-27 14:28:41 +00:00
Hans Mackowiak
fe1d37bed6 Update Ikoria Lair of Behemoths.txt
Closes #7700
2025-05-27 13:34:38 +02:00
Fulgur14
64d54dc7c7 Gysahl Greens (FIN) (#7699) 2025-05-27 08:24:08 +00:00
Renato Filipe Vidal Santos
050cebf944 FIN: 6 cards (#7696) 2025-05-27 08:22:13 +02:00
Renato Filipe Vidal Santos
42e5d9437b Adventure cleanup: 2025-05-26 (#7695)
* Add files via upload

* Update quests.json

* Update quests.json

* Update shops.json

* Update skep_outer.tmx
2025-05-27 07:20:08 +03:00
Fulgur14
67aaf9902e Cactuar and Light of Judgment (FIN) (#7692) 2025-05-26 20:15:52 +00:00
Fulgur14
3d0436aeca Restoration Magic (FIN) (#7690) 2025-05-26 22:32:28 +03:00
Simisays
827d60610d Update fort_white_4_farm.tmx (#7694) 2025-05-26 22:29:53 +03:00
Renato Filipe Vidal Santos
69a1d76778 FIN: 2 cards 2025-05-26 18:15:15 +00:00
tool4ever
7bd5dbbe28 Fix text change of keywords missing traits (#7689) 2025-05-26 15:41:16 +00:00
Fulgur14
39613a8413 3 FIN commons (#7688) 2025-05-26 14:42:26 +00:00
Renato Filipe Vidal Santos
225ff335e8 FIN: Midgar, City of Mako (#7685) 2025-05-26 14:10:03 +00:00
Paul Hammerton
23a3de5446 Merge pull request #7684 from paulsnoops/edition-updates
Edition updates: FCA, FIN
2025-05-26 11:32:01 +01:00
Paul Hammerton
75fd7bbfda Edition updates: FCA, FIN 2025-05-26 11:27:50 +01:00
tool4ever
ed6a14e180 Fix LKI missing changed text (#7683) 2025-05-26 08:35:57 +00:00
Fulgur14
42b6d2c17d Dion, Bahamut's Dominant (FIN) (#7682) 2025-05-26 08:23:59 +00:00
Hans Mackowiak
9a93f0a16c TokenDb: fix Endure Token Images causing crash on Token Viewer (#7679) 2025-05-25 19:27:13 +02:00
Renato Filipe Vidal Santos
1c0d3031d3 MB2: 2 cards (#7678) 2025-05-25 17:05:22 +00:00
Hans Mackowiak
724697391c Update Aetherdrift Commander.txt 2025-05-25 18:03:42 +02:00
Renato Filipe Vidal Santos
7820c3f519 Adventure cleanup: 2025-05-25 (#7674)
* Update quests.json

* Update shops.json

* Update bluewizard_hard_bounce.dck

* Update kavu_domain.dck

* Update sandghoul.dck

* Update aerie_0.tmx

* Update barbariancamp_kobold_mine.tmx

* Update evilgrove_5_swamp.tmx

* Update grolnok_f1.tmx

* Update grove_1_bears.tmx

* Update black_castle.tmx

* Update blue_castle.tmx

* Update green_castle.tmx

* Update red_castle.tmx

* Update white_castle.tmx

* Update graveyard.tmx

* Update steppe.tmx

* Update town.tmx

* Update bog.tmx

* Update graveyard.tmx

* Update town.tmx

* Update maze_2.tmx

* Update slime_hive.tmx

* Update wastetown..tmx

* Update skep_outer.tmx

* Update tibalt_f1.tmx

* Update tibalt_f2.tmx

* Update tibalt_f3.tmx

* Update main.tsx

* Update enemies.json

* Update skep_outer.tmx

* Update items.json

* Update quests.json

* Update shops.json

* Update town_names_black.txt

* Update aerie_0.tmx

* Update sorins_amulet.txt

* Update sorins_boss_effect.txt
2025-05-25 16:35:28 +03:00
Renato Filipe Vidal Santos
fe80b3850e Update carrionette.txt (#7650) 2025-05-25 16:35:17 +03:00
rwalters
16a2ae6741 (Adventure Mode): Fix abandoned town (#7665)
* Fixing an issue in which touching the space the map occupies outside of the world map does not allow the player to move (very relevant on maps with content in the top left corner)

* Adventure Mode: Fix Quest_APortalToNowhere, in which the file path got moved but the point of interest json was not updated

* Manually altering points_of_interest.json instead of using the adventure editor tool

* Actual change was removed during synchronization with remote head, re-applying actual fix
2025-05-25 08:47:23 -04:00
tool4ever
ce19c4fb9d Update capricious_sliver.txt
Closes #7672
2025-05-24 20:21:00 +00:00
tool4ever
4911a7f951 Update professor_hojo.txt 2025-05-24 17:40:36 +00:00
Renato Filipe Vidal Santos
c6f994d47a Quick cleanup: 2025-05-24 2025-05-24 16:20:19 +00:00
Hans Mackowiak
f0a9077791 lf 2025-05-24 16:38:52 +02:00
Fulgur14
b6941a9b38 Gogo, Master of Mimicry (FIN) (#7655) 2025-05-24 13:16:13 +00:00
Fulgur14
7023eb10d3 10 FIN cards (Vaan and his band) (#7661)
* 4 FIN cards (Vaan and his band)

* Add files via upload

* Add files via upload

* Add files via upload
2025-05-24 16:12:46 +03:00
tool4ever
007e132559 UnlessCost: fix checking wrong payer (#7663)
* UnlessCost: fix checking wrong payer

---------

Co-authored-by: tool4EvEr <tool4EvEr@>
2025-05-24 12:10:48 +02:00
tool4ever
9b9fdb2e5e Edgar, King of Figaro and support (#7645) 2025-05-24 07:27:48 +00:00
Renato Filipe Vidal Santos
f1f4310608 FIN: Black Waltz No. 3 2025-05-24 06:36:44 +00:00
Renato Filipe Vidal Santos
8634f96e4b FIN: 3 cards (#7646) 2025-05-23 15:20:26 +00:00
Fulgur14
6eed4c31a2 Raubahn, Bull of Ala Mhigo (FIN) (#7659) 2025-05-23 14:22:31 +00:00
Hans Mackowiak
c7b9934072 ImageFetcher: add downloadUrl for HiddenCard (#7651) 2025-05-23 13:51:00 +02:00
Paul Hammerton
cc50d72d63 Merge pull request #7654 from paulsnoops/edition-updates
Edition updates: FCA, FIN, SLD
2025-05-23 10:10:34 +01:00
Paul Hammerton
fbceab3252 fix-the-gold-saucer 2025-05-23 10:06:11 +01:00
Paul Hammerton
780491ae4b Edition updates: FCA, FIN, SLD 2025-05-23 09:56:26 +01:00
tool4ever
994471e9b6 Update verazol_the_split_current.txt 2025-05-23 10:50:35 +02:00
Chris H
e1bf639e90 Fix broken json in tmx file 2025-05-22 21:43:40 -04:00
Chris H
4386cead3e Fix end lines 2025-05-22 21:43:19 -04:00
Fulgur14
9b0d0f7924 8 FIN Cards (#7648) 2025-05-22 20:53:45 +00:00
Fulgur14
b9be1bc647 Omega, Heartless Evolution (FIN) (#7647) 2025-05-22 17:16:10 +02:00
tool4ever
513e4c6c8d Update hraesvelgr_of_the_first_brood.txt 2025-05-22 16:37:28 +02:00
tool4ever
0f5b67a504 Update lyse_hext.txt 2025-05-22 16:36:52 +02:00
Fulgur14
72f455067f Tellah, Great Sage (FIN) (#7644) 2025-05-22 16:36:13 +02:00
Hans Mackowiak
6dc508b631 ~fix Token ImageKeys without Set (#7643) 2025-05-22 09:29:33 +03:00
Hans Mackowiak
deecf128c3 Fix Henzie again with SvarFallback (#7604)
* Fix Henzie again with SvarFallback

* henzie rename Svar
2025-05-22 07:20:22 +02:00
Renato Filipe Vidal Santos
5f497669e5 Quick cleanup: 2025-05-21 (#7642) 2025-05-21 20:16:00 +00:00
Fulgur14
90952d95c9 Summon: G.F. Ifrit (FIN) (#7641) 2025-05-21 18:49:24 +00:00
Renato Filipe Vidal Santos
5a5ef52492 FIN: Clash of the Eikons 2025-05-21 18:27:22 +00:00
Fulgur14
3b4df7211c Jenova, Snow, and Ether (FIN) (#7638) 2025-05-21 18:25:28 +00:00
Renato Filipe Vidal Santos
45329a6df0 FIN: 5 more cards (#7627) 2025-05-21 18:25:11 +00:00
Fulgur14
22607adf57 Qiqirn Merchant and the 9 remaining Town duals. (#7639) 2025-05-21 18:06:34 +00:00
Agetian
bd9c72fee9 - Update Libgdx to 1.13.5. (#7636) 2025-05-21 18:12:33 +03:00
Renato Filipe Vidal Santos
35641265dd Update remorseless_punishment.txt (#7635) 2025-05-21 17:43:05 +03:00
Renato Filipe Vidal Santos
fe37a8358b Fixing Firion (#7633) 2025-05-21 14:23:56 +00:00
Fulgur14
bb7ae64ef8 Slash of Light (FIN) (#7632) 2025-05-21 09:46:28 +00:00
Fulgur14
4d9db78cc3 Aettir and Priwen (FIN) (#7631) 2025-05-21 06:18:15 +00:00
Agetian
ce46c684b5 - Fix AI logic for Sorin, Vengeful Broodlord. (#7630) 2025-05-21 09:03:54 +03:00
Fulgur14
29d4e716f5 The remaining 4 Crystals and some other FIN cards (#7628) 2025-05-21 05:02:21 +00:00
Chris H
c6bfdd5b78 Landscape Sketchbook expansion (#7618)
* Expand landscape sketchbooks

* Remove the sketchbooks for sale that are earned via quests
2025-05-21 06:57:58 +03:00
Hans Mackowiak
559daf9fce update ImageKey for Other 2025-05-20 22:58:22 -04:00
Hans Mackowiak
9caa024fa5 transformed token image 2025-05-20 22:58:22 -04:00
Hans Mackowiak
3605b4e34e uppercase token set and fallback token 2025-05-20 22:58:22 -04:00
Hans Mackowiak
56832ff987 ~ update set token image location 2025-05-20 22:58:22 -04:00
Hans Mackowiak
338bb09747 PaperToken: cleanup imageKey without collectorNumber 2025-05-20 22:58:22 -04:00
Hans Mackowiak
b57a5e9ad1 PaperToken: add CollectorNumber and update Downloader 2025-05-20 22:58:22 -04:00
Simisays
67f8f4760e Update skep_outer.tmx 2025-05-20 22:51:20 -04:00
Ryan Walters
485427c682 Fix poi references and an exception generated by failing to address non-swapped poi references, focusing on quest 18, A Focused Mind 2025-05-20 09:05:21 -04:00
Renato Filipe Vidal Santos
8852732e6b FIC: 4 cards (#7624) 2025-05-20 12:27:28 +00:00
Renato Filipe Vidal Santos
6264761117 Quick cleanup: 2025-05-20 (#7622) 2025-05-20 11:07:29 +00:00
Paul Hammerton
a3b1c98abf Merge pull request #7620 from paulsnoops/edition-updates
Edition updates: FCA, FIC, FIN, PF25, PPRO, PSS5, PW25, SCH, SLD
2025-05-20 11:10:31 +01:00
Paul Hammerton
c566a4bed8 oops 2025-05-20 10:59:42 +01:00
Paul Hammerton
a16e2a9c37 don't add FSPL because JP only and same art 2025-05-20 10:53:43 +01:00
Paul Hammerton
f80bb13ed7 Edition updates: FCA, FIC, FIN, FSPL, PF25, PPRO, PSS5, PW25, SCH, SLD 2025-05-20 10:48:58 +01:00
Fulgur14
1c350b1766 From Father to Son (FIN) (#7619) 2025-05-20 09:24:36 +00:00
Fulgur14
0b5ce9c8fc Add 4 cards [FIN]
* Add files via upload

* Update TypeLists.txt

* Create g_1_1_frog.txt

* Update quina_qu_gourmet.txt

I realized that I forgot to set the amount of tokens.
2025-05-20 09:52:01 +03:00
Fulgur14
74c7f4b164 Coral Sword (FIN) (#7614) 2025-05-20 09:47:02 +03:00
Fulgur14
6128f1d720 Queen Brahne and Lindblum (FIN) (#7615)
* Add files via upload

* Add files via upload
2025-05-20 09:46:48 +03:00
Fulgur14
9e2dcbb630 Haste Magic (FIN) (#7616) 2025-05-20 09:46:12 +03:00
Hans Mackowiak
ec9fc88734 ~ fix IterableUtil.and and Iterable.or usage (#7607) 2025-05-20 05:47:26 +02:00
Renato Filipe Vidal Santos
59c404f6c4 Cleanup: Blazing Crescendo (#7617) 2025-05-19 19:40:00 +00:00
Renato Filipe Vidal Santos
fd727a909b Update white_auracite.txt (#7613) 2025-05-19 16:59:50 +02:00
Chris H
ce6ad65e12 Add some combat tests for the AI to help improve poor combat areas (#7600)
* Add some basic testing for AI Combat decisions

* Add some basic testing for AI Combat decisions
2025-05-19 12:30:53 +03:00
tool4ever
6b65f8972c Update lupine_prototype.txt 2025-05-19 09:05:03 +02:00
Renato Filipe Vidal Santos
2e7fe8a81b FIN: Ice Flan 2025-05-19 07:35:42 +02:00
tool4ever
6f9db790a6 Fix updating room in exile (#7608)
* Fix wrong zone breaking X
2025-05-18 18:04:48 +00:00
Simisays
645aff52cb Fix Sanguine Soothsayer (#7606) 2025-05-18 11:38:51 +00:00
Hans Mackowiak
4d4afbdf03 lf 2025-05-18 13:01:33 +02:00
Renato Filipe Vidal Santos
a8c1f5c969 Quick cleanup: 2025-05-17 (#7597) 2025-05-18 09:33:29 +00:00
Fulgur14
0f4c94d6f8 PuPu UFO (#7603) 2025-05-18 09:33:06 +00:00
Renato Filipe Vidal Santos
53479c60b4 Fixing Living Lectern, Embereth Veteran (#7599)
* Update living_lectern.txt

* Update embereth_veteran.txt
2025-05-18 09:43:22 +02:00
Chris H
0c7b8c5b04 Collecting Landscape Sketchbooks adds that set to the basic land dialog (#7602)
* Collecting Landscape Sketchbooks adds that set to the basic land dialog

* Optimize the edition mapping
2025-05-18 07:33:11 +03:00
tool4ever
7860957d8f Update astrologians_planisphere.txt 2025-05-17 16:04:24 +00:00
Renato Filipe Vidal Santos
07bc31f4c1 FIN: 2 more cards (#7592) 2025-05-17 12:37:01 +02:00
Paul Hammerton
99390f5967 Merge pull request #7595 from paulsnoops/edition-updates
Edition updates: FCA, FIC, FIN, RFIN, SLD
2025-05-17 11:29:12 +01:00
Paul Hammerton
ee8ca02128 Edition updates: FCA, FIC, FIN, RFIN, SLD 2025-05-17 11:12:04 +01:00
Hans Mackowiak
1bc7efba65 Update Cards with WithMayLook (#7593) 2025-05-17 10:39:20 +02:00
Hans Mackowiak
efc2357905 lf 2025-05-17 09:16:55 +02:00
Fulgur14
d5d01011f4 Update fandaniel_telophoroi_ascian.txt (#7590) 2025-05-17 06:21:34 +00:00
Fulgur14
c1a19ea4ae Buster Sword (FIN) (#7589) 2025-05-17 06:11:40 +00:00
Fulgur14
ad3fb1137a The Falcon, Airship Restored (FIC) (#7586) 2025-05-17 06:10:53 +00:00
Renato Filipe Vidal Santos
c5c6b36f4f FIC: last 2 cards + FIN: 2 cards (#7576)
* Add files via upload

* Add files via upload

* Add files via upload
2025-05-17 07:41:23 +03:00
Fulgur14
f2f92212bc How to suplex a train (#7578)
There's something strange with Phantom Train's ability where its P/T display doesn't update properly after getting the counter -- maybe because the counter is gained before animating?
2025-05-17 07:41:11 +03:00
Fulgur14
3226be58be Serah, Sazh, and Anima (FIN) (#7585)
* Serah, Sazh, and Anima (FIN)

* Update serah_farron_crystallized_serah.txt
2025-05-17 07:41:03 +03:00
Renato Filipe Vidal Santos
46cfcff0ca Update dancers_chakrams.txt 2025-05-16 23:01:48 -04:00
Fulgur14
b161c9612b Triple Triad (FIN) (#7572) 2025-05-16 18:43:59 +00:00
Renato Filipe Vidal Santos
91dee5c379 FIN: another 2 cards 2025-05-16 18:43:47 +00:00
Fulgur14
349129f88f Quistis Trepe (FIN) (#7581) 2025-05-16 15:50:27 +00:00
Hans Mackowiak
57ea25bbbd Update white_auracite.txt
Closes #7579
2025-05-16 15:43:11 +02:00
Hans Mackowiak
d1725af64d Update urianger_augurelt.txt
Close #7575
2025-05-16 13:19:14 +02:00
Fulgur14
72626ef214 Choco, Seeker of Paradise and Paladin's Arms (FIN) (#7571) 2025-05-16 06:25:02 +00:00
Chris H
e00d5ee30b Fix line endings 2025-05-15 22:19:14 -04:00
tool4ever
d6c42c3c8c Update hildibrand_manderville.txt
Closes #7574
2025-05-15 21:06:53 +00:00
Greg Sonnier
950a1f2a44 fixed missing cleanup in graha_tia_scion_reborn.txt (#7573) 2025-05-15 20:35:17 +00:00
Renato Filipe Vidal Santos
c895b0eeab FIC: yet another 5 cards (#7570) 2025-05-15 18:50:48 +00:00
Fulgur14
82c8fb20e8 Jecht and 2 other FIN cards (#7562) 2025-05-15 18:18:20 +02:00
Fulgur14
cf54f3e04e Relm's Sketching (FIN) (#7569) 2025-05-15 17:27:05 +02:00
Fulgur14
f4958a4b49 9 FIC/FIN cards... plus a token (#7561) 2025-05-15 15:51:13 +02:00
Renato Filipe Vidal Santos
760f9412ff FIC: another 5 cards 2025-05-15 15:15:57 +02:00
Fulgur14
71f2d41eb0 Sin, Unending Cataclysm (FIC) (#7563) 2025-05-15 15:15:38 +02:00
Fulgur14
51d7933ef3 10 FIC cards, batch 3 (#7547) 2025-05-15 15:13:45 +02:00
Fulgur14
f5938b47e1 10 FIN/FIC cards, batch 8 2025-05-15 15:13:35 +02:00
tool4ever
807d078799 Support for Lifestream's Blessing (#7565) 2025-05-15 15:11:20 +02:00
Renato Filipe Vidal Santos
bedb97183b FIC: 7 more cards (#7557) 2025-05-15 15:11:04 +02:00
Fulgur14
08919e3375 Summon: Yojimbo and Capital City (#7568) 2025-05-15 14:34:19 +02:00
Fulgur14
a117d65f51 10 FIN/FIC cards, batch 9 (#7560) 2025-05-15 14:19:26 +02:00
Fulgur14
b61e3015f3 8 FIN/FIC cards (#7556) 2025-05-15 13:09:49 +02:00
Fulgur14
83a512a075 10 FIN/FIC cards, batch 5 (#7550) 2025-05-15 13:08:39 +02:00
Fulgur14
c1630a2e47 Rejoin the Fight (FIC) 2025-05-15 13:08:11 +02:00
Fulgur14
1d0b50356f Auron's Inspiration (FIN) (#7566) 2025-05-15 12:34:13 +02:00
Hans Mackowiak
43d82ce1ce lf 2025-05-15 07:08:09 +02:00
tool4EvEr
c4a8765d6c 2 fixes 2025-05-14 21:27:00 -04:00
Chris H
15d49bc1b1 - Sort inventory by item type 2025-05-14 20:36:46 -04:00
Chris H
d84712b65d Lock smith prices when you click the Smith button 2025-05-14 20:36:28 -04:00
Fulgur14
eac94f7249 10 FIN/FIC cards, batch 6 (#7553) 2025-05-14 17:18:28 +02:00
rpg2014
d134c3dfcd Cleaned up the High DPI monochrome image
Cleaned up some pixels from the high dpi monochrome android icon
2025-05-14 09:09:15 -04:00
rpg2014
0a03327299 Adding monochrome icon to the android app
Added monochrome icon pngs for each mipmap size and added them to the xml configs for the icons.  The monochrome icons were made by editing the respective icon in paint.net.
2025-05-14 09:09:15 -04:00
Fulgur14
0a673aeadc 10 FIC/FIN cards, batch 4 (#7548) 2025-05-14 10:54:45 +02:00
Paul Hammerton
40f7a9a22a Edition updates: FCA, FIC, FIN, SLD 2025-05-14 09:22:30 +01:00
Paul Hammerton
e2ccf8960a Merge pull request #1 from paulsnoops/edition-updates
Edition updates: FCA, FIC, FIN, SLD
2025-05-14 09:18:05 +01:00
Paul Hammerton
66acc6b920 oops lands 2025-05-14 09:15:41 +01:00
Paul Hammerton
83abcf7c44 Update Final Fantasy.txt 2025-05-14 09:13:00 +01:00
Paul Hammerton
ef9d807b6e Update Final Fantasy Commander.txt 2025-05-14 09:04:54 +01:00
Paul Hammerton
83f334888e Update Final Fantasy Through the Ages.txt 2025-05-14 08:58:38 +01:00
Paul Hammerton
8359cfda35 Edition updates: FIC, FIN, SLD 2025-05-14 08:53:21 +01:00
Fulgur14
93b2d7c795 19 FIN/FIC cards + tokens/counters (#7525) 2025-05-14 07:30:38 +00:00
rwalters
ea74cc8f7f Fix enemy name (#7551)
* Fixing an issue in which touching the space the map occupies outside of the world map does not allow the player to move (very relevant on maps with content in the top left corner)

* Fix a misspelling in the name of a Merfolk Warrior when being previewed before a battle
2025-05-14 06:46:00 +03:00
Fulgur14
4e16a5ea60 Update dancers_chakrams.txt (#7549) 2025-05-13 23:23:48 +02:00
Renato Filipe Vidal Santos
00325fb511 MB2: Value Town 2025-05-13 20:52:52 +02:00
Renato Filipe Vidal Santos
fe042fa6d9 FIC: 5 cards (#7541) 2025-05-13 20:24:15 +02:00
Fulgur14
6830f15859 10 FIC/FIN cards, batch 2 (#7543) 2025-05-13 20:23:43 +02:00
Renato Filipe Vidal Santos
fb3a8ce003 FIC: another 5 cards (#7545) 2025-05-13 20:21:53 +02:00
tool4ever
edc6edc44b Support for Lord Jyscal Guado (#7546) 2025-05-13 20:21:12 +02:00
tool4ever
40b3edd426 Update charismatic_conqueror.txt 2025-05-13 18:58:06 +02:00
Fulgur14
f50aea1576 10 FIC/FIN cards, batch 1 (#7542) 2025-05-13 17:53:35 +02:00
Renato Filipe Vidal Santos
4ab67b1d3b FIN: 10 more cards (#7528) 2025-05-13 17:39:48 +02:00
Chris H
a4e4525769 Remember card not spell for tibalts trickery (#7539) 2025-05-13 17:08:40 +02:00
Hans Mackowiak
1d664145e0 Update Dominaria United.txt
Note from Scyfall:

Dominaria United series of 26 tokens
Dominaria United comes with two sets of tokens: a series of 26 bearing either DMU or DMC set codes, and a separate series of 12 tokens with exclusively the DMC set code. We don't know why they did things this way. We've opted to file the entire series of 26 here regardless of set code to avoid archival conflicts.
2025-05-13 10:11:26 +02:00
Fulgur14
32355499aa Matoya, Archon Elder and Valkyrie Aerial Unit (#7535) 2025-05-13 07:18:31 +02:00
Fulgur14
a475855c4c Update cunning_azurescale_divining_dive.txt (#7540) 2025-05-13 06:52:27 +02:00
Fulgur14
598d3a4958 Update esper_origins_summon_esper_maduin.txt 2025-05-12 23:36:54 -04:00
Fulgur14
35a4053212 Update sevinnes_reclamation.txt 2025-05-12 23:36:54 -04:00
Fulgur14
9d770a9bca Esper Origins and Ishgard, the Holy See (FIN) 2025-05-12 23:36:54 -04:00
Paul Hammerton
de15ab3a71 Alchemy Rebalancing for May 13, 2025 2025-05-12 23:33:07 -04:00
rwalters
35bc80767f Fix exit to world map edge cases (Adventure) (#7522)
* Fixing an issue in which touching the space the map occupies outside of the world map does not allow the player to move (very relevant on maps with content in the top left corner)

* Attempt to band-aid two problems relating to showing a dialog to return to the main map, one in which some patrolling enemies ignore the menu restriction and another in which such enemies touching a player who is transitioning out of a dungeon causing a soft lock upon returning to the map
2025-05-12 23:28:00 -04:00
Simisays
ef28a92dff update 2025-05-12 23:15:13 -04:00
Chris H
99f3ccb8d6 Fix endlines 2025-05-12 18:03:04 -04:00
Simisays
16148ec992 10 cards (#7485) 2025-05-12 21:41:22 +03:00
rwalters
93f7987312 Fix on the hunt hole (Adventure) (#7516)
* Fixing an issue in which touching the space the map occupies outside of the world map does not allow the player to move (very relevant on maps with content in the top left corner)

* Fix an edge case where the On The Hunt quest can end up failing to ever spawn an enemy to hunt

---------

Co-authored-by: Agetian <stavdev@mail.ru>
2025-05-12 13:26:49 +03:00
Paul Hammerton
c7816daaf6 Remove Explorer from archived formats and net decks (#7524) 2025-05-12 13:14:17 +03:00
Simisays
bc458ecde4 FIN 10 cards (#7526) 2025-05-12 12:13:22 +02:00
Fulgur14
e4da62c254 3 FIN/FIC cards (#7529)
* 3 FIN cards

* Update starting_town.txt
2025-05-12 09:50:07 +02:00
Fulgur14
53588dfc24 Terra, Magical Adept (#7531)
* Terra, Magical Adept
2025-05-12 09:48:44 +02:00
Renato Filipe Vidal Santos
61c11b38a0 FIN: 4 Job select cards and support (#7520)
* Update CardFactoryUtil.java

* Update Card.java

* Update Keyword.java

* Update white_mages_staff.txt

* Update dragoons_lance.txt

* Update black_mages_rod.txt

* Update summoners_grimoire.txt

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2025-05-12 09:47:18 +02:00
tool4ever
fdcc33198b Update rhonas_the_indomitable.txt
Closes #7530
2025-05-12 08:13:13 +02:00
Hans Mackowiak
dd7a0e99e2 ~ lf 2025-05-12 07:00:53 +02:00
Hans Mackowiak
cb0e594a6e CardEdition: add collector number for other (#7504)
* CardEdition: add collector number for other

* EditionEntry record

* Add getOtherImageKey

* Update StaticData.java

* use getOtherImageKey in getFacedownImageKey

* Update CardEdition.java

Remove findOther in favor of getOtherSet

* Update CardEdition.java

return findOther, but with Aggregates.random

* ~ move more helper images to ImageKeys
2025-05-12 06:59:20 +02:00
tool4ever
059881a7b5 Some support for Desert Cenote (#7505)
---------

Co-authored-by: tool4EvEr <tool4EvEr@>
2025-05-11 18:19:37 +00:00
Jetz
ca59ac925c Fix weird behavior in image view with certain filters 2025-05-11 10:00:31 -04:00
Fulgur14
0b5f14cd9c 5 FIN cards (#7518) 2025-05-11 10:27:38 +00:00
Paul Hammerton
1d987c25e9 Merge pull request #7523 from paulsnoops/edition-updates
Edition updates: FCA, FIC, FIN, PF25, PLG25, SLD
2025-05-11 10:43:43 +01:00
Paul Hammerton
5cb68bc2f0 Edition updates: FCA, FIC, FIN, PF25, PLG25, SLD 2025-05-11 10:36:31 +01:00
Hans Mackowiak
1715efced7 FIN: Tiered (#7517)
* Tiered: first example

* use ModeCost for both Spree and Tiered
2025-05-11 09:38:23 +02:00
Chris H
aeb39b99bb If the AI cloned your deck, don't use your deck as a reward base if there aren't more than 5 choices. 2025-05-10 09:05:54 -04:00
Renato Filipe Vidal Santos
778066a622 FIN: Y'shtola Rhul (#7514) 2025-05-10 11:04:03 +00:00
Jetz
75a056abe6 Add a parameter for battle protection RE that can be used to override it for custom types. 2025-05-09 23:19:42 -04:00
Jetz72
3915f316e2 Unused Import 2025-05-09 23:19:42 -04:00
Jetz
b52646ee7e Delete some logic that doesn't currently work 2025-05-09 23:19:42 -04:00
Jetz
cb1d48a566 Support for non-siege battles 2025-05-09 23:19:42 -04:00
Ryan Walters
733d56246e Fixing an issue in which touching the space the map occupies outside of the world map does not allow the player to move (very relevant on maps with content in the top left corner) 2025-05-09 23:18:45 -04:00
distillate personality
7902ad71d7 Update forge-gui-mobile/src/forge/adventure/data/AdventureQuestStage.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-09 21:54:11 -04:00
birdbath
2666de0adb Fix for 'Fetch' objectives that allows the user to 'Use' an item in their inventory at the PoI to complete the objective instead. 2025-05-09 21:54:11 -04:00
Renato Filipe Vidal Santos
c2613a03b0 FIC: Yuna, G'raha and new token (#7512) 2025-05-09 08:26:30 +02:00
Chris H
b077cca3ac Fix line endings 2025-05-08 22:09:22 -04:00
Fulgur14
43fc281e65 Hildibrand Manderville (FIC) 2025-05-08 20:25:13 +00:00
Fulgur14
7b1f5d0a34 Zenos yae Galvus // Shinryu, Transcendent Rival (FIN) (#7503) 2025-05-08 20:05:13 +00:00
Paul Hammerton
330fe0a0a8 Merge pull request #7502 from paulsnoops/edition-updates
Edition updates: FIC, PURL, SLD
2025-05-07 18:08:15 +01:00
Paul Hammerton
30a4c24c35 Edition updates: FIC, PURL, SLD 2025-05-07 18:01:06 +01:00
Renato Filipe Vidal Santos
01a6a38285 YTDM: 4 cards (#7473) 2025-05-07 05:17:38 +00:00
Renato Filipe Vidal Santos
fe5aa37791 Update big_play.txt (#7500) 2025-05-07 06:43:39 +02:00
Simisays
42f1fba7c4 Adventure 3 small fixes (#7499)
* Update grolnok_f1.tmx

* update
2025-05-06 23:42:03 +03:00
autumnmyst
0c6f1ff58f UNF: Added the 4 eternal-format-legal dice modification/reroll cards (#7489) 2025-05-06 17:13:52 +00:00
Hans Mackowiak
8678b5ec5b Update Duskmourn House of Horror.txt
Moved to "other" section
2025-05-06 10:35:59 +02:00
Hans Mackowiak
71256972c4 Update Commander 2013.txt
remove token list
2025-05-05 22:32:37 +02:00
matthias8422
a76f23fc25 feature/Refactored-server-url-parsing-logic (#7496)
* HostPort now properly returns -1 when no port was specified

* refactored the URL parsing to now attempt a DNS lookup in cases where URI parsing fails
This now allows local computer names and localhost etc
2025-05-05 17:10:37 +00:00
Hans Mackowiak
3c7993d640 Update Secret Lair Drop Series.txt
Update token collector number and artist
2025-05-05 10:43:03 +02:00
Hans Mackowiak
71d984a5ff Update Archenemy.txt
reorder card list
2025-05-05 10:41:35 +02:00
Hans Mackowiak
be171c011a Volrath's Curse and Lost in Thought with Modes and IgnoreEffectCost (#7492)
* Refactor Damping Engine
2025-05-04 16:55:38 +00:00
tool4ever
becdd180f4 Some cleanup (#7493)
* Some cleanup

* Update StaticAbilityCantAttackBlock.java

* Some cleanup

---------

Co-authored-by: tool4EvEr <tool4EvEr@>
Co-authored-by: Hans Mackowiak <hanmac@gmx.de>
2025-05-04 18:11:00 +02:00
tool4ever
41efdb095a Update StaticAbilityCantAttackBlock.java 2025-05-04 12:25:24 +00:00
tool4ever
86453a6fa7 Update StaticAbilityCantAttackBlock.java 2025-05-04 12:24:22 +00:00
Hans Mackowiak
8448a6e20e Update cards with Static CantAttack or CantBlock (#7435)
* Update cards with Static CantAttack or CantBlock

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2025-05-04 13:14:58 +02:00
Hans Mackowiak
194662c9c7 StaticAbilityMode: add Enum and allow MultiMode (#7491) 2025-05-04 10:56:27 +02:00
Fulgur14
d3a33a0092 Update tifa_martial_artist.txt (#7488) 2025-05-03 21:12:06 +00:00
tool4ever
2bab13247c Some fixes (#7484) 2025-05-03 19:31:47 +02:00
Hans Mackowiak
da30b886c9 fix Card from Unknown Set calling getCardEdition 2025-05-03 16:47:39 +02:00
Hans Mackowiak
da38641ff8 Add CantBlock Mode (#7452) 2025-05-03 15:21:08 +02:00
Chris H
fcbc83c3ff Scryfall randomly changed the collector numbers 2025-05-02 16:03:25 -04:00
Hans Mackowiak
4ae93980b6 ~ remove last Unknown Artist 2025-05-02 09:42:04 -04:00
Hans Mackowiak
10b96138c3 ~ update other editions and remove wrong tokens 2025-05-02 09:42:04 -04:00
Hans Mackowiak
8706edbb01 CardEdition: have Token look for other Sets too 2025-05-02 09:42:04 -04:00
Renato Filipe Vidal Santos
4f5c074fe6 YTDM: 3 cards (#7448)
* Add files via upload

* Update loch_larent.txt
2025-04-30 19:55:06 +03:00
Hans Mackowiak
50ca71fc87 Update Return to Ravnica.txt 2025-04-30 13:24:44 +02:00
Hans Mackowiak
84134341e3 Update Bloomburrow Commander.txt
Update offspring token info
2025-04-30 09:58:39 +02:00
Hans Mackowiak
988518284c Update Bloomburrow.txt
Update offspring token info
2025-04-30 09:52:24 +02:00
Hans Mackowiak
1476621df1 CopyPermanentEffect: simplify getting PaperCard from DefinedName 2025-04-30 07:03:26 +02:00
Hans Mackowiak
cb8e13e933 Update Murders at Karlov Manor Commander.txt 2025-04-29 09:39:37 -04:00
Chris H
ea4d878a2d Update forge-gui/res/editions/Murders at Karlov Manor Commander.txt 2025-04-29 09:39:37 -04:00
Hans Mackowiak
eeafc6400c Update Commander Masters.txt 2025-04-29 09:39:37 -04:00
Hans Mackowiak
875b4557b0 Update Commander Anthology Volume II.txt 2025-04-29 09:39:37 -04:00
Hans Mackowiak
bec25c68f2 Update Commander Anthology.txt 2025-04-29 09:39:37 -04:00
Hans Mackowiak
f98aae35a5 Update Commander Legends Battle for Baldur's Gate.txt 2025-04-29 09:39:37 -04:00
Hans Mackowiak
b1acb9f0a3 Update Commander Legends.txt 2025-04-29 09:39:37 -04:00
Hans Mackowiak
89049db6a0 Update Modern Horizons 2.txt 2025-04-29 09:39:37 -04:00
Hans Mackowiak
77378855e3 Update Tarkir Dragonstorm Commander.txt 2025-04-29 09:39:37 -04:00
Paul Hammerton
709582086f Edition token section fixes 2025-04-29 09:39:37 -04:00
Paul Hammerton
7eda9e204e Merge pull request #7468 from paulsnoops/ytdm-formats
Format updates: YTDM
2025-04-29 11:29:43 +01:00
Paul Hammerton
cf94d96d95 Merge pull request #7467 from paulsnoops/edition-updates
Edition updates: FIC, SLD, UNK, YTDM
2025-04-29 11:29:31 +01:00
Paul Hammerton
a78d361b2e FIC 2025-04-29 11:23:53 +01:00
Paul Hammerton
d01619c09c UNK 2025-04-29 11:19:05 +01:00
Paul Hammerton
fd76098765 Format updates: YTDM 2025-04-29 11:13:51 +01:00
Paul Hammerton
9fb08f1695 Edition updates: SLD, YTDM 2025-04-29 11:09:12 +01:00
Hans Mackowiak
4eef86daf1 Card: add FacedownImageKey for better logic and set codes (#7459)
* Card: add FacedownImageKey for better logic and set codes
2025-04-29 07:32:51 +02:00
matthias8422
d74d2da755 Added a new Couldnt connect to server error message
Re wrote the URL parsing logic again, but due to increased complexity put it into a utility class
Fixed desktop version opening up a lobby even when it did not connect to a server
Wired up the new error message to mobile, and both error messages to Desktop
2025-04-28 17:56:08 -04:00
Simisays
f69fd12ebd Update quests.json
xira fix as well
2025-04-28 16:07:29 -04:00
Simisays
d41cdca1bd update 2025-04-28 16:07:29 -04:00
Chris H
acfc413465 Fix AI targeting illegally for each player destroy targeting (#7463) 2025-04-28 07:22:59 +03:00
Agetian
7a2ef6c9fd Update LDA data for Tarkir: Dragonstorm, add puzzle PS_TDM3 (Tarkir: Dragonstorm 03) (#7461)
* - Update LDA for Tarkir: Dragonstorm

* - Add puzzle PS_TDM3.
2025-04-28 07:16:06 +03:00
Chris H
b214b6f8bf Update font-list.txt 2025-04-26 23:46:01 -04:00
Chris H
4d75f7b225 Update fonts location 2025-04-26 23:46:01 -04:00
Chris H
b7db4b4cbc Fix if collector number is null 2025-04-26 22:40:43 -04:00
Chris H
efaca50d97 Fix accidentally removed other blocks 2025-04-26 22:40:43 -04:00
Chris H
0157113103 M-Z token fixes 2025-04-26 22:40:43 -04:00
Chris H
bf70d8e6f6 A-M token updates 2025-04-26 22:40:43 -04:00
Hans Mackowiak
30ac5ae381 Update Duskmourn House of Horror.txt
add artist
2025-04-26 22:40:43 -04:00
Chris H
dd94169c9a Download token images when token collector numbers are defined 2025-04-26 22:40:43 -04:00
Dave
4c24e7248d MTGO Cube 2025 04 (#7449)
* MTGO Vintage Cube 2025-04

* MTGO Vintage Cube 2025-04.draft

* MTGO Vintage Cube 2025-04.dck

* Update MTGO Vintage Cube 2025-04.dck

Use more standard versions of cards
2025-04-26 09:21:18 +03:00
Renato Filipe Vidal Santos
40eb8de90c Fixing Ravenous Harpy, Reaper of Flight Moonsilver (#7447) 2025-04-23 19:07:00 +00:00
Jetz
8f60973d95 Put back blank collector number suffix. 2025-04-23 12:48:03 -04:00
Jetz
bc9df8872f Added support for amount in give card command.
Added 'give print' command.
2025-04-23 12:48:03 -04:00
Renato Filipe Vidal Santos
1071089879 Cleanup: "During your turn" Oracle update, living metal (#7446) 2025-04-23 16:39:30 +02:00
Renato Filipe Vidal Santos
28ae7fa729 Cleanup: NumAtt$ & NumDef$, new cards 2025-04-23 11:01:27 +02:00
Hans Mackowiak
e9c5bc46ae CardEdition: add TokenInSet 2025-04-22 19:51:52 -04:00
Paul Hammerton
9308dac257 Merge pull request #7442 from paulsnoops/cmdr-bnr-22-apr-25
Commander Banned and Restricted Announcement for April 22, 2025
2025-04-22 20:34:36 +01:00
Paul Hammerton
f5fa87410b Commander Banned and Restricted Announcement for April 22, 2025 2025-04-22 20:29:07 +01:00
Renato Filipe Vidal Santos
c3167a9928 Cleanup: Optional wheel update 2025-04-22 10:41:29 +02:00
Pedro Durán
c533bee4b3 Update card translations (#7126) 2025-04-22 10:20:14 +02:00
matthias8422
01a3b2723f Fixed bug where android boolean settings were not properly displaying their checked state (#7440) 2025-04-21 17:53:53 +00:00
Hans Mackowiak
8640a2aaad ~ lf 2025-04-21 16:45:07 +02:00
Paul Hammerton
9f5e5f3068 Update Planeswalker Championship Promos.txt 2025-04-21 10:10:26 -04:00
Paul Hammerton
3db209f128 Update Media and Collaboration Promos.txt 2025-04-21 10:10:26 -04:00
Chris H
351a94281c Remove language code if we can't find it the first request 2025-04-21 10:10:26 -04:00
Chris H
f190e7e678 Add the ability to use hyphens in Collector numbers 2025-04-21 10:10:26 -04:00
Fulgur14
e01d3e0a6d Tifa, Martial Artist 2025-04-21 09:59:38 +00:00
Chris H
cb3fcb259f Revert "Add the ability to use hyphens in Collector numbers"
This reverts commit 0940e7433b.
2025-04-20 17:12:23 -04:00
Chris H
0940e7433b Add the ability to use hyphens in Collector numbers 2025-04-20 17:10:10 -04:00
tool4ever
8e48ff3dfa Update zenith_festival.txt 2025-04-20 17:57:07 +00:00
matthias8422
07b10f736b Feature/network improvement android (#7418)
* initial network improvements for mobile

* Fixed settings menu message referencing proper localization string
2025-04-20 17:34:24 +00:00
Drecon84
d0e4e5bd17 [Adventure] Quest order fix 2025-04-20 12:32:10 -04:00
Hans Mackowiak
fd082ffabb Fix implements IPref 2025-04-20 14:28:47 +02:00
Drecon84
520dcb88d6 [Adventure] Fixing fallback dialog in flower cave
This piece of code didn't work and produced a fallback dialog. Fixed the formatting to make it work as it was supposed to.
2025-04-19 22:44:37 -04:00
Jetz
a4138ebd4d Fix cards reverting to first art in set when game is restarted 2025-04-19 13:15:29 -04:00
tool4ever
1118f5b135 Fix UntilHostLeavesPlay corner case (#7430) 2025-04-19 14:35:07 +00:00
Renato Filipe Vidal Santos
e78f921e4d Update nantuko_slicer.txt (#7421) 2025-04-19 09:34:21 +00:00
tool4ever
a6ec235052 Fix Escalate (#7428) 2025-04-19 08:09:41 +00:00
Jetz72
613cc549f7 Update DraftEffect.java
Delete extra if statement
2025-04-18 19:21:37 -04:00
Jetz72
69c7083592 Update forge-game/src/main/java/forge/game/ability/effects/DraftEffect.java
Co-authored-by: Chris H <zenchristo@gmail.com>
2025-04-18 19:21:37 -04:00
Jetz
7f64e25691 Disable TokenCard flag on drafted cards by default. 2025-04-18 19:21:37 -04:00
Justin Babcock
2cb107380d Fix Knockout Maneuver wrong card type (#7425) 2025-04-18 20:13:36 +00:00
Drecon84
2a4eaea90a [Adventure] Fix for beating castles before getting there in main quest (#7391)
* First draft of the castle main quest bug workaround

Adds a possibility to start the game without the main quest and changes all castles to only let you into the gate if you either don't have a main quest active or are actively on the quest to defeat the castles.

* Rewrote main quest stuff

Wanted to decouple the main quest from the start of the game a little bit to allow the player to start without a main quest.

* Fully tested solution for main quest bug

Castles should now behave as expected.
Need to fix one minor bug still.

* Fixing the starting portal and wizard

This seems to have completely fixed the issues I have found with not starting with a main quest. Hopefully I have found all of the things that might break.
2025-04-18 12:54:09 -04:00
Paul Hammerton
8fdbaf3611 Merge pull request #7423 from paulsnoops/fix-sld
Edition updates: SLD
2025-04-18 09:19:06 +01:00
Paul Hammerton
55edec665f Edition updates: SLD 2025-04-18 09:15:41 +01:00
Paul Hammerton
f11c6a7038 Merge pull request #7422 from paulsnoops/edition-updates
Edition updates: PF25, SLD
2025-04-18 09:09:11 +01:00
Paul Hammerton
36150be7f3 Edition updates: PF25, SLD 2025-04-18 09:04:07 +01:00
Hans Mackowiak
b861994d2f add missing Enchant Keywords 2025-04-18 08:52:28 +02:00
matthias8422
0242189012 Fixed mobile server host UPnP dialog from accidently blocking ther GUI thread indefinatly (#7417) 2025-04-18 06:43:31 +00:00
tool4ever
69ddfdc18c Update envoy_of_the_ancestors.txt
Closes #7419
2025-04-18 06:39:56 +00:00
Hans Mackowiak
bef56d1caa add missing Enchant Keywords 2025-04-18 08:38:36 +02:00
tool4ever
c7f43e245d Fix missing LTB trigger (#7415) 2025-04-18 06:36:18 +00:00
Hans Mackowiak
939b7a22e0 Update fog_on_the_barrow_downs.txt 2025-04-18 06:12:52 +02:00
Jetz
a79a3503f5 Make PaperCardFlags serializable 2025-04-17 20:14:37 -04:00
NicolasCunha
9109207495 fix: concede shortcut not working due to event dispatch thread 2025-04-17 12:48:26 -04:00
Hans Mackowiak
dbac513027 Update tourachs_gate.txt 2025-04-17 16:50:31 +02:00
Hans Mackowiak
3152ac93f6 Update caribou_range.txt 2025-04-17 16:50:16 +02:00
Hans Mackowiak
fc56076f81 Update mystic_might.txt 2025-04-17 16:49:49 +02:00
Hans Mackowiak
ecc763faf6 Update hot_springs.txt 2025-04-17 16:48:50 +02:00
Hans Mackowiak
0130367873 Update bestial_bloodline.txt 2025-04-17 16:44:12 +02:00
Hans Mackowiak
c36b9b7610 Update ice_cage.txt 2025-04-17 16:18:30 +02:00
Renato Filipe Vidal Santos
774ab38335 Update nantuko_slicer.txt (#7413) 2025-04-17 15:34:10 +02:00
tool4ever
251ce2f83b Fix Torment of Hailfire in multiplayer (#7412)
Co-authored-by: TRT <>
2025-04-17 11:55:41 +03:00
Hans Mackowiak
2af47fe6df fix 'Land you control' auras 2025-04-17 06:43:04 +02:00
Hans Mackowiak
332c982695 Update crackling_emergence.txt
Fix Enchant
2025-04-17 05:58:03 +02:00
Hans Mackowiak
eb970665a6 Update harmonious_emergence.txt
Fix Enchant
2025-04-17 05:57:08 +02:00
Jetz72
4714319204 Store cards by collectorNumber instead of artIndex; PaperCard flag support (#7240)
* Refactor - Unknown set code to constant

* Refactor - Support for multiple initial selections for getChoices

* Covert noSell and marked color identities into serializable flags

* Fix cards in deck not being converted to newer noSell format

* unused imports

* Fix NPE

* Cleanup card filter

* Remove 14-year-old check that shouldn't be possible anymore

* CRLF -> LF

---------

Co-authored-by: Jetz <Jetz722@gmail.com>
2025-04-16 18:59:31 -04:00
tool4ever
c85214b9e3 Fix always targeting Graveyard with Aura (#7408) 2025-04-16 21:03:22 +00:00
tool4ever
d5854c9d1c Fix Artifact Possession (#7409) 2025-04-16 21:03:09 +00:00
Renato Filipe Vidal Santos
a3a2a5dd1b Update Reanimate, Kotis (#7403) 2025-04-16 11:22:23 +02:00
Chris H
8f155c9cca Verify we can still target before we add the target to our list (#7404) 2025-04-16 07:15:10 +02:00
matthias8422
366ed643a7 Feature/network improvements (#7365)
* Initial commit of network improvements
Seperated server properties into their own file, this will eventually help facilitate a headless server.
Fixed the localhost ip mapping to give the correct IP Address instead of failing and defaulting to "localhost"
Fixed UPnP as well as added some additional options and choices regarding UPnP
Added localization strings to all language files. (Translators will need to translate these, but the current English string is there for easy reference so they dont have to search the en-US file)

* Initial commit of network improvements
Seperated server properties into their own file, this will eventually help facilitate a headless server.
Fixed the localhost ip mapping to give the correct IP Address instead of failing and defaulting to "localhost"
Fixed UPnP as well as added some additional options and choices regarding UPnP
Added localization strings to all language files. (Translators will need to translate these, but the current English string is there for easy reference so they dont have to search the en-US file)

* Fixed properties file reference

* Refactored server address parsing logic to use the Java URI class for improved readability and robustness.
Extracted reusable code into separate functions to enhance modularity and maintainability.
General code cleanup to improve structure and readability.

* Fixed a potential issue if a protocol was already specified in the connection url.

* Removed logger implementation as changing loggers is out of scope for this PR
Reverted to JUPnP as its implementation is fixed in #7367
Made some of the new localization strings generic as they can be used elsewhere
Added a server.preferences.example file
removed the server port from the old location (forge.progile.properties.example)
Added a server port back into ForgeConstants as it doesnt make sense for the prefered hosting port of the user to override the default Forge connection port.

* resolve conflicts between this branch and master

* Implemented a parent class for all preference Enums so they can be passed into a function regardless of type using IPref, necessary since I separated server settings into its own FNetPref file
Added server preferences section to the preferences Desktop GUI
Added a port preference setting and a UPnP preference setting to the aforementioned server preferences section
Added a localizedComboBox and localizedComboBoxListener so that localized strings can be used in combobox dropdowns in the server preferences section.

TODO: (In scope)
The new server preferences section needs to be added to Android and IOS perhaps?

TODO: (out of scope)
GamePlayerUtil has a bunch on non localized english strings that should be converted to localized

* Fixed unused import

* Resolved merge conflicts
Added server settings to the reset to defaults function
2025-04-15 20:32:32 -04:00
tool4ever
e7becacd57 Fix StoreVoteNum (#7402)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-04-15 18:47:24 +02:00
Hans Mackowiak
2cf9293ab3 AttachAI: remove getFirstAttachSpell (#7400)
* AttachAI: remove getFirstAttachSpell

* Update GameAction.java

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2025-04-15 11:55:38 +03:00
Hans Mackowiak
88300de6e5 Update aligned_heart.txt
remove keywords
2025-04-15 07:02:53 +02:00
tool4ever
a4cb0924f3 Fix World rule (#7397) 2025-04-14 14:59:51 +00:00
Hans Mackowiak
e0001f8348 Update TokenAi, remove getFirstAttachSpell (#7398)
Removes getFirstAttachSpell
2025-04-14 16:47:53 +02:00
tool4ever
e380590c4c Fix Old-Growth Troll (#7396)
* Fix Old-Growth Troll

* Update GameAction.java

Add AI SVars to EmptySA

* Fix logic

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
Co-authored-by: Hans Mackowiak <hanmac@gmx.de>
2025-04-14 15:24:09 +02:00
Hans Mackowiak
7410a2844f Update dance_of_the_dead.txt
Remove NewAttach
2025-04-14 14:45:54 +02:00
tool4ever
b4af62eda7 CantUntap Third Step (#7393) 2025-04-13 12:49:07 +00:00
tool4ever
9c14ba49a3 Fix Licids being able to reattach without ending the effect first (#7394) 2025-04-13 12:43:22 +00:00
Hans Mackowiak
25900ee10c Aura Spells have internal Attach Spell for multiple Enchant Keywords (#6996)
* Aura Spells have internal Attach Spell for multiple Enchant Keywords

* AttachAI: add logic for Reanimate Aura with AnimateAI
2025-04-13 13:36:31 +02:00
tool4ever
443ba2c1e0 Upgrade Jetty (#7390) 2025-04-12 21:47:04 +00:00
Hans Mackowiak
6ade60cd59 removed getDirectSVars (#7389) 2025-04-12 21:15:54 +02:00
tool4ever
436697e0b3 Update stadium_headliner.txt
Closes #7388
2025-04-12 14:29:52 +00:00
Hans Mackowiak
e7d8664386 Svar fallback changes (#7385)
* getSVarFallback use stream filter to find one with name
2025-04-12 10:44:19 +02:00
tool4ever
e2e3c658a0 Relocate android specific dependency (#7387) 2025-04-12 05:47:07 +00:00
tool4ever
2a4ea4cb5d Some fixes (#7386) 2025-04-11 20:40:35 +00:00
tool4ever
93215e6ce4 Fix Distended Mindbender (#7381) 2025-04-11 16:02:47 +02:00
tool4ever
f4a0de6392 JUPnP android fix (#7379) 2025-04-11 08:55:40 +02:00
Renato Filipe Vidal Santos
579033abb3 Update whirlwing_stormbrood_dynamic_soar.txt (#7377) 2025-04-10 19:32:01 +00:00
Renato Filipe Vidal Santos
8328866645 Cleanup: April 2025, pass 3 2025-04-10 16:44:28 +02:00
Hans Mackowiak
890ce2505c Unearth: add gain Haste as StaticLayer (#7369)
* Unearth: add gain Haste as StaticLayer
2025-04-10 16:40:37 +02:00
tool4ever
7e6697d100 Fix checking with LKI during combat (#7372) 2025-04-10 15:43:22 +02:00
Agetian
84d793b786 Add 4 Possibility Storm puzzles (#7371)
* - Add TDM/TDC achievements by Marek14.

* - Add 4 Possibility Storm puzzles.
2025-04-10 11:55:42 +03:00
tool4ever
386550da39 Fix JUPnP initialization (#7367)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-04-10 08:55:47 +03:00
tool4ever
6d3d11398d Update rite_of_renewal.txt 2025-04-09 15:46:27 +00:00
Greg Sonnier
5db9c189ba Fixed Renew cost in alchemists_assistant.txt (#7363) 2025-04-08 20:59:04 +00:00
Hans Mackowiak
8d3e3cb253 AttachAi: make KeepTapped logic generic (#7361) 2025-04-08 20:54:09 +00:00
Agetian
2042aaa033 - Add TDM/TDC achievements by Marek14. (#7362) 2025-04-08 10:09:24 +03:00
tool4ever
6fc5d218c9 Update savior_of_the_sleeping.txt 2025-04-07 17:27:34 +00:00
Hans Mackowiak
6332f5cbfc Update champion_of_dusan.txt
Fix Renew Cost
2025-04-07 17:22:37 +02:00
Chris H
44340998fd Update host_of_the_hereafter.txt 2025-04-07 09:30:00 -04:00
Chris H
5274c976ef Restore flatten plugin 2025-04-06 12:13:08 -04:00
GitHub Actions
280d2fed6d [maven-release-plugin] prepare for next development iteration 2025-04-06 12:13:08 -04:00
GitHub Actions
9ecea646d2 [maven-release-plugin] prepare release forge-2.0.03 2025-04-06 12:13:08 -04:00
Chris H
c4e5101a42 Update maven-publish for releases without deploying to FTP 2025-04-06 12:13:08 -04:00
Chris H
48a555817d Temporarily remove flatten plugin for release 2025-04-06 12:13:08 -04:00
Renato Filipe Vidal Santos
2cc2ae421a Cleanup: April 2025, pass 2 (#7350)
* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Update furious_forebear.txt
2025-04-06 17:05:44 +03:00
Paul Hammerton
9109b26484 TDM: Humbling Elder (#7355) 2025-04-06 07:45:55 +00:00
Hans Mackowiak
98e5eb9652 Adventure and Omen as ReplacementEffect in CardState (#7347) 2025-04-05 17:58:20 +00:00
tool4ever
4e93f95dff Update furious_forebear.txt 2025-04-05 17:48:51 +00:00
Renato Filipe Vidal Santos
44e1332fb4 Cleanup: April 2025, pass 1 2025-04-05 17:02:21 +00:00
Hans Mackowiak
e2972acad0 Put ForColor for Call of the Spirit Dragons (#7348)
* Support for Call the Spirit Dragons

* ~ better ChoiceTitle

* ~ add AI flags
2025-04-05 17:14:43 +02:00
Renato Filipe Vidal Santos
76086ffd35 Cleanup: Updating to Count$Valid, pass 4 2025-04-05 06:47:13 +00:00
tool4ever
3c3c47616b Update UnattachEffect.java
Closes #7345
2025-04-05 08:37:53 +02:00
tool4ever
de5a660a6a Update thought_lash.txt
Fix exiling own cards when stolen
2025-04-04 21:04:54 +00:00
Drecon84
d348a72ae4 Excluding more enemy types
These are also not suited for the tutorial. Excluding these as well.
2025-04-04 10:41:17 -04:00
Fulgur14
4055512698 Temur Roar deck 2025-04-04 10:37:56 -04:00
Renato Filipe Vidal Santos
b4b2346fb8 Cleanup: Updating to Count$Valid, pass 3 (#7342) 2025-04-04 11:20:44 +02:00
Paul Hammerton
caa5443874 Update tdm.rnk 2025-04-04 09:13:43 +01:00
Renato Filipe Vidal Santos
c7fb0bd3c3 Cleanup: Count$InYour[Zone], part 2 (#7325) 2025-04-04 09:58:01 +02:00
Renato Filipe Vidal Santos
1f5f62b21a Cleanup: Count$InYour[Zone], part 1 (#7324) 2025-04-04 09:57:21 +02:00
Chris H
04937b6447 Migrate upcoming card scripts 2025-04-03 23:36:00 -04:00
Chris H
94ea88b171 Migrate upcoming card scripts 2025-04-03 23:33:19 -04:00
Chris H
2188582e16 Add initial booster+set info for TDM 2025-04-03 23:19:46 -04:00
Drecon84
fbc73fa22b Small fix to clean up the code
Combining ifs that do not need to be split up.
2025-04-03 16:16:39 -04:00
Drecon84
31790c3dc9 Remove Quest items on NG+
This removes quest items from a NG+ run in adventure mode. It might not remove all when a file has multiple NG+'s already, but multiple resets will remove all of the items.
I decided to remove the quest item tag from the teleport runes, since they are not added by a quest but can be bought in the store instead. Keeping them seems a good move for NG+.
2025-04-03 16:16:39 -04:00
Hans Mackowiak
cdf3038ab6 Harmonize first try (#7321)
* Harmonize first try

* Use OptionalCost

* Keyworded don't need type

* TDM/TDC: 11 harmonize cards (#7323)

* Trickery extrinsic fix

* Split fix

* Annoying checks keep failing

* Fix logic

* Clean up

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
Co-authored-by: Renato Filipe Vidal Santos <45150760+dracontes@users.noreply.github.com>
Co-authored-by: TRT <>
2025-04-03 19:37:16 +02:00
tool4EvEr
ff1781b734 Fix creating token with Endure 0 2025-04-03 11:22:11 +02:00
Hans Mackowiak
49d7351eac ~ lf 2025-04-03 06:11:26 +02:00
Paul Hammerton
3b372eead7 Merge pull request #7330 from paulsnoops/edition-updates
Edition updates: FIN, SLD
2025-04-02 18:05:22 +01:00
Paul Hammerton
c815f7ed0c Edition updates: FIN, SLD 2025-04-02 17:59:44 +01:00
Fulgur14
04ac8d8de9 Gladiolus Amicitia (FIN) (#7329) 2025-04-02 15:42:57 +02:00
Renato Filipe Vidal Santos
6b961ed3e1 Update monstrous_rage.txt (#7326) 2025-04-02 08:34:22 +02:00
Renato Filipe Vidal Santos
17a2a23981 Cleanup: Count$TypeInYour[Zone].[Type] (#7312) 2025-04-01 11:01:45 +00:00
Renato Filipe Vidal Santos
74e83f2a94 Cleanup: Targeted effects that grant flashback (#7319) 2025-04-01 11:00:39 +00:00
tool4ever
8e25dd0e25 Clean up (#7322) 2025-04-01 08:46:15 +00:00
Drecon84
7f9260f54c WASD Adventure take 3
Now actually putting the keybinds back in. Forgot to unrevert previously.
2025-03-31 21:24:31 -04:00
Paul Hammerton
505d4b4f9a Merge pull request #7316 from HeitorBittenc/Alchemy-boosters-draft
Alchemy sets boosters added
2025-03-31 17:30:35 +01:00
Paul Hammerton
baca196066 Merge pull request #7317 from Fulgur14/Fulgur14-patch-452548
Mardu Surge deck
2025-03-31 17:30:27 +01:00
Paul Hammerton
b08cf3bf5b Merge pull request #7318 from paulsnoops/b-and-r-2025-03-31
Banned and Restricted Announcement for March 31, 2025
2025-03-31 17:29:49 +01:00
Paul Hammerton
b5ee3eb43c Banned and Restricted Announcement for March 31, 2025 2025-03-31 17:24:53 +01:00
Fulgur14
081e1a2960 Mardu Surge deck 2025-03-31 17:45:15 +02:00
Hans Mackowiak
d0310e257b Mobilize X: enable the keyword to pass the SVars to the static (#7310) 2025-03-31 09:32:38 +00:00
Renato Filipe Vidal Santos
a3733f1fa8 TDM: Avenger of the Fallen 2025-03-31 08:20:34 +00:00
HeitorBittenc
b4bd7947f9 Alchemy sets boosters added 2025-03-30 23:05:31 -03:00
Renato Filipe Vidal Santos
b56da433eb Update hunters_bow.txt 2025-03-30 16:20:07 +02:00
Hans Mackowiak
64b5906f08 lf 2025-03-30 13:09:12 +02:00
tool4EvEr
f7d94fabc9 Fix Damping Engine crashing 2025-03-30 11:27:39 +02:00
HeitorBittenc
87e0810603 Adventure Mode: Fix Waste town generic Equipment shop not appearing 2025-03-29 22:24:04 -04:00
Fulgur14
93f2fa8f43 Update Abzan Armor [TDC] [2025].dck 2025-03-29 20:47:00 -04:00
Fulgur14
c86bf402fd Update Jeskai Striker [TDC] [2025].dck 2025-03-29 20:47:00 -04:00
Drecon84
9926004cf1 Fix for main quest
This fixes the bug where the objective to free the wizard from the red castle doesn't complete.
2025-03-29 20:25:45 -04:00
Renato Filipe Vidal Santos
d0c24f49a9 Update captain_america_first_avenger.txt 2025-03-29 14:56:01 -04:00
Renato Filipe Vidal Santos
661f3b8e7a Update captain_america_first_avenger.txt 2025-03-29 14:56:01 -04:00
Chris H
14249150a0 Fix trailing comma in json 2025-03-29 14:55:08 -04:00
churrufli
93dccdeace Net Decks Archive Updates (#7283) 2025-03-29 19:23:58 +03:00
Renato Filipe Vidal Santos
706ef4ac6c TDM: 14 Omen-related cards (#7300) 2025-03-29 16:13:35 +00:00
Paul Hammerton
bd3994a217 Merge pull request #7302 from paulsnoops/edition-updates
Edition updates: PF24, PMEI, PSPL, PW25, SCH, SLP
2025-03-29 16:07:10 +00:00
HeitorBittenc
e722c4b63c Removed token image fetch attempt from old server (#7287) 2025-03-29 19:01:29 +03:00
Paul Hammerton
a062e0040d Edition updates: PF24, PMEI, PSPL, PW25, SCH, SLP 2025-03-29 15:57:12 +00:00
Hans Mackowiak
7fdd645026 Omen: first attempt (#7297)
* Omen: first attempt

* Support rendering

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-03-29 16:54:20 +01:00
Paul Hammerton
3670891ec9 Merge pull request #7301 from paulsnoops/tdm-tdc-formats
Add TDM & TDC to formats
2025-03-29 14:55:58 +00:00
Paul Hammerton
6f3dd8deba Add TDM & TDC to formats 2025-03-29 14:49:32 +00:00
Chris H
63ac4a3ee4 Fix line endings 2025-03-29 09:58:37 -04:00
Hans Mackowiak
4616ee715e Update pom.xml
fix CDATA for Add-Opens
2025-03-29 09:07:54 -04:00
Paul Hammerton
5ef6bf1c15 Merge pull request #7299 from paulsnoops/fix-pp-name
Fix Poised Practitioner name
2025-03-29 12:31:28 +00:00
Paul Hammerton
862b4e19b6 Fix Poised Practitioner name 2025-03-29 12:25:05 +00:00
Paul Hammerton
378524dc39 Merge pull request #7298 from paulsnoops/edition-updates
Edition updates: TDC, TDM
2025-03-29 12:19:24 +00:00
Paul Hammerton
6d5f45a311 Edition updates: TDC, TDM 2025-03-29 12:16:13 +00:00
Fulgur14
0e00a52eb4 Update rainveil_rejuvenator.txt (#7294) 2025-03-29 08:14:43 +00:00
tool4ever
4b69d16c6d Update conduit_of_worlds.txt 2025-03-28 22:15:50 +00:00
Renato Filipe Vidal Santos
92e17a66f2 TDM: 6 cards (#7291) 2025-03-28 20:01:40 +00:00
Fulgur14
b601431591 TDM final spoiler batch - part 3 (#7292) 2025-03-28 18:49:19 +00:00
Fulgur14
76db40189e TDM final spoilers part 1 (#7289) 2025-03-28 18:46:00 +00:00
Renato Filipe Vidal Santos
8ddf8225c0 TDM: Mardu Siegebreaker 2025-03-28 18:43:56 +00:00
Fulgur14
359dd8d641 TDM final spoiler batch, Part 2 (#7290) 2025-03-28 18:41:12 +00:00
Fulgur14
878da9b06f Warden of the Grove (TDM) (#7281) 2025-03-27 19:24:57 +00:00
Fulgur14
d843004ad6 Hundred-Battle Veteran (TDM) (#7280)
The only problem I've found is that it's not shown in the "flashback" panel for some reason.
2025-03-27 18:57:53 +00:00
Hans Mackowiak
7f6024f81f Endure effect (#7254)
* add EndureEffect

* ~ fix style

* Add files via upload

* Update dusyut_earthcarver.txt

* add better Endure Message

* Update krumar_initiate.txt

* Fix message

* - Add basic EndureAi

* - Fix imports

* Update EndureAi.java

Apply static check for the token

* Update EndureAi.java

fix import

* Add files via upload

---------

Co-authored-by: Renato Filipe Vidal Santos <45150760+dracontes@users.noreply.github.com>
Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
Co-authored-by: Agetian <stavdev@mail.ru>
2025-03-27 19:21:18 +01:00
Paul Hammerton
5a37b49fcd Merge pull request #7279 from paulsnoops/edition-updates
Edition updates: SLD, TDM
2025-03-27 18:05:14 +00:00
Paul Hammerton
1c8cdac5be Edition updates: SLD, TDM 2025-03-27 18:00:21 +00:00
Fulgur14
20bd27d487 Lotuslight Dancers and Defibrillating Current (TDM) (#7277) 2025-03-27 15:23:34 +01:00
HeitorBittenc
fc761220d2 Removed 2 additional unnecessary requests for tokens images 2025-03-27 10:19:14 -04:00
HeitorBittenc
144681012c Removed print used for tests 2025-03-27 10:19:14 -04:00
HeitorBittenc
8fe3bd3c79 Removed unnecessary request for image fetching 2025-03-27 10:19:14 -04:00
tool4ever
da65308cf2 Some fixes (#7276)
* Fix unlocked Room token
2025-03-27 14:48:01 +01:00
Fulgur14
011457e949 2 TDM commons (#7271) 2025-03-27 15:29:02 +03:00
Renato Filipe Vidal Santos
c296025837 TDM: 10 cards (#7274) 2025-03-27 12:47:17 +01:00
Chris H
ac4c501629 Fix line endings 2025-03-26 19:05:22 -04:00
Heitor Bittencourt
fe062a9312 Refactor Entry to List + add comments 2025-03-26 16:05:22 -04:00
Hans Mackowiak
65d4505b67 Update FDeckViewer.java
Use Set instead of List
2025-03-26 16:05:22 -04:00
Heitor Bittencourt
073d7e537c indentation 2025-03-26 16:05:22 -04:00
Heitor Bittencourt
77dc367c95 Fix ConcurrentModificationException by iterating over a separate list 2025-03-26 16:05:22 -04:00
Heitor Bittencourt
7553d164f4 fix: copy to clipboard now collates copies of a card together. 2025-03-26 16:05:22 -04:00
Heitor Bittencourt
ee01e3d29f fix: copy to clipboard now collates copies of a card together. 2025-03-26 16:05:22 -04:00
Paul Hammerton
58f8c39197 Merge pull request #7267 from paulsnoops/edition-updates
Edition updates: TDC, TDM
2025-03-26 18:57:52 +00:00
Paul Hammerton
7304fa862a Edition updates: TDC, TDM 2025-03-26 18:53:10 +00:00
Fulgur14
1ef8b9ca47 Another 10 TDM cards, including Exhales (#7266) 2025-03-26 18:48:36 +00:00
tool4ever
5191d2f9c4 Safer canUntap check (#7265) 2025-03-26 17:27:18 +00:00
Fulgur14
ff74e36fe5 Kheru Goldkeeper (#7264) 2025-03-26 11:12:49 +00:00
Renato Filipe Vidal Santos
0121619e93 TDM/TDC: 10 cards (#7263) 2025-03-26 09:11:47 +00:00
Drecon84
aeb279a6f8 WASD Movement Take 2 (#7251)
* Enter now still brings up the menu, controller might need it to type. WASD typing still works.
2025-03-26 07:27:16 +00:00
Fulgur14
20815552b9 3 TDC + 1 TDM cards (#7262) 2025-03-25 18:53:59 +00:00
tool4ever
ac67a36ccf Replace first withContext call with more stable AI prediction (#7261) 2025-03-25 18:08:36 +00:00
Fulgur14
fcd8b8fd35 Thunder of Unity (TDM) (#7257) 2025-03-25 17:02:03 +00:00
Renato Filipe Vidal Santos
fbe4ad5c44 TDM: 2 cards 2025-03-25 17:10:23 +01:00
Renato Filipe Vidal Santos
ee17483fff AddPower & AddToughness: Removing redundancy 2025-03-25 15:45:32 +01:00
Renato Filipe Vidal Santos
a451f1a234 Cleanup: NumAtt$ & NumDef$, part 8 (#6885) 2025-03-25 15:01:24 +01:00
Renato Filipe Vidal Santos
52c4c01a7d Cleanup: NumAtt$ & NumDef$, part 7 (#6884) 2025-03-25 14:59:00 +01:00
Renato Filipe Vidal Santos
b1bb0d669f Cleanup: NumAtt$ & NumDef$, part 6 (#6883) 2025-03-25 14:58:47 +01:00
Renato Filipe Vidal Santos
eb1f9783aa Cleanup: NumAtt$ & NumDef$, part 5 (#6882) 2025-03-25 14:58:36 +01:00
Renato Filipe Vidal Santos
0724d224fa Cleanup: NumAtt$ & NumDef$, part 4 (#6881) 2025-03-25 14:58:25 +01:00
Renato Filipe Vidal Santos
e7775cdfa9 Cleanup: NumAtt$ & NumDef$, part 3 (#6880) 2025-03-25 14:58:13 +01:00
Renato Filipe Vidal Santos
f8836f0c40 Cleanup: NumAtt$ & NumDef$, part 2 (#6879) 2025-03-25 14:57:47 +01:00
Renato Filipe Vidal Santos
4c342cfc6a Cleanup: NumAtt$ & NumDef$, part 1 2025-03-25 14:57:35 +01:00
Fulgur14
df05ab34fb 4 TDM cards (#7235) 2025-03-25 14:56:23 +01:00
Paul Hammerton
5da0e75252 Merge pull request #7255 from paulsnoops/edition-updates
Edition updates: TDC, TDM
2025-03-25 10:07:21 +00:00
Paul Hammerton
92ec5d8f64 Edition updates: TDC, TDM 2025-03-25 09:55:59 +00:00
Renato Filipe Vidal Santos
6515fed9d2 TDM/TDC: 4 cards (#7252) 2025-03-25 07:10:37 +00:00
Chris H
5a7cd40614 Update README.md 2025-03-24 22:26:33 -04:00
Fulgur14
65b01e0822 10 TDM/TDC cards (#7249) 2025-03-24 21:19:13 +00:00
Renato Filipe Vidal Santos
643f893d43 TDM: 4 cards (#7248) 2025-03-24 20:42:02 +00:00
Paul Hammerton
e0c6b43214 Merge pull request #7247 from paulsnoops/edition-updates
Edition updates: TDC, TDM, SLD
2025-03-24 18:10:59 +00:00
Paul Hammerton
0f5d71f933 Edition updates: TDC, TDM, SLD 2025-03-24 17:54:03 +00:00
Paul Hammerton
e6a8b5ed74 Edition updates: TDC, TDM, SLD 2025-03-24 17:50:32 +00:00
LEGIONLAPTOP\dougc
24c11e47c4 Updating lang files with new strings 2025-03-24 12:39:50 -04:00
LEGIONLAPTOP\dougc
cb5f805767 Added CommanderGauntlet GameType, added CustomCommanderGauntlet to mobile 2025-03-24 12:39:50 -04:00
LEGIONLAPTOP\dougc
3788e01f38 Quick Commander and Build Commander Gauntlet both working on desktop 2025-03-24 12:39:50 -04:00
LEGIONLAPTOP\dougc
a9df4ea424 Renamed Commander Gauntlet to more accurate QUICK Commander Gauntlet 2025-03-24 12:39:50 -04:00
Chris H
25ba06d530 Revert "WASD movement for Adventure mode" (#7241)
* Revert "Improved WASD script"

This reverts commit fc901f1ebb.

* Revert "Fixed WASD movement"

This reverts commit c365f5a3d1.

* Revert "Update KeyBinding.java"

This reverts commit 49697c863c.

* Revert "Adventure Keybinds"

This reverts commit 4431c40de6.
2025-03-24 09:14:23 -04:00
tool4ever
9b81644f11 Fix Danny Pink triggering once for each type (#7245) 2025-03-24 13:09:57 +01:00
tool4ever
4b27536ed3 Update eshki_temurs_roar.txt
Closes #7238
2025-03-24 10:56:51 +01:00
Renato Filipe Vidal Santos
148da24456 TDM: 2 cards (#7244) 2025-03-24 09:19:51 +01:00
Renato Filipe Vidal Santos
d1be43fd83 TDM: Rot-Curse Rakshasa (#7242) 2025-03-24 07:06:02 +01:00
Chris H
f2df505237 Don't activate connive if Amount == 0 2025-03-23 13:14:58 -04:00
Chris H
bd37e26fab Make the AI more likely to sacrifice/chump block with Reef Worm + Spawn 2025-03-23 13:10:53 -04:00
Chris H
7954473476 FIx Line endings 2025-03-23 12:46:58 -04:00
Renato Filipe Vidal Santos
13287cefbd TDM: 5 Cards (#7234) 2025-03-23 13:48:29 +01:00
Fulgur14
9afbc91de1 1 TDC + 11 TDM cards (#7230) 2025-03-23 11:56:20 +01:00
Renato Filipe Vidal Santos
dfe5bd9ec9 TDM/TDC: 8 cards (#7223) 2025-03-23 10:11:28 +01:00
Renato Filipe Vidal Santos
e2411e34bd Update shiko_and_narset_unified.txt (#7236) 2025-03-23 10:07:41 +01:00
Chris H
f2998bdf9a FIx Line endings 2025-03-22 18:36:42 -04:00
Heitor Bittencourt
c52f886e89 Adventure: Disable Not For Sale Overlay Setting 2025-03-22 18:21:58 -04:00
Heitor Bittencourt
f972aa44ba Adventure: display shop name items on boosters removed 2025-03-22 18:21:09 -04:00
Heitor Bittencourt
ccafe0557f Adventure: Replaced Booster Shop Image 2025-03-22 18:21:09 -04:00
Paul Hammerton
f9f9b1a1f9 Merge pull request #7229 from paulsnoops/edition-updates
Edition updates: TDC, TDM
2025-03-22 10:21:34 +00:00
Fulgur14
e867aacbf5 9 TDC/TDM cards (#7225) 2025-03-22 11:12:21 +01:00
Paul Hammerton
a09e9e4fd6 Edition updates: TDC, TDM 2025-03-22 10:10:35 +00:00
Renato Filipe Vidal Santos
fc320e6524 Fixing Will of the Mardu (#7226) 2025-03-22 08:08:48 +01:00
Chris H
2b6a1c9f3d Refilter targetable list while looping the target selections 2025-03-21 19:11:01 -04:00
Chris H
3e9cd2c226 Fix some adventure issues 2025-03-21 19:11:01 -04:00
Paul Hammerton
3f722abba2 Merge pull request #7224 from paulsnoops/edition-updates
Edition updates: TDC, TDM
2025-03-21 18:01:50 +00:00
Paul Hammerton
06508f70a3 Edition updates: TDC, TDM 2025-03-21 17:42:54 +00:00
Fulgur14
8580108d1e 10 TDM cards (Sidisi and Sibsigs) (#7190) 2025-03-21 10:11:10 +01:00
Hans Mackowiak
300f34377c Update aligned_heart.txt
fix trigger
2025-03-21 09:35:41 +01:00
Renato Filipe Vidal Santos
c4828f510f TDC: 4 cards (#7221) 2025-03-21 09:06:50 +01:00
Fulgur14
04c400553a Another 10 TDM/TDC cards (#7220) 2025-03-21 08:36:50 +01:00
tool4ever
d2508333bc Fix NPE: Jacob Frye + Escape Detection (#7219)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-03-21 08:31:09 +03:00
Drecon84
fc901f1ebb Improved WASD script
Now the script works with arrays, much cleaner. I have not been able to test the controller support, it should work but I don't have the means to test it.
2025-03-20 20:35:54 -04:00
Drecon84
c365f5a3d1 Fixed WASD movement
Adventure moves with WASD now
2025-03-20 20:35:54 -04:00
Drecon84
49697c863c Update KeyBinding.java 2025-03-20 20:35:54 -04:00
Drecon84
4431c40de6 Adventure Keybinds
Can now move in adventure mode with WASD keys
2025-03-20 20:35:54 -04:00
Renato Filipe Vidal Santos
a0f6efb959 TDM: 6 cards 2025-03-20 21:02:06 +00:00
tool4ever
44fea0ae75 Fix AI running into timeout keeping thread running (#7215) 2025-03-20 18:17:41 +00:00
Paul Hammerton
95c970e23f Merge pull request #7217 from paulsnoops/edition-updates
Edition updates: TDC, TDM
2025-03-20 17:43:54 +00:00
Paul Hammerton
8596151fa1 Edition updates: TDC, TDM 2025-03-20 17:32:44 +00:00
Paul Hammerton
2eac43734c Merge pull request #7216 from paulsnoops/master
LF
2025-03-20 17:29:09 +00:00
Paul Hammerton
dff91eb2aa LF 2025-03-20 17:25:12 +00:00
Renato Filipe Vidal Santos
aa122700a9 TDC: 4 cards (#7208) 2025-03-20 17:52:47 +01:00
Fulgur14
80f267df59 Dalkovan Packbeasts (TDM) (#7214) 2025-03-20 13:45:55 +01:00
tool4ever
235618c3bb Fix Valiant tracking incorrectly with controller change (#7200)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-03-20 15:26:53 +03:00
Fulgur14
b7e55e785e Perennation (TDM) (#7213) 2025-03-20 13:24:25 +03:00
Fulgur14
050c986d08 A few more TDM/TDC cards (#7207) 2025-03-20 10:34:16 +01:00
Fulgur14
2b83541ebc 9 TDM + 1 TDC card (Eshki, Temur's Roar and friends) (#7198) 2025-03-20 08:37:17 +01:00
Fulgur14
d40894ef6a Tempest Hawk + 3 TDC cards (#7202) 2025-03-20 08:36:49 +01:00
Hans Mackowiak
b756bda988 to LF 2025-03-20 00:25:45 +01:00
Heitor Bittencourt
0e64a88005 fix: removed unused imports 2025-03-19 19:11:08 -04:00
Heitor Bittencourt
0d952a54bd feat/adventure: 4 new booster packs,spawn rate changed, removed colorless packs 2025-03-19 19:11:08 -04:00
Hans Mackowiak
d3ff7f3b61 Update parseAbilityCost (#7178)
cleanup and simplify
2025-03-19 22:48:57 +01:00
Renato Filipe Vidal Santos
0f9e7eca89 TDC: 2 cards 2025-03-19 19:18:24 +00:00
Paul Hammerton
207b786fcd oops 2025-03-19 14:01:26 -04:00
Paul Hammerton
0f6fa87da0 Alchemy Rebalancing for March 4, 2025 2025-03-19 14:01:26 -04:00
Paul Hammerton
995c1167dc Merge pull request #7201 from paulsnoops/edition-updates
Edition updates: SPG, TDC, TDM
2025-03-19 17:37:21 +00:00
Paul Hammerton
1ab1d9c002 Edition updates: SPG, TDC, TDM 2025-03-19 17:32:09 +00:00
Renato Filipe Vidal Santos
4b1a6a2f87 TDM: 2 cards (#7199) 2025-03-19 17:08:48 +00:00
Renato Filipe Vidal Santos
dacecd9006 TDM: 4 cards (#7197) 2025-03-19 16:16:19 +00:00
Fulgur14
dd5d75613e 10 TDM cards (All-Out Assault of them) (#7195) 2025-03-19 16:15:57 +00:00
Renato Filipe Vidal Santos
d59a316d8c TDM: 8 cards (#7189) 2025-03-19 16:44:06 +01:00
Fulgur14
9c4f855f71 10 TDM cards (#7196) 2025-03-19 16:41:01 +01:00
Fulgur14
90131b4a70 10 TDM cards (Taigam and pawns) (#7187) 2025-03-19 08:23:13 +01:00
Fulgur14
fb6725f2d7 Update zurgo_thunders_decree.txt (#7188) 2025-03-18 19:37:16 +00:00
tool4ever
475c57af55 Try fix AI not resetting context (#7186) 2025-03-18 19:06:49 +00:00
Renato Filipe Vidal Santos
6ae119a415 TDM: Zurgo, Thunder's Decree and mobilize support (#7185) 2025-03-18 18:51:43 +00:00
Renato Filipe Vidal Santos
8b5fe276e7 TDM: 3 cards (#7184) 2025-03-18 09:56:26 +01:00
Hans Mackowiak
5e4d5c262d ~ lf 2025-03-17 21:15:38 +01:00
Fulgur14
9b82f1ef1f Update united_battlefront.txt (#7183) 2025-03-17 19:56:22 +00:00
Paul Hammerton
321d2d7e33 Merge pull request #7182 from paulsnoops/edition-updates
Edition updates: FIN, SLD, TDM
2025-03-17 17:47:38 +00:00
Paul Hammerton
5b7cca95e1 Edition updates: FIN, SLD, TDM 2025-03-17 17:40:59 +00:00
Hans Mackowiak
2e0d53c6fe CantUntap Second Step (#7172)
* refactor more CantUntap Statics

* ~ no new hidden keywords

* ~ more CantBeActivated

* Update Card.java

* Refactor scripts

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-03-17 17:48:39 +01:00
Fulgur14
9d4f6d2cbb United Battlefront (#7181) 2025-03-17 16:37:43 +00:00
tool4ever
9546b434e4 Update waltz_of_rage.txt 2025-03-17 17:01:40 +01:00
tool4ever
f230522657 Update contempt.txt (#7177) 2025-03-17 14:23:25 +01:00
tool4ever
a57a1f566a Refactor Telekinesis (#7174)
* Improve AI check
2025-03-17 12:06:03 +00:00
Renato Filipe Vidal Santos
8f8d6e6e30 FIN: Zell Dincht 2025-03-17 08:45:09 +00:00
tool4ever
3b8694483c Refactor Blinding Beam (#7171)
* Refactor Blinding Beam

* Refactor AI checking for Replacement while inactive

* Update stasis.txt

* Update sands_of_time.txt

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
Co-authored-by: Hans Mackowiak <hanmac@gmx.de>
2025-03-16 21:14:28 +01:00
Hans Mackowiak
4328a12967 Cant untap first step (#7162)
* CantHappen for UntapStep
2025-03-16 11:47:27 +01:00
tool4ever
fdc85b85c3 Cleanup "Cleanup" calls (#7169) 2025-03-16 10:04:10 +00:00
Chris H
bb2eed23b7 Fix Griselbrand overdrawing in one turn 2025-03-15 19:20:44 -04:00
Renato Filipe Vidal Santos
72e33146de YDFT: 14 cards (#7122) 2025-03-15 22:01:58 +00:00
HeitorBittenc
e371617938 fix: removed unused images, booster pack shops now respect the restricted cards and editions. (#7161) 2025-03-15 13:14:04 +00:00
tool4ever
b363db2bbd Fix North Star (#7163) 2025-03-15 13:03:51 +00:00
HeitorBittenc
37a5958750 Added 7 Card booster packs shops in Adventure Mode (#7141)
* Added 7 Card booster packs shops in Adventure Mode

* Update CHANGES.txt

* Fix: trailing space, extra comma and wrong color on shop fixed.

* Removed unused imports

---------

Co-authored-by: Heitor Bittencourt <heitorbite@outlook.com>
Co-authored-by: Agetian <stavdev@mail.ru>
2025-03-14 20:03:13 +03:00
Chris H
9091cfe3b0 Fix double mastesr 2022 basic lands 2025-03-14 11:36:57 -04:00
Chris H
e2614187ac Update brotherhood_vertibird.txt 2025-03-14 10:32:09 -04:00
Ayora29
5c69bf0470 Fix : Puzzle (Possibility Storm - Foundations #01). Opponent library is empty. (#7149) 2025-03-13 11:11:33 +01:00
tool4ever
383dc85166 Some cleanup (#7147) 2025-03-13 10:13:44 +01:00
Hans Mackowiak
7e47208888 Masako the humorless as Static 2025-03-13 08:37:47 +01:00
Hans Mackowiak
137d87c3df use StaticAbility for Topsy Turvy (#7143) 2025-03-12 09:24:53 +01:00
Paul Hammerton
fbff1fe10a Merge pull request #7144 from paulsnoops/edition-updates
Edition updates: CC2, FIC, PMEI, SLD, TDM
2025-03-11 08:31:42 +00:00
Paul Hammerton
3acd4490c5 Edition updates: CC2, FIC, PMEI, SLD, TDM 2025-03-11 08:28:25 +00:00
Hans Mackowiak
2952ed79f8 ~ lf 2025-03-11 07:07:08 +01:00
Fulgur14
cb23eda5a6 Stormplain Detainment [TDM] 2025-03-10 17:10:07 +00:00
Renato Filipe Vidal Santos
ced87c8aea FIC: Celes, Rune Knight 2025-03-10 15:49:40 +00:00
Jetz72
daf87e26ad Fix importing "Ice Tunnel"; Max Speed being flipped instead of transformed (#7138) 2025-03-10 14:31:35 +00:00
Chris H
0c30c4e32c Restrict conspiracy drafts in Adventure mode for now 2025-03-08 18:55:00 -05:00
Paul Hammerton
bf5f9f69ca Merge pull request #7133 from paulsnoops/edition-updates
Edition updates: PWCS
2025-03-08 20:50:08 +00:00
Paul Hammerton
b4828d3b4d Edition updates: PWCS 2025-03-08 20:35:44 +00:00
Renato Filipe Vidal Santos
617df8e07c Fixing Chimeric Mass and Svogthos (#7130) 2025-03-08 08:15:03 +00:00
Simisays
deaba89f46 jace update 2025-03-07 21:23:23 -05:00
Hans Mackowiak
d5b13d56cc Update jackdaw.txt
Closes #7127
2025-03-07 09:26:32 +01:00
Chris H
f893c7ddf8 Balance some item costs 2025-03-06 12:14:00 -05:00
Paul Hammerton
c6cf450ac4 Merge pull request #7121 from paulsnoops/edition-updates
Edition updates: TDM
2025-03-04 18:40:10 +00:00
Paul Hammerton
fa123023c7 Edition updates: TDM 2025-03-04 18:24:38 +00:00
Fulgur14
0b285fa045 Rally the Monastery (#7120) 2025-03-04 17:03:31 +00:00
Paul Hammerton
fe6c4243ee Merge pull request #7119 from paulsnoops/ydft-formats
Add YDFT to formats
2025-03-04 14:06:36 +00:00
Paul Hammerton
1a2c18d25e Add YDFT to formats 2025-03-04 14:03:04 +00:00
Renato Filipe Vidal Santos
12e6de4697 Highway Reaver fix (#7118) 2025-03-04 14:58:02 +01:00
Paul Hammerton
f2b72d4234 Merge pull request #7090 from dracontes/rb-ydft-3
YDFT: 12 cards
2025-03-04 11:22:35 +00:00
Renato Filipe Vidal Santos
25a84e9aee Update venom_deadly_devourer.txt (#7117) 2025-03-04 11:47:54 +01:00
Hans Mackowiak
488171b02b Dream counters rework (#7116)
* Dream Counters: moved to extra getCounterMax function

* Update Rasputin Dreamweaver State-Based-Action with a StaticAbility
2025-03-04 11:33:57 +01:00
Renato Filipe Vidal Santos
eb22a449f4 Update underworld_sentinel.txt 2025-03-04 09:25:14 +00:00
Renato Filipe Vidal Santos
c21c043f5f Add files via upload 2025-03-04 06:05:23 +00:00
Simisays
94808ea73e Update vampirecastle_4.tmx 2025-03-03 18:57:32 -05:00
Simisays
7fe486cba6 Update zedruu.tmx 2025-03-03 18:57:32 -05:00
Simisays
a3517e260c update 2025-03-03 18:57:32 -05:00
Paul Hammerton
377f1fad41 Update MagicFest 2025.txt 2025-03-03 13:30:44 -05:00
Chris H
17448f99c9 Update MagicFest 2025.txt 2025-03-03 13:30:44 -05:00
Hans Mackowiak
8c83886c2e Update legions_to_ashes.txt
fix missing OppCtrl
2025-03-03 16:10:56 +01:00
Renato Filipe Vidal Santos
9cef38af60 SPE: Sensational Spider-Man (#7112) 2025-03-03 15:54:00 +01:00
tool4ever
288ecc0d72 Support Sensational Spider-Man (#7110) 2025-03-03 15:52:35 +01:00
Renato Filipe Vidal Santos
bb514f6d08 Update fallaji_antiquarian.txt 2025-03-03 10:06:50 +00:00
Chris H
ecb21abb9a Delay rendering the next dialog by a short bit, to allow for the TouchUp keypress to clear 2025-03-02 21:04:07 -05:00
Chris H
9445093d68 Fix Wanderlust from breaking other quests 2025-03-02 21:04:07 -05:00
Renato Filipe Vidal Santos
8f3f83051b SPE: 5 cards (#7107) 2025-03-02 21:49:24 +00:00
Renato Filipe Vidal Santos
5750892edf Add files via upload 2025-03-02 17:47:48 +00:00
Renato Filipe Vidal Santos
db74b2b70b Update shops.json 2025-03-02 12:35:37 -05:00
Renato Filipe Vidal Santos
a5c036be05 Update quests.json 2025-03-02 12:35:37 -05:00
Renato Filipe Vidal Santos
b60ee73ce5 Add files via upload 2025-03-02 12:35:37 -05:00
Renato Filipe Vidal Santos
b743f1cbc5 Update golem.dck 2025-03-02 12:35:37 -05:00
Renato Filipe Vidal Santos
0f0bb56f7d Update goblins.dck 2025-03-02 12:35:37 -05:00
Renato Filipe Vidal Santos
8b593f8356 Update bluewizard_apprentice_2.dck 2025-03-02 12:35:37 -05:00
Renato Filipe Vidal Santos
79ac73fb15 Update banditarcher_damage.dck 2025-03-02 12:35:37 -05:00
Renato Filipe Vidal Santos
da0bb4c0ce Update lorthos.dck 2025-03-02 12:35:37 -05:00
Renato Filipe Vidal Santos
9d7617add9 Update emrakul.dck 2025-03-02 12:35:37 -05:00
Renato Filipe Vidal Santos
f38ed39c87 Update shops.json 2025-03-02 12:35:37 -05:00
Renato Filipe Vidal Santos
8ff5f45449 Update ChooseCardNameEffect.java 2025-03-02 17:19:14 +00:00
Hans Mackowiak
0447299e4f StaticAbility InfectDamage for Phyrexian Unlife 2025-03-02 11:42:37 +01:00
Paul Hammerton
b797317f1a Merge pull request #7106 from paulsnoops/edition-updates
Edition updates: PLG25, PSLDSC, SLD, SPE, YDFT
2025-03-01 22:27:41 +00:00
Paul Hammerton
388f334fd3 Edition updates: PLG25, PSLDSC, SLD, SPE, YDFT 2025-03-01 22:22:15 +00:00
Chris H
e47f623b0a Update argent_dais.txt (#7103) 2025-03-01 18:28:00 +00:00
Renato Filipe Vidal Santos
93e71bded8 Add files via upload 2025-03-01 16:09:56 +00:00
Renato Filipe Vidal Santos
8a93283398 Add files via upload 2025-03-01 11:43:07 +00:00
Renato Filipe Vidal Santos
aafd9b8f49 Update fear_of_change.txt 2025-03-01 08:52:38 +00:00
Renato Filipe Vidal Santos
32fec183d5 Add files via upload 2025-03-01 08:51:56 +00:00
Agetian
d1751262df Make canBlock check if the blocker is a creature. (#7098)
- TokenAi also checks if the spawned token is a creature before running checks.
2025-02-28 19:09:37 +00:00
tool4ever
d05523360d Fix missing SpellDescription (#7099) 2025-02-28 19:08:53 +00:00
Hans Mackowiak
a32f9a3c1c Update a-uurg_spawn_of_turg.txt 2025-02-28 14:38:32 +01:00
Hans Mackowiak
0468247c5a Update uurg_spawn_of_turg.txt 2025-02-28 14:38:07 +01:00
Hans Mackowiak
d02dd67016 Hidden and Double Agenda better as Keyword (#7093)
* Hidden and Double Agenda better as Keyword
2025-02-28 10:22:13 +01:00
tool4ever
27d5766abb Update aetherflux_conduit.txt 2025-02-28 09:13:02 +01:00
Renato Filipe Vidal Santos
be88c63414 Update decoy_gambit.txt (#7095) 2025-02-28 09:08:36 +01:00
Renato Filipe Vidal Santos
c0d965857a Add files via upload 2025-02-28 07:42:50 +00:00
Renato Filipe Vidal Santos
e1763c45af Update quicksilver_lapidary.txt 2025-02-28 04:28:43 +00:00
Renato Filipe Vidal Santos
177f7f64ac Update euru_acorn_scrounger.txt 2025-02-28 04:28:04 +00:00
Renato Filipe Vidal Santos
a2096aa753 Update sala_deck_boss.txt 2025-02-27 21:29:40 +00:00
Renato Filipe Vidal Santos
bc9fac1da6 Add files via upload 2025-02-27 21:23:18 +00:00
Renato Filipe Vidal Santos
e0dcf24c90 Update banquet_guests.txt 2025-02-27 19:36:39 +00:00
Paul Hammerton
db5eb095aa Merge pull request #7094 from Agetian/lda-update-dft
Update LDA deck generation information for Aetherdrift
2025-02-27 18:11:39 +00:00
marthinwurer
16b87f20ca Delegate to piles all the time 2025-02-27 11:07:44 -05:00
Agetian
00b82fe9f9 - Update LDA information (Aetherdrift) 2025-02-27 14:06:23 +03:00
Renato Filipe Vidal Santos
6af0ad100e Update marina_vendrell.txt 2025-02-27 06:17:25 +01:00
Renato Filipe Vidal Santos
f14fda5d1b Update ForgeScript.java 2025-02-27 02:13:01 +00:00
Renato Filipe Vidal Santos
1ef027e7e2 Add files via upload 2025-02-27 02:11:08 +00:00
Renato Filipe Vidal Santos
61aaba268f Update agent_of_masks.txt 2025-02-26 19:34:40 +00:00
Renato Filipe Vidal Santos
b041eee060 Update a-blood_artist.txt 2025-02-26 19:33:52 +00:00
Renato Filipe Vidal Santos
8ed65b95f2 Update blood_artist.txt 2025-02-26 19:32:41 +00:00
Renato Filipe Vidal Santos
3fe53f601c Add files via upload 2025-02-26 19:31:38 +00:00
Paul Hammerton
5ce0374426 Merge pull request #7089 from paulsnoops/edition-updates
Edition updates: YDFT
2025-02-26 19:29:38 +00:00
Paul Hammerton
e4aba70090 Edition updates: YDFT 2025-02-26 19:21:22 +00:00
Renato Filipe Vidal Santos
b17824c20a YDFT: Support Skyforge 2025-02-26 18:16:20 +01:00
Chris H
976dd18fa2 Update negan_the_cold_blooded.txt (#7085) 2025-02-26 18:15:58 +01:00
Renato Filipe Vidal Santos
56bfcec656 Incidental cleanup pass #4 (#7084) 2025-02-26 18:15:43 +01:00
Chris H
f935706d22 Disable upload workflows to ftp forge 2025-02-26 08:52:36 -05:00
Renato Filipe Vidal Santos
e2322ee7ef YDFT: 3 cards (#7077) 2025-02-26 09:53:15 +01:00
Chris H
d553a7cac4 Update stairs_to_infinity.txt (#7082) 2025-02-26 06:00:24 +01:00
tool4ever
f75b2ad9ee Update neriv_crackling_vanguard.txt 2025-02-25 19:42:22 +00:00
tool4ever
333b25eeaf Update yannik_scavenging_sentinel.txt 2025-02-25 19:09:32 +00:00
Hans Mackowiak
0db70261f9 Update TypeLists.txt
Add missing Glimmer
2025-02-25 19:29:53 +01:00
tool4ever
504db590db Fix All in Good Time (#7081)
* Fix for Ketramose
2025-02-25 18:25:35 +00:00
Agetian
650b667148 - Add an AI hint for Arid Archway. (#7080) 2025-02-25 17:17:21 +03:00
Paul Hammerton
4afdd0c264 Merge pull request #7079 from paulsnoops/edition-updates
Edition updates
2025-02-25 10:22:17 +00:00
Paul Hammerton
2816bdef85 Edition updates: SLD, TDC, YDFT 2025-02-25 10:18:25 +00:00
Paul Hammerton
855fe70281 Edition updates: SLD, TDC, YDFT 2025-02-25 10:17:04 +00:00
Fulgur14
e4071a4f4e Neriv and Elsha (TDC) (#7078) 2025-02-25 11:06:36 +01:00
Hans Mackowiak
18ee17f7c8 Update TypeLists.txt
Fix missing Balloon type
2025-02-25 09:26:47 +01:00
Chris H
f84f694351 Reroute card images to scryfall.
Don't try to redownload if it fails during a session
2025-02-24 22:50:14 -05:00
tool4ever
0a15a0352d Fix battles attacking/blocking (#7075)
* Add battle SBA

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-02-24 16:03:58 +01:00
tool4ever
0e46d436de Update mimeoplasm_revered_one.txt 2025-02-24 08:00:48 +01:00
Hans Mackowiak
a16b4ffe75 CostBehold: add Special Reveal Cost (#7072)
* CostBehold: add Special Reveal Cost

----

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2025-02-23 16:52:24 +01:00
tool4ever
608d4c5bda Don't update view of LKI instead of real Card (#7070)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-02-23 15:18:40 +03:00
Paul Hammerton
dbb8d8c93a Merge pull request #7071 from paulsnoops/update-tdc
Edition updates: TDC
2025-02-23 10:36:42 +00:00
Paul Hammerton
e30f9a6cb1 Edition updates: TDC 2025-02-23 10:22:21 +00:00
Renato Filipe Vidal Santos
bd4f5a2aa4 TDC: Betor, Ancestor's Voice (#7069) 2025-02-23 09:43:54 +00:00
Renato Filipe Vidal Santos
2d352b110b Negation cleanup: IsUnsolved (#7068) 2025-02-22 22:04:05 +00:00
Renato Filipe Vidal Santos
2802c61abd Negation cleanup: notAttackedThisTurn (#7066) 2025-02-22 21:37:02 +00:00
Paul Hammerton
62c27f9142 Replace net deck links 2025-02-22 15:48:16 -05:00
Renato Filipe Vidal Santos
c358f4e71f Negation cleanup: IsNotCommander (#7064) 2025-02-22 20:38:15 +00:00
Chris H
a05ecbc810 Update teval_the_balanced_scale.txt (#7065) 2025-02-22 20:34:55 +00:00
tool4ever
6b299693ca Finish nonToken cleanup (#7063) 2025-02-22 19:26:48 +00:00
Renato Filipe Vidal Santos
bb3413c1e5 Negation cleanup: nonToken, part 3 (#6952) 2025-02-22 17:44:28 +00:00
Renato Filipe Vidal Santos
854267d521 Negation cleanup: nonToken, part 2 (#6951) 2025-02-22 17:42:28 +00:00
Renato Filipe Vidal Santos
c4e05a5d9b Negation cleanup: nonToken, part 1 (#6950) 2025-02-22 17:42:17 +00:00
Renato Filipe Vidal Santos
27b61a79c8 Negation cleanup: nonToken, part 4 (#6953) 2025-02-22 17:42:03 +00:00
Chris H
70183bcc85 Update snapshot-both-pc-android.yml 2025-02-22 11:19:33 -05:00
Hans Mackowiak
94da663287 ~ lf 2025-02-22 15:00:59 +01:00
Paul Hammerton
3c7c1cc4c7 Merge pull request #7060 from paulsnoops/edition-updates
Edition updates: SLD, TDC, TDM
2025-02-22 10:39:27 +00:00
Paul Hammerton
3b773da60d Edition updates: SLD, TDC, TDM 2025-02-22 10:34:19 +00:00
Renato Filipe Vidal Santos
afee15cf44 TDM: 5 cards (#7058) 2025-02-22 10:17:39 +00:00
Fulgur14
a424aa65df 2 TDM and 1 TDC card (#7056) 2025-02-22 09:03:40 +00:00
tool4EvEr
fa93a7dfdd Fix Well-Laid Plans 2025-02-21 10:46:14 -05:00
Renato Filipe Vidal Santos
446f60b331 Add files via upload 2025-02-21 15:22:33 +01:00
tool4ever
e136368ce3 Update narset_jeskai_waymaster.txt 2025-02-21 10:33:06 +01:00
Fulgur14
5f1b54860c Narset, Jeskai Waymaster (TDM) (#7052) 2025-02-21 11:59:24 +03:00
Chris H
23eb008d5f Trigger edition change if playing 10E draft on mobile 2025-02-20 20:13:21 -05:00
Chris H
40882c20d6 Send URL to github snapshots 2025-02-20 20:13:04 -05:00
tool4ever
9054e01273 Fix corner case with Jace, Wielder of Mysteries (#7050) 2025-02-20 19:03:24 +00:00
Chris H
c5fe9b2667 Snapshot direct to GitHub (#7049)
Upload snapshots directly to a prerelease on GH
2025-02-20 13:14:53 -05:00
tool4ever
0b382d3a9a Update boom_scholar.txt 2025-02-20 09:07:06 +01:00
Hans Mackowiak
45319ddf73 ~ lf 2025-02-20 06:54:18 +01:00
Paul Hammerton
76c725843d Merge pull request #7046 from paulsnoops/edition-updates
Edition updates: FCA, FIC, FIN, SLD
2025-02-19 17:59:37 +00:00
Paul Hammerton
ee09d6ca6a Edition updates: FCA, FIC, FIN, SLD 2025-02-19 17:56:27 +00:00
Fulgur14
02173ce357 8 FIN cards (#7040) 2025-02-19 16:42:24 +00:00
tool4ever
105bfdc489 Script fixes (#7045) 2025-02-19 16:19:57 +01:00
Hans Mackowiak
9b90d04376 Update boommobile.txt
fix Exhaust Cost
2025-02-19 15:22:43 +01:00
Hans Mackowiak
6233fc09af Update Aetherdrift.txt
fix Skysovereign, Consul Flagship
2025-02-19 14:09:15 +01:00
tool4ever
ec20b59ff3 Dependency tab (#7013) 2025-02-19 10:31:59 +01:00
Northmoc
049eb19be4 fix issue #7007 (Double Team) (#7038) 2025-02-19 10:08:12 +01:00
Renato Filipe Vidal Santos
e5e8fa4cdd FIN: 4 cards (#7042) 2025-02-19 10:07:09 +01:00
tool4ever
80c11b9f11 Speed again (#7035)
* Speed again

* Fix NPE

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-02-18 19:52:43 +03:00
Renato Filipe Vidal Santos
af055f37dc Add files via upload (#7003) 2025-02-18 19:52:25 +03:00
Agetian
49c0db5280 Add puzzle PS_DFT1 - Possibility Storm - Aetherdrift 01 (#7037)
* - Add DFT/DRC achievements by Marek14.

* - Add puzzle PS_DFT1.
2025-02-18 19:52:03 +03:00
Agetian
8478835c4d - Add DFT/DRC achievements by Marek14. (#7036) 2025-02-18 19:39:29 +03:00
Paul Hammerton
804a9d9f20 Merge pull request #7034 from paulsnoops/edition-updates
Edition updates: FIC, FIN, SLD, SLP, SLX, TDM
2025-02-18 11:48:29 +00:00
Paul Hammerton
9060dd786f Edition updates: FIC, FIN, SLD, SLP, SLX, TDM 2025-02-18 11:38:30 +00:00
Renato Filipe Vidal Santos
802fee2e86 FIC: 4 cards (#7032) 2025-02-18 11:22:26 +00:00
Hans Mackowiak
8f6fc751dd Make AI start their engine in Main1 (#7033) 2025-02-18 10:06:37 +03:00
Simisays
770dbc31cd [ADVENTURE] Sorin dungeon cleanup (#7026)
* Update vampirecastle_4.tmx

* 2 more cleanups
2025-02-18 07:30:36 +03:00
Chris H
a49ab150f9 Fix imports 2025-02-17 20:19:41 -05:00
Chris H
4bc07e5311 Disable bulk images from the UI 2025-02-17 20:19:41 -05:00
tool4ever
8706ba7b68 Update sphere_of_annihilation.txt (#7030)
Closes #7029
2025-02-17 12:38:13 +01:00
Hans Mackowiak
99bc83ae84 Add GameEventDoorChanged for log 2025-02-17 10:04:55 +01:00
tool4ever
16e871be7b Fix Arvinox sometimes failing (#7023) 2025-02-16 14:16:42 +01:00
tool4ever
afc4024287 Effects don't need Exiled trigger (#7022) 2025-02-16 09:43:36 +00:00
tool4ever
0da1681c96 checkStaticAbilities: skip wrong zone earlier for less looping (#7018)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-02-16 09:50:37 +03:00
tool4ever
da19214754 Radiant Lotus revisited (#7017)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-02-16 08:00:41 +03:00
Chris H
44fca5ee5e Restore flatten library 2025-02-15 18:00:19 -05:00
GitHub Actions
2f33c24414 [maven-release-plugin] prepare for next development iteration 2025-02-15 18:00:19 -05:00
GitHub Actions
380f289887 [maven-release-plugin] prepare release forge-2.0.02 2025-02-15 18:00:19 -05:00
Chris H
a5ab069f5b Temporarily remove flatten library for release 2025-02-15 18:00:19 -05:00
Jetz
e880a83df2 Let SVars in functional variants overwrite original script 2025-02-15 12:34:00 -05:00
Jetz
80cc7218a3 URLs for token image keys for speed and max_speed 2025-02-15 12:34:00 -05:00
Renato Filipe Vidal Santos
4809fb858a Update gale_conduit_of_the_arcane.txt 2025-02-15 12:19:58 -05:00
Jetz
3af62888dc Remove wake lock on desktop 2025-02-15 07:50:06 +01:00
Jetz
79e1d0a0f0 Count destroyed attractions for "number of attractions you've visited this turn" 2025-02-15 07:50:06 +01:00
Jetz
c447dfc888 Support "Affinitycycling" and "Affinity for Affinity" 2025-02-15 07:50:06 +01:00
Jetz
8149966915 Fix Tyrranax Rex importing 2025-02-15 07:50:06 +01:00
Hans Mackowiak
472f9481e8 Update radiant_lotus.txt 2025-02-15 07:49:21 +01:00
Hans Mackowiak
2209ce3cee Update sanguine_soothsayer.txt
fix mana cost
2025-02-14 14:57:40 +01:00
Hans Mackowiak
258c89e65d Update CounterEffect.java (#7014) 2025-02-14 09:06:25 +01:00
tool4ever
11913085ef Misc cleanup (#7009) 2025-02-13 15:51:19 +01:00
Chris H
53fca12a57 Fix Radiant lotus 2025-02-12 21:14:01 -05:00
Chris H
8e8a795f19 Migrate upcoming 2025-02-12 20:34:55 -05:00
Renato Filipe Vidal Santos
a4b27321ac Oracle update: During your turn (#7005) 2025-02-12 10:55:57 +01:00
Renato Filipe Vidal Santos
ead83d932f Oracle update: Affinity (#7001) 2025-02-12 10:34:50 +01:00
tool4ever
900bd4327d Update pride_of_the_road.txt 2025-02-12 10:21:39 +01:00
Paul Hammerton
1a2bb054f4 Merge pull request #7000 from paulsnoops/fix-sld
Edition updates: SLD
2025-02-11 19:09:54 +00:00
Paul Hammerton
f908df46c8 Edition updates: SLD 2025-02-11 19:07:12 +00:00
Paul Hammerton
f8c97842c4 Merge pull request #6999 from paulsnoops/edition-updates
Edition updates: SLD
2025-02-11 17:08:59 +00:00
Paul Hammerton
c324b45025 Edition updates: SLD 2025-02-11 17:02:00 +00:00
tool4ever
5061ceda0e Clean up (#6995) 2025-02-10 21:43:04 +00:00
Chris H
d1e677eb4f Update rangers_refueler.txt 2025-02-10 17:37:26 +01:00
Jetz72
493a8f351b Add Speed Tracker to Command Zone (#6982)
* Add command zone effect displaying speed

* Remove enum counter type for speed.

* Make Start Your Engines an SBA.

* LifeLost -> LifeLostAll per speed rules.

* Use same game event for all speed changes.

* Fix keyword not appearing in detail text

* Cleanup extra createSpeedEffect.

* Add support for arbitrary overlay text. Remove fake counters.

* Text styling.

* Remove extra SBA check.

* Remove speed from PlayerView; localization support.

---------

Co-authored-by: Jetz <Jetz722@gmail.com>
2025-02-10 07:43:48 +03:00
Hans Mackowiak
04172eead0 suspected as Static Effect (#6991) 2025-02-09 13:02:59 +00:00
tool4ever
f0ed9288b3 Remove outdated logic (#6989) 2025-02-09 13:01:15 +00:00
Hans Mackowiak
03fe3d63ea Start your Engines as StaticAction (#6987)
* Start your Engines as StaticAction

* ~ fix trigger desc

* ~ moved keyword to better place
2025-02-09 10:52:17 +01:00
Hans Mackowiak
83438ef72b StaticAbilityContinous now have AffectedDefined for card list (#6986)
* StaticAbilityContinous now have AffectedDefined for card list
2025-02-09 10:49:19 +01:00
Paul Hammerton
cf18808a70 Merge pull request #6988 from paulsnoops/dft-rank
Update draft rankings: DFT, INR, PIO
2025-02-08 23:13:53 +00:00
Paul Hammerton
49dc2c1c42 Update draft rankings: DFT, INR, PIO 2025-02-08 23:10:29 +00:00
Northmoc
692400db2a finish up Max speed refactor (#6958)
Co-authored-by: Hans Mackowiak <hanmac@gmx.de>
2025-02-08 14:42:55 +01:00
Northmoc
751c31b226 refactor Max Speed round 1 (#6957) 2025-02-08 14:35:26 +01:00
tool4ever
7be252c509 Fix Elvish Refueler (#6984) 2025-02-08 08:04:30 +00:00
tool4ever
288eac743c Fix Blessing applying too late for triggers (#6983) 2025-02-07 18:17:00 +00:00
tool4ever
d0bd80f158 Update spire_mechcycle.txt 2025-02-07 09:28:38 +01:00
Paul Hammerton
7fe8154bcb Merge pull request #6979 from paulsnoops/edition-updates
Edition updates: PL25
2025-02-06 18:38:42 +00:00
Paul Hammerton
87cd5c90a3 Edition updates: PL25 2025-02-06 18:34:33 +00:00
tool4ever
12399fca48 Update elvish_refueler.txt 2025-02-06 17:42:04 +00:00
Chris H
aaf17553c1 Update syphon_fuel.txt (#6978) 2025-02-06 17:20:17 +01:00
tool4ever
9dedd24d3e Fix Manifest Dread vs. Grafdigger's Cage (#6977) 2025-02-06 17:19:40 +01:00
tool4ever
2443f1486d Fix Primal Wellspring trigger not working with Chun-Li (#6971)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-02-06 09:40:29 +03:00
Simisays
cfd1822198 update 2025-02-05 19:05:00 -05:00
Paul Hammerton
7930c4949b Merge pull request #6975 from paulsnoops/fix-token
Edition updates: Fix token name in DFT
2025-02-05 17:50:39 +00:00
Paul Hammerton
ef6d0707ac Edition updates: Fix token name in DFT 2025-02-05 17:47:17 +00:00
Paul Hammerton
cfd792cb69 Merge pull request #6974 from paulsnoops/edition-updates
Edition updates: DFT, DRC, SLD, SPG
2025-02-05 17:14:52 +00:00
Paul Hammerton
f5352662cd Edition updates: DFT, DRC, SLD, SPG 2025-02-05 17:09:00 +00:00
Justin C
bf1192f80d instanceof Pattern variable changes (#6972) 2025-02-05 16:52:14 +03:00
tool4ever
dee2150cf9 Fix trigger targeting itself (#6973)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-02-05 16:52:04 +03:00
Hans Mackowiak
c44b105d9f ~ lf 2025-02-04 07:03:51 +01:00
loud1990
b624fb3cf8 DFT Card Cleanup
Changed mana cost for Sundial, trigger for Necroregent
2025-02-03 20:48:11 -05:00
Chris H
45396c1bf4 Fix sellfactor duplication 2025-02-03 18:55:24 -05:00
tool4ever
f562ae6fdb More view cleanup (#6967) 2025-02-03 21:12:03 +00:00
Chris H
6615090bda Allow jumpstart/"nosell" cards to be sold for 0 credits 2025-02-02 12:55:09 -05:00
Chris H
eaf6f117a2 Don't try to load battle if entering village simultaneously 2025-02-02 12:54:38 -05:00
tool4ever
a8488502e7 Reduce some View updates (#6966) 2025-02-02 17:52:20 +00:00
Chris H
309e36827c Fix draftable cards 2025-02-01 22:24:36 -05:00
Chris H
fe7883ddd8 Add ManaCost for Wretched Doll 2025-02-01 22:08:14 -05:00
Chris H
06e5ff5174 DFT edition cards update 2025-02-01 22:08:14 -05:00
Chris H
2c31dd01dd Add booster info for Aetherdrift 2025-02-01 21:40:31 -05:00
Hans Mackowiak
d8a92c4879 ~ lf 2025-02-01 11:55:46 +01:00
Fulgur14
16baeadf0c Final DFT push (2 of 3) (#6948) 2025-02-01 09:34:31 +00:00
Hans Mackowiak
88ed81f75f ~ lf 2025-02-01 10:17:29 +01:00
Fulgur14
70d9df1db2 Final DFT push (3 of 3) (#6949) 2025-02-01 08:33:19 +00:00
Hans Mackowiak
aaa04570f2 Update howlers_heavy.txt 2025-02-01 07:10:20 +01:00
Fulgur14
9365d55964 Final DFT push (1 of 3) (#6947) 2025-01-31 23:04:52 +00:00
Renato Filipe Vidal Santos
0c61139f51 Add files via upload (#6945) 2025-01-31 17:36:16 +03:00
Hans Mackowiak
34bd623e45 Update kataki_wars_wage.txt
Closes #6943
2025-01-31 11:07:00 +01:00
Fulgur14
0e31bb8565 7 DFT cards (Waxen Shapethief and its models) (#6937) 2025-01-31 08:33:59 +01:00
Chris H
0b87094f96 Fix NPE with POEReference 2025-01-30 21:32:17 -05:00
Chris H
42e53c66f6 Update ravenous_amulet.txt 2025-01-30 16:58:11 -05:00
Renato Filipe Vidal Santos
25a7d80146 Fixing mistaken references to defending player in triggered abilities 2025-01-30 21:36:48 +00:00
Simisays
a6170745b1 Update config.json 2025-01-30 15:04:49 -05:00
Simisays
db32547a6e Update eldrazilarge.dck 2025-01-30 15:04:49 -05:00
Simisays
4df6d9998b Update config.json 2025-01-30 15:04:49 -05:00
Simisays
2f42f6ca28 Update config.json 2025-01-30 15:04:49 -05:00
Simisays
6617c10946 update 2025-01-30 15:04:49 -05:00
Northmoc
1d34e02957 grim_bauble.txt and some fixes (#6935) 2025-01-30 18:34:06 +00:00
Northmoc
132f8d3d4f another round of whitespace and other fixes (#6934) 2025-01-30 18:32:41 +00:00
Northmoc
d3961b1a53 outpace_oblivion.txt (#6936) 2025-01-30 18:31:40 +00:00
Fulgur14
2c04ef9e1f Howlsquad Heavy (DFT) (#6933) 2025-01-30 13:37:02 +01:00
Fulgur14
f599e3ead6 4 DFT cards (Oviya and her projects) (#6932) 2025-01-30 12:07:42 +01:00
Northmoc
e16da84a75 gonti_night_minister.txt + support (#6924) 2025-01-30 11:28:04 +03:00
Fulgur14
0a622f5282 19 DFT cards (Mimeoplasm and its imprints) (#6922)
* Add files via upload

* Update mimeoplasm_revered_one.txt

* Update radiant_lotus.txt

* Add files via upload

* Update radiant_lotus.txt

* Update ripclaw_wrangler.txt
2025-01-30 08:07:40 +03:00
Fulgur14
bb40138c52 8 DFT cards (Adrenaline Jockey and groupies) (#6925)
* 7 DFT cards (Adrenaline Jockey and groupies)

* Add files via upload
2025-01-30 08:07:31 +03:00
tool4ever
2a7bd8bbd2 Clean up logic (#6928) 2025-01-29 18:53:39 +00:00
Fulgur14
e6fc666012 Rover Blades and Gastal Thrillroller (#6927) 2025-01-29 18:21:24 +00:00
Fulgur14
a1297e593c Salvation Engine (#6926) 2025-01-29 17:38:50 +00:00
Renato Filipe Vidal Santos
2026c7eca0 Edit pile cleanup: Trigger effects formatted as activated abilities 2025-01-29 14:13:15 +00:00
Fulgur14
137076f224 9 DFT cards (3 Tyrants and their food) (#6912) 2025-01-29 11:08:51 +00:00
Fulgur14
5538650681 7 DFT cards (Gastal Blockbuster and friends) (#6909) 2025-01-29 11:08:39 +00:00
tool4ever
0e36e6b6d9 Fix room fully unlocked when turned up from manifest (#6921) 2025-01-29 08:46:57 +00:00
Fulgur14
f4c786763a Update bitter_chill.txt (#6920) 2025-01-29 07:42:41 +00:00
Northmoc
978f09e07b spikeshell_harrier.txt + support (#6915)
* spikeshell_harrier.txt + support

* combine effects

* remove unneeded
2025-01-28 21:24:40 +03:00
tool4ever
53e5f2b037 Update rocketeer_boostbuggy.txt 2025-01-28 11:35:27 +00:00
Paul Hammerton
73124adff9 Merge pull request #6914 from paulsnoops/edition-updates
Edition updates: DFT, DRC
2025-01-28 10:46:46 +00:00
Paul Hammerton
f7641c9b10 Edition updates: DFT, DRC 2025-01-28 10:41:12 +00:00
tool4ever
99fd4d9125 AnimateSubAbility rework (#6819)
* AnimateSubAbility rework

* Remove old fix code, it will no longer be needed

* Add zone ordering

* Add labels

* Clean up

* Fix test

* Tweak logic

* Fix Gilraen

* Refactor with counter

* Clean up

* Cleanup effect if card can't ETB

* Update semesters_end.txt

Format abilities

* Return as Aura trickery

* Apply effect before RE

* Update scripts

* Fix order after creating it earlier

* Fix test

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
Co-authored-by: Hans Mackowiak <hanmac@gmx.de>
2025-01-28 13:18:24 +03:00
tool4ever
1e1fa1a5e1 Dependency Graphs (#6869) 2025-01-28 09:16:31 +00:00
tool4ever
97553c5b76 Fix split card reset before LKI creation (#6911) 2025-01-28 08:48:34 +00:00
Hans Mackowiak
db4c891960 ~ lf 2025-01-27 21:37:15 +01:00
Fulgur14
c0505797f2 5 DFT cards (The Speed Demon and friends) (#6905) 2025-01-27 19:04:35 +00:00
Paul Hammerton
11d52c923c Merge pull request #6907 from paulsnoops/edition-updates
Edition updates: DFT, DRC
2025-01-27 18:26:04 +00:00
Paul Hammerton
f08c20abfd Edition updates: DFT, DRC 2025-01-27 18:22:44 +00:00
Paul Hammerton
b6fdfa752e Merge pull request #6906 from paulsnoops/master
LF
2025-01-27 18:17:08 +00:00
Paul Hammerton
b4a34cdd20 brawl 2025-01-27 18:13:25 +00:00
Fulgur14
f9fe3fb75c 8 DFT cards (Veteran Beastrider and friends) (#6904) 2025-01-27 17:24:31 +00:00
Northmoc
709f524604 risen_necroregent.txt, gas_guzzler.txt (#6903) 2025-01-27 17:15:07 +00:00
Northmoc
c59c91f4fa cards that need the new TapPower stuff (#6899) 2025-01-27 16:31:31 +01:00
Renato Filipe Vidal Santos
31890e19bd Puppeteer Clique (and similar effects) fix 2025-01-27 13:10:58 +01:00
Fulgur14
ad9059df43 Roadside Assistance, Reckless Velocitaur, and DRC decks (#6901) 2025-01-27 10:57:44 +01:00
Hans Mackowiak
77761dc00a StaticAbilityTapPowerValue: saddles Mounts and crews Vehicles (#6898) 2025-01-26 22:39:04 +01:00
Hans Mackowiak
1da25c1cc0 TriggerCrewedSaddled: unify (#6897) 2025-01-26 20:05:32 +01:00
Northmoc
70823e9353 Speed round 2 (#6896) 2025-01-26 15:55:19 +00:00
Renato Filipe Vidal Santos
de3ffe041a Update protean_war_engine.txt (#6895) 2025-01-26 14:30:41 +00:00
tool4ever
70ab4509fe Remove some Cost$ (#6894)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-01-26 14:22:54 +03:00
Hans Mackowiak
7a221dcd3b ~ lf 2025-01-26 11:35:53 +01:00
Fulgur14
340ee5863a Update saheeli_radiant_creator.txt (#6893) 2025-01-26 10:01:37 +00:00
Fulgur14
9214dea4cb 7 DFT cards (Mu Yanling and friends 2025-01-26 09:49:12 +00:00
tool4ever
5701d11cae Update r_4_4_dinosaur_dragon_flying.txt 2025-01-26 08:56:16 +00:00
Northmoc
7b42dca49e Speed / Start your engines! (#6888) 2025-01-26 08:48:15 +00:00
Fulgur14
95c6b81b44 3 DFT cards (#6890) 2025-01-26 08:22:54 +00:00
tool4ever
0325a82aa2 Update demigod_of_revenge.txt 2025-01-26 08:20:11 +00:00
Northmoc
7c1ab8ec22 weird 2025-01-25 21:13:20 -05:00
Chris H
375f27de1e Preliminary booster slots for INR 2025-01-25 21:12:49 -05:00
Renato Filipe Vidal Santos
41eb303caf Cleanup: EffectZone$ All, part 3 (#6877) 2025-01-25 20:08:24 +00:00
Renato Filipe Vidal Santos
029e5da14b Cleanup: EffectZone$ All, part 2 (#6876) 2025-01-25 20:07:45 +00:00
Renato Filipe Vidal Santos
ef4055c1b5 Cleanup: EffectZone$ All, part 1 2025-01-25 20:07:27 +00:00
Renato Filipe Vidal Santos
d060b1af0e Cleanup: AffectedZone$ 2025-01-25 19:19:16 +00:00
Renato Filipe Vidal Santos
accc27c0e9 Cleanup: EffectZone$ Command, part 6 (#6845) 2025-01-25 18:41:46 +00:00
Renato Filipe Vidal Santos
376b0ef4ec Cleanup: EffectZone$ Command, part 5 (#6844) 2025-01-25 18:41:19 +00:00
Renato Filipe Vidal Santos
22f5f1e93d Cleanup: EffectZone$ Command, part 4 2025-01-25 18:40:12 +00:00
Renato Filipe Vidal Santos
2b828d7416 Cleanup: EffectZone$ Command, part 3 2025-01-25 18:39:24 +00:00
Renato Filipe Vidal Santos
83dd62f864 Cleanup: EffectZone$ Command, part 2 (#6841) 2025-01-25 18:36:29 +00:00
Renato Filipe Vidal Santos
597e7e80fa Cleanup: EffectZone$ Command, part 1 (#6840) 2025-01-25 18:33:34 +00:00
Hans Mackowiak
72be374158 StaticAbility: use getActiveZone functions (#6861)
* StaticAbility: use getActiveZone functions
2025-01-25 16:54:07 +01:00
Fulgur14
295abefb33 Lost Monarch of Ifnir (DRC) (#6868) 2025-01-25 14:40:56 +00:00
Fulgur14
5385678076 4 DFT + 7 DRC cards (#6850)
* Support Aetheric Amplifier
2025-01-25 13:56:39 +00:00
tool4EvEr
9bda7134d0 Fix wrong CDA param 2025-01-25 14:42:38 +01:00
Hans Mackowiak
f5221ca78c ReplaceToken: use Param from ReplacementEffect 2025-01-25 13:02:41 +01:00
Paul Hammerton
34e85d9356 Merge pull request #6871 from paulsnoops/format-updates
Add INR, DFT & DRC to formats
2025-01-25 11:55:02 +00:00
Paul Hammerton
47e62b8ef6 brawl 2025-01-25 11:49:52 +00:00
Paul Hammerton
2cdb17cb13 Add INR, DFT & DRC to formats 2025-01-25 11:48:30 +00:00
Paul Hammerton
a101b08f30 Merge pull request #6870 from paulsnoops/fix-pg
Fix pyrewood_gearhulk
2025-01-25 10:43:14 +00:00
Paul Hammerton
df368e2009 Fix pyrewood_gearhulk 2025-01-25 10:39:22 +00:00
Fulgur14
bcc2ad5037 Update territorial_aetherkite.txt (#6865) 2025-01-25 09:19:50 +00:00
Paul Hammerton
dfef8a44f8 Merge pull request #6867 from paulsnoops/master
~ LF
2025-01-25 09:09:35 +00:00
Paul Hammerton
dcccc57cec ~ LF 2025-01-25 09:04:19 +00:00
Fulgur14
c20dfe85e4 3 DFT + 5 DRC cards (#6860) 2025-01-25 08:20:41 +00:00
Hans Mackowiak
f59214737d ~ LF 2025-01-25 09:12:57 +01:00
Paul Hammerton
a92e786543 Merge pull request #6863 from paulsnoops/edition-updates
Edition updates: DFT, DRC, SLP
2025-01-24 23:13:34 +00:00
Paul Hammerton
9d0bad67dd Edition updates: DFT, DRC, SLP 2025-01-24 23:09:57 +00:00
Fulgur14
b6445dbad9 Add files via upload (#6862) 2025-01-24 22:36:45 +00:00
Hans Mackowiak
da4445bc92 Update and rename .github/full_throttle.txt to forge-gui/res/cardsfolder/upcoming/full_throttle.txt 2025-01-24 16:33:42 +01:00
Fulgur14
ab15743a74 7 DFT + 1 DRC card (#6853) 2025-01-24 16:20:11 +01:00
Fulgur14
36d72b98a5 Add files via upload (#6846) 2025-01-24 16:21:46 +03:00
Fulgur14
dd9bca2bd7 March of the World Ooze and Molt Tender (DFT) (#6848) 2025-01-23 20:25:57 +00:00
Paul Hammerton
e40d2aab89 Merge pull request #6849 from paulsnoops/edition-updates
Edition updates: DFT, PW25, SPG
2025-01-23 19:20:43 +00:00
Paul Hammerton
2b98349823 Edition updates: DFT, PW25, SPG 2025-01-23 19:15:59 +00:00
Fulgur14
3bb025801e Autarch Mammoth (DFT) (#6847) 2025-01-23 18:48:20 +00:00
Fulgur14
2f390114b5 3 DFT cards plus update of Sab-Sunen (#6839) 2025-01-23 08:10:12 +00:00
Hans Mackowiak
56606e0ac2 ~ LF 2025-01-23 07:36:22 +01:00
Fulgur14
d52590af7f Brightfield Mustang and Thopter Fabricator 2025-01-22 22:14:58 +00:00
Fulgur14
0a685a6c21 10 DFT cards (#6829) 2025-01-22 22:14:02 +00:00
Fulgur14
3126fffb4b Count on Luck (DFT) (#6837) 2025-01-22 21:33:49 +00:00
Fulgur14
f6297a9db6 Add files via upload (#6832) 2025-01-22 21:46:35 +03:00
Fulgur14
86cdaa9d20 Fearless Swashbuckler (DFT) (#6833) 2025-01-22 21:46:30 +03:00
Fulgur14
895d40f817 Full Throttle (DFT) (#6835)
* Full Throttle (DFT)

* Update full_throttle.txt

* Update full_throttle.txt
2025-01-22 21:46:13 +03:00
Paul Hammerton
7b4a8a7583 Merge pull request #6834 from paulsnoops/edition-updates
Edition updates: DFT, DRC, SPG
2025-01-22 17:59:16 +00:00
Paul Hammerton
148cf0b5c5 Edition updates: DFT, DRC, SPG 2025-01-22 17:48:12 +00:00
tool4ever
d314b2ef85 Clean + fix combo (#6830) 2025-01-22 16:52:43 +00:00
Renato Filipe Vidal Santos
47a57f50b3 January 2025 cleanup: pass 7 (#6831) 2025-01-22 16:12:50 +00:00
Justin C
82ebeefff7 Add ${androidPlatform} 2025-01-22 09:31:22 -05:00
Justin C
b721da78c8 Add ${androidBuildTools} to pom.xml
Update the Android Build Tools via variable
2025-01-22 09:31:22 -05:00
Hans Mackowiak
2a8e66fe60 Create .gitattributes (#6827)
Forces line ending for card scripts
2025-01-22 10:55:21 +01:00
Fulgur14
6d0bf19242 17 DST + 4 DSC cards (#6820) 2025-01-22 08:12:59 +00:00
Renato Filipe Vidal Santos
a815b70a8f January 2025 cleanup: pass 6, part C (#6826) 2025-01-22 08:12:41 +00:00
Renato Filipe Vidal Santos
99bb49e904 January 2025 cleanup: pass 6, part B (#6825) 2025-01-22 08:03:01 +00:00
Renato Filipe Vidal Santos
693988dd77 January 2025 cleanup: pass 6, part A (#6824) 2025-01-22 08:02:47 +00:00
Simisays
aec341655c Removal of convention cards in adventure (#6803)
* Update config.json

* Update config.json
2025-01-22 08:46:32 +03:00
Fulgur14
edb88f64ef 13 DFT cards (#6817) 2025-01-21 21:02:50 +00:00
Hans Mackowiak
5e708337c2 Exhaust: add new Flag and Static for bypass (#6818) 2025-01-21 21:59:03 +01:00
Hans Mackowiak
917b8dbd75 Timestamp rework (#117) 2025-01-21 17:11:37 +00:00
tool4ever
6c97eba8b1 Update keldon_firebombers.txt 2025-01-21 17:11:16 +00:00
Paul Hammerton
f5ef9b4866 Merge pull request #6813 from paulsnoops/edition-updates
Edition updates: DFT, DRC, PMEI, SLD
2025-01-21 13:08:32 +00:00
Paul Hammerton
a1718ec1ed Edition updates: DFT, DRC, PMEI, SLD 2025-01-21 13:02:50 +00:00
Chris H
a9f99ca5e6 Since people like flashing in blockers 2025-01-21 07:37:20 -05:00
Fulgur14
27a4512d42 Lifecraft Engine 2025-01-21 13:32:45 +01:00
Hans Mackowiak
e2e76e101e Reconfigure: use StaticLayer (#6806) 2025-01-21 09:31:34 +01:00
tool4ever
297c6d283c Fix ChangeZone logic (#6809) 2025-01-21 08:50:28 +01:00
Renato Filipe Vidal Santos
81c23d9586 January 2025 cleanup: pass 5 (#6805) 2025-01-20 22:55:18 +01:00
Renato Filipe Vidal Santos
44a1073362 January 2025 cleanup: pass 4 (#6801) 2025-01-20 17:20:56 +01:00
Agetian
dae4e2ef72 - Fix the AI never playing Hare Apparent. (#6802) 2025-01-20 15:07:57 +01:00
tool4ever
2ea377cbc6 Minor cleanup (#6800)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-01-20 13:54:49 +01:00
Hans Mackowiak
3f605aa61a AmassEffect: use Effect in Command Zone for Type Change (#6797) 2025-01-20 13:05:08 +01:00
Hans Mackowiak
ab3fdbdca2 Card: add RenderForUI to disable Render for Effects (#6792) 2025-01-20 12:51:37 +01:00
Renato Filipe Vidal Santos
5a3e001bd9 Add files via upload (#6796) 2025-01-20 06:14:49 +01:00
tool4ever
a4d37824b4 Don't update reveal from library when paying with mana ability (#6791)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-01-18 22:45:13 +01:00
tool4ever
cd5a1a3824 Fix Averna (#6790) 2025-01-18 16:12:59 +00:00
Renato Filipe Vidal Santos
14417ad40e January 2025 cleanup: pass 2, part C (#6788) 2025-01-18 16:09:44 +01:00
Renato Filipe Vidal Santos
9b43733a86 Add files via upload 2025-01-18 16:08:56 +01:00
Renato Filipe Vidal Santos
d23fc182af Add files via upload 2025-01-18 16:06:38 +01:00
Renato Filipe Vidal Santos
092caf71b2 DA1: The Battle of Dragon Brothers // Fate Reforged 2025-01-18 12:42:36 +00:00
tool4ever
453afa4275 Curse of Vengeance finally works (#6782) 2025-01-18 11:34:21 +00:00
Renato Filipe Vidal Santos
4698766585 January 2025 cleanup: pass 1 (#6784) 2025-01-18 11:06:48 +01:00
Hans Mackowiak
726d1f3330 ~ Remove Cost from Aura Spells, use ManaCost instead 2025-01-18 11:00:33 +01:00
tool4ever
42416bf732 CharmAi: fix duplicated choice (#6776) 2025-01-15 18:26:41 +00:00
GroundThing
bf2c184370 Fixing radiant smite's cost
Radiant Smite was coded as costing {W}, when it should cost {1}{W}
2025-01-15 17:51:11 +01:00
Hans Mackowiak
0153fca877 ~ CharacteristicDefining helper 2025-01-14 20:10:44 +01:00
tool4ever
ae6f937f35 Misc cleanup (#6767)
* Restore identical checkstyle until it can be cleaned up
2025-01-14 17:14:33 +00:00
tool4ever
7faeda3abc Update SpellAbilityEffect.java 2025-01-14 15:21:24 +01:00
Hans Mackowiak
7fe74f59f6 CardView: added extra check for Ward and Annihilator icons 2025-01-14 13:50:59 +01:00
Hans Mackowiak
f92c570bff Update CardRules.java (#6768)
small fix to unify Characteristic Defining Abilities
2025-01-14 11:49:08 +01:00
Hans Mackowiak
ec23136a45 ~ formatting 2025-01-14 07:29:07 +01:00
Hans Mackowiak
24e16abe89 ~ remove note about maven repo 2025-01-14 07:23:31 +01:00
Hans Mackowiak
c30716ec8a ~ remove 4thline 2025-01-14 07:18:05 +01:00
Hans Mackowiak
6e356d725a Update w_x_x_spirit_cleric_total_spirits.txt
Closes #6765
2025-01-14 07:14:51 +01:00
IceBen4444
54bedc1938 Update mr_foxglove.txt (#6766)
The card should remember replaced draws since it is a "this way" effect that cares about the number.
2025-01-13 21:47:12 +00:00
Chris H
1c0ca26c89 This list doesn't need to be instantiated like an array 2025-01-13 07:04:12 +01:00
Chris H
2ce91a04f1 This list doesn't need to be instantiated like an array 2025-01-13 06:53:28 +01:00
Hans Mackowiak
b8b2fd40d7 Averna: use ReplaceCascade Effect 2025-01-12 21:04:57 +01:00
Hans Mackowiak
3fb07c5ead Move Altar of the Pantheon to its own static (#6760) 2025-01-11 14:18:17 +00:00
Paul Hammerton
fb9770d8b9 Merge pull request #6759 from paulsnoops/edition-updates
Edition updates: INR
2025-01-10 17:49:29 +00:00
Paul Hammerton
cbc39b0e76 Edition updates: INR 2025-01-10 17:44:55 +00:00
Paul Hammerton
672bddfb60 Merge pull request #6757 from churrufli/netdecks080125
Net Decks Archive Updates
2025-01-09 18:09:12 +00:00
marthinwurer
4c7a55aaab Improved AI tapland playing (#6751) 2025-01-08 18:03:17 +00:00
Justin C
1981afca03 Replace Cling with jupnp (#6754)
* Update forthline cling dependency to the more supported jupnp, removes http source. FServerManager.java file formatted

* Update proguard.cfg

Fixes the build problem with Android

* Update FServerManager.java

fix code changes

* Update FServerManager.java

---------

Co-authored-by: Hans Mackowiak <hanmac@gmx.de>
2025-01-08 14:16:10 +03:00
Churrufli
0194fb6726 Net Decks Archive Updates (Standard, Modern, Legacy, Vintage, Pioneer, Pauper) 2025-01-08 10:53:22 +01:00
Churrufli
da5d5b1dc1 Net Decks Archive Updates (Standard, Modern, Legacy, Vintage, Pioneer, Pauper) 2025-01-08 10:49:08 +01:00
Hans Mackowiak
995b3f2cf5 Fix addOpen for Exe
Fix AddOpen for launch4j Exe until https://github.com/orphan-oss/launch4j-maven-plugin/issues/423 finds something better
2025-01-07 08:44:03 -05:00
Hans Mackowiak
acbb7036c3 Update GameAction.java (#6753)
Fix Vraska the Schemer trying to return Instant Spells as Artifact
2025-01-07 09:57:23 +00:00
tool4ever
5b76ccbbd2 Cleanup run (#6750) 2025-01-06 20:52:26 +00:00
Hans Mackowiak
6042884bb3 Update pom.xml 2025-01-06 07:28:34 -05:00
tool4ever
e4247a2402 Fix AI applying cost raise twice (#6747) 2025-01-05 12:32:27 +00:00
Hans Mackowiak
2fcf95c755 Extra cost gift rework (#6733)
* added PromisedGift as xCount

* SpellAbilityAi: move chooseOptionalCosts

* SpellAbilityAi: chooseOptionalCosts check for invalid targets

* Give API logic access to castSA

* ~ add BaseSpell for PromiseGift

* Unearth: remove unneeded Param

* PromiseGift: uses AITgts to stop AI from using Gift when not needed

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2025-01-05 08:52:35 +01:00
Hans Mackowiak
1209f39cf1 Merge pull request #6743 from Card-Forge/runScriptFix
remove add-opens from mandatory.java.args, use MANIFEST.mf
2025-01-04 11:22:53 +01:00
Hans Mackowiak
9ee2cfbf18 remove add-opens from mandatory.java.args, use MANIFEST.mf 2025-01-04 10:39:38 +01:00
Jetz72
33e26c1ad2 Fix alt zone display having the zones on opposite sides of the screen. (#6742) 2025-01-03 18:47:56 +00:00
GroundThing
29245cd9d7 Add Missing Quest Reputation Rewards/Penalties
Some quests would notify the player of Reputation Rewards that were not actually awarded. Likewise some dialogue choices or upon declining some quests would notify the player of a loss of reputation that wasn't actually deducted. And in one case, the listed reputation change was different than the actual change. This change should ensure all displayed reputation rewards and penalties are applied. (Only applies to Shandalar)
2025-01-03 09:02:24 -05:00
Jetz
971befb1c9 Fix for hotseat mana selection 2025-01-02 22:20:08 -05:00
Justin C
6aa61684df GenerateGitChangelog goal skip. Update se.bjurr.gitchangelog to v2.2.0. (#6703)
* Updates se.bjurr.gitchangelog to v2.2.0. POM changes to skip "GenerateGitChangelog" in android test and debug builds.

* Remove jitpack.io repo

* Update pom.xml
2025-01-02 22:10:58 -05:00
Chris H
cd517fddbb Restore flatten for snapshots 2025-01-02 09:40:50 -05:00
GitHub Actions
7388468ceb [maven-release-plugin] prepare for next development iteration 2025-01-02 09:40:50 -05:00
GitHub Actions
31af1108d3 [maven-release-plugin] prepare release forge-2.0.01 2025-01-02 09:40:50 -05:00
Chris H
b4dd336ca7 Remove flatten temporarily for release 2025-01-02 09:40:50 -05:00
Jetz72
386ed8a082 Contraptions (#6717)
* Start of contraptions

* More contraption work

* More contraption stuff.
Steamflogger Boss implementation

* More Contraption things

* Use AI's preferred target for mandatory animate effects

* Possible fix for Boomflinger's empty target prompt

* Remove nullable low-definition mana pool icon.

* Contraption Predicates

* Desktop extra zone menu

* Remember cranked contraptions

* AnimateAi fallback to AITgts; Bee-Bee Gun

* Fix AI paying optional costs to assemble zero contraptions.

* Override predicted damage for DealDamage effects with random amounts

* Fix double prompt when reassembling other players' contraptions

* All remaining contraptions and support cards!

* Remove unused imports

* Some cleanup

* Implement non-assembled contraption rule.
Fix blank line prefix on card detail text.

---------

Co-authored-by: Jetz <Jetz722@gmail.com>
2025-01-02 09:41:53 +03:00
tool4ever
1c0cb07a2e Remove obsolete GameEvent (#6736) 2025-01-01 17:24:47 +00:00
Hans Mackowiak
dfce81f67c Update chaos_balor.txt
Closes #6524
2025-01-01 10:50:30 +01:00
Hans Mackowiak
2301a34673 Update pom.xml 2024-12-31 10:27:22 +01:00
dependabot[bot]
feb4195ec6 Bump ch.qos.logback:logback-core from 1.5.11 to 1.5.13
Bumps [ch.qos.logback:logback-core](https://github.com/qos-ch/logback) from 1.5.11 to 1.5.13.
- [Commits](https://github.com/qos-ch/logback/compare/v_1.5.11...v_1.5.13)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-31 10:27:22 +01:00
NimSpork
3bc5c1f11f Harold and Bob: Oracle fix (#6734) 2024-12-31 09:59:32 +01:00
tool4ever
5fe099eb03 Clean up scripts (#6732) 2024-12-30 08:04:36 +00:00
tool4ever
475020f742 Order hand option (#6729)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2024-12-30 08:10:02 +03:00
tool4ever
f50f985e99 Some cleanup (#6728) 2024-12-29 09:27:07 +00:00
Simisays
ed2d5f6daf [[Adventure]] Jace quickfix (#6723)
* update

* Update jaces_signature_hoodie.txt

* Update jace_boss_effect.txt
2024-12-28 08:09:32 +03:00
tool4ever
672a9137d4 Clean up (#6722) 2024-12-26 12:59:18 +00:00
tool4ever
9b6203b883 Full Control unleashed (#6700)
* Fix APNAP order
2024-12-26 12:53:46 +00:00
NimSpork
c7d6446fb5 The Roaring Toeclaws fix
Fix to check Mana Value rather than power
2024-12-24 07:14:05 +01:00
Hans Mackowiak
020b205c46 SpellAbilityAi: move willPayUnlessCost to EffectSpecific Code (#6652)
* SpellAbilityAi: move willPayUnlessCost to EffectSpecific Code

* LifeLoseAi: add willPayUnlessCost

* ~ update LoseLife UnlessAI LifeLE cards

* DamageDealAi: add willPayUnlessCost

* ~ removed UnlessAI LifeLE from DealDamage cards

* TapAi with UnlessCost and UnlessSwitched

* ~ ChangeZoneAi with UnlessCost

* ~ remove UnlessAI Defined

* ~ remove UnlessAI OnlyDontControl

* ~ Join Forces cards

* ~ Icy Prison and remove OnlyOwn

* ~ remove UnlessAI Paralyze

* ~ Discard willPayUnlessCost

* ~ first logic for DrawAi + UnlessCost

* DestroyAllAi: willPayUnlessCost for Breaking Point

* move logic for Indulgent Tormentor

* Perplex: some more logic for UnlessCost Discard Hand

* TokenAi: add willPayUnlessCost for Development

* Chain of Vapor UnlessAI logic, need more love

* move WillAttack UnlessAI

* PlayerControllerAi: change how AI pays for UnlessCost

* Fix crash with Argothian Wurm

* fix PlayerControllerAi payManaCost

* Fix AI for Adarkar Unicorn

* remove null == getPayCosts checks

* Clean up

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2024-12-24 07:11:26 +01:00
tool4ever
4f2df85d8f Update trailtracker_scout.txt
Closes #6714
2024-12-23 08:00:21 +01:00
tool4ever
48a33e37c3 Some cleanup (#6712) 2024-12-22 10:27:29 +00:00
Hans Mackowiak
96b2b2cbe4 Upkeep cost remove (#6709) 2024-12-21 13:10:45 +01:00
Cyantime
cd83a16281 Corrects cost of Shrine Keeper (#6706) 2024-12-21 13:21:42 +03:00
Agetian
e25360384b - Fix the AI never playing Chain Lightning. (#6707) 2024-12-21 12:07:43 +03:00
tool4ever
b87be69b27 Cherry pick full control fix (#6702) 2024-12-18 09:22:33 +01:00
Paul Hammerton
c2015bf020 Merge pull request #6699 from paulsnoops/edition-updates
Edition updates: DFT, PLG24, PMEI, SLD
2024-12-17 10:34:26 +00:00
Paul Hammerton
a9c91f3225 filename 2024-12-17 10:31:25 +00:00
Paul Hammerton
2673b59db1 Edition updates: DFT, PLG24, PMEI, SLD 2024-12-17 10:29:45 +00:00
Paul Hammerton
0567300e77 Merge pull request #6698 from paulsnoops/bar-12-16
Banned and Restricted Announcement for December 16, 2024
2024-12-16 17:36:28 +00:00
Paul Hammerton
e47b012f2c Banned and Restricted Announcement for December 16, 2024 2024-12-16 17:30:41 +00:00
Jetz
348447c82d Re-Fix IndexOutOfBoundsException, sans janky method chain 2024-12-16 10:44:07 -05:00
Remko van Wagensveld
f8ddb06e1d fix: Add Set Codes to Commander Pre Cons
This commit adds the set cons to the Commander Pre Cons so that they are correctly
sorted when grouping for Set.
2024-12-16 15:26:20 +01:00
tool4ever
c7afe3ce7a Some cleanup (#6696) 2024-12-16 11:27:00 +00:00
Chris H
420f862e90 This function wasn't tested. And it seems like it was written not to be maintainable. Reverting. 2024-12-15 20:35:23 -05:00
kevlahnota
5651a92d12 Merge pull request #6691 from kevlahnota/master2
fix arrows
2024-12-16 05:52:14 +08:00
Anthony Calosa
ada8e9b8c0 fix arrows 2024-12-16 05:51:04 +08:00
kevlahnota
5bbcab3da9 Update razorfield_ripper.txt
- closes #6688
2024-12-15 21:17:12 +08:00
kevlahnota
1b493b0a2b Merge pull request #6047 from Jetz72/code-cleanup
Migrate Guava Predicates and Functions to Java implementations
2024-12-15 08:51:39 +08:00
kevlahnota
01e1a8f4dd Merge pull request #6687 from kevlahnota/master2
clear bookmarks
2024-12-15 01:05:13 +08:00
Anthony Calosa
63bf2b1a3d clear bookmarks
- closes #6685
2024-12-15 00:53:03 +08:00
Paul Hammerton
19023a97ed Merge pull request #6686 from paulsnoops/fix-pio-rnk
Fix split cards in PIO draft rank file
2024-12-14 11:33:03 +00:00
Paul Hammerton
b7d6186fd1 Fix split cards in PIO draft rank file 2024-12-14 11:29:18 +00:00
Chris H
5c7fb36907 Need to use special slot for the cards to load in the edition properly (#6684) 2024-12-14 09:31:29 +03:00
Paul Hammerton
b208dc4498 Update draft rankings: FDN, PIO 2024-12-13 14:52:29 -05:00
Chris H
7be429dc36 Pioneer masters booster slots 2024-12-13 09:11:36 -05:00
Paul Hammerton
d8ea4b5e06 Merge pull request #6680 from Card-Forge/dsk-booster-fixes
Mark DSK dual lands as Land rarity
2024-12-13 11:01:50 +00:00
Chris H
91a7ef124d Mark DSK dual lands as Land rarity 2024-12-12 22:29:37 -05:00
Justin C
9aeef28bc3 Fix for Bloodbraid Challenger P/T (#6679) 2024-12-12 08:09:10 +01:00
Chris H
e854566425 Mark gainlands as L rarity in Foundations file (#6678) 2024-12-11 11:26:48 +01:00
Justin C
e8067d872d Removed unused variable. Some documentation fixes. (#6675) 2024-12-10 20:24:20 +03:00
Agetian
770f51e891 - Fix draft rankings not showing in Adventure Mode on the first pick of the draft. (#6674) 2024-12-09 22:08:58 +03:00
Jetz
5a3409a8fa unused import 2024-12-09 08:54:23 -05:00
Jetz
931e734bc0 Merge remote-tracking branch 'origin/master' into code-cleanup
# Conflicts:
#	forge-ai/src/main/java/forge/ai/ComputerUtil.java
#	forge-ai/src/main/java/forge/ai/ComputerUtilCard.java
#	forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java
#	forge-gui/src/main/java/forge/player/PlayerControllerHuman.java
2024-12-09 08:52:36 -05:00
Anthony Calosa
40ee86167b fix typo 2024-12-08 08:47:37 +08:00
Anthony Calosa
7482856dad prevent NPE on AdventureDeckEditor onClose event 2024-12-08 08:45:57 +08:00
Anthony Calosa
4698c2d014 prevent NPE 2024-12-08 08:34:49 +08:00
Paul Hammerton
4172256ded Merge pull request #6673 from paulsnoops/edition-updates
Edition updates: DCI, INR, PMEI, PRES
2024-12-07 12:08:06 +00:00
Paul Hammerton
303a3ebf58 Edition updates: DCI, INR, PMEI, PRES 2024-12-07 12:03:03 +00:00
tool4ever
a9c5839217 Refactor SpellAbilityView canPlay (#6671) 2024-12-06 19:58:52 +00:00
Justin C
6c1f4c7ffe Fix for noted types for Volo's journal (#6665) 2024-12-06 15:13:22 +01:00
Agetian
95e5b7afca Improve AI for First Responder, improve evaluation for self-sac abilities e.g. Sakura-Tribe Elder. (#6668) 2024-12-06 12:45:51 +01:00
Hans Mackowiak
9370e6fa61 Update remove-stale-branches.yml
Bump version
2024-12-06 05:46:16 +01:00
kevlahnota
ea244ec39b Update CardFaceSymbols.java
fix CR -> ColorlessHybrid
2024-12-06 06:03:10 +08:00
Hans Mackowiak
933ff78b64 Update osseous_sticktwister.txt
fix AI for now until my PR is ready
2024-12-05 16:04:05 +01:00
Jetz
6c10351d93 Merge remote-tracking branch 'origin/master' into code-cleanup
# Conflicts:
#	forge-ai/src/main/java/forge/ai/ability/PlayAi.java
#	forge-core/src/main/java/forge/util/collect/FCollection.java
#	forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java
2024-12-05 08:27:25 -05:00
Jetz
fa94754c91 Some Java 11 migrations 2024-12-05 08:05:17 -05:00
Anthony Calosa
13fbfe866e Merge remote-tracking branch 'origin/master' 2024-12-05 21:00:57 +08:00
Anthony Calosa
ebffb83932 prevent NPE on old skin/theme 2024-12-05 21:00:39 +08:00
tool4ever
45c9442330 Fix ConcurrentModificationException (#6664) 2024-12-05 13:15:46 +01:00
Anthony Calosa
b858b48fde remove Collections.synchronized 2024-12-05 16:39:10 +08:00
kevlahnota
d06673e401 Update FCollectionTest.java
prior to the threadsafeiterable restoration
2024-12-05 12:50:53 +08:00
kevlahnota
f637bd970b update check for ItemManagerConfig 2024-12-05 11:49:34 +08:00
kevlahnota
32ba304d11 Update AdventureDeckEditor.java
fix bulk sell menu appearing on other catalogpages
2024-12-05 11:32:45 +08:00
Paul Hammerton
6867a0eaba Merge pull request #6663 from paulsnoops/edition-updates
Edition updates: INR, PIO
2024-12-04 19:32:44 +00:00
Paul Hammerton
9c4333d608 Edition updates: INR, PIO 2024-12-04 19:28:51 +00:00
Agetian
32fc681726 - Add puzzle PS_FDN2. (#6662) 2024-12-04 21:18:18 +03:00
Anthony Calosa
8e16456b2e update comments 2024-12-04 22:12:22 +08:00
Anthony Calosa
36f0021cae revert threadsafeiterable 2024-12-04 22:04:29 +08:00
kevlahnota
a0cad5fa48 fix FCollection (#6657) 2024-12-04 14:45:05 +01:00
Jetz
db2764f1ce Fix Build Errors 2024-12-04 08:27:37 -05:00
Jetz
44cf7dbbea Merge remote-tracking branch 'origin/master' into code-cleanup
# Conflicts:
#	forge-ai/src/main/java/forge/ai/AiAttackController.java
#	forge-ai/src/main/java/forge/ai/AiCardMemory.java
#	forge-ai/src/main/java/forge/ai/AiController.java
#	forge-core/src/main/java/forge/card/ICardDatabase.java
#	forge-core/src/main/java/forge/item/generation/BoosterGenerator.java
#	forge-core/src/main/java/forge/util/FileSection.java
#	forge-core/src/main/java/forge/util/collect/FCollection.java
#	forge-game/src/main/java/forge/game/card/CardProperty.java
#	forge-game/src/main/java/forge/game/combat/Combat.java
#	forge-game/src/main/java/forge/game/spellability/SpellAbility.java
#	forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java
#	forge-gui-desktop/src/main/java/forge/screens/deckeditor/controllers/ACEditorBase.java
#	forge-gui-mobile/src/forge/itemmanager/ItemManager.java
#	forge-gui/src/main/java/forge/deck/DeckgenUtil.java
#	forge-gui/src/main/java/forge/gamemodes/limited/CardThemedDeckBuilder.java
2024-12-04 08:15:30 -05:00
Chris H
a337fd2aed Pay cost verbiage 2024-12-03 21:55:54 -05:00
Paul Hammerton
9fc971c2fb Merge pull request #6659 from paulsnoops/pio_formats
Add PIO to Explorer, Historic & Timeless formats
2024-12-03 09:38:39 +00:00
Paul Hammerton
22ed570cb9 Merge pull request #6658 from paulsnoops/edition-updates
Edition updates: PF25, PIO, PMEI
2024-12-03 09:34:34 +00:00
Paul Hammerton
14ef18ae96 Add PIO to Explorer, Historic & Timeless formats 2024-12-03 09:34:25 +00:00
Paul Hammerton
a94dc8d94f Edition updates: PF25, PIO, PMEI 2024-12-03 09:27:41 +00:00
tool4EvEr
e6deda205c Fully unlocked room traits should still be the same (for once per turn) 2024-12-03 06:30:16 +01:00
tool4ever
739a4ef0bd Fix RollDice (#6653) 2024-12-02 20:44:11 +00:00
tool4ever
560f660925 Update revitalizing_repast_old_growth_grove.txt 2024-12-02 12:51:51 +00:00
tool4ever
ecd2577770 Update embereth_veteran.txt 2024-12-02 12:50:50 +00:00
tool4ever
eb2a584f68 Update treetop_snarespinner.txt 2024-12-02 12:44:34 +00:00
tool4ever
b0fdd39371 Update touch_of_moonglove.txt 2024-12-02 12:43:51 +00:00
tool4ever
c88bdc2e1d Update protect_serve.txt 2024-12-02 12:42:14 +00:00
tool4ever
5008c519a1 Update pollen_shield_hare_hare_raising.txt 2024-12-02 12:28:19 +00:00
kevlahnota
b1c754499d Merge pull request #6651 from kevlahnota/master2
enable timeout on chooseSpellAbilityToPlayFromList
2024-12-02 10:13:17 +08:00
Anthony Calosa
d733b8933e enable timeout on chooseSpellAbilityToPlayFromList 2024-12-02 10:10:00 +08:00
kevlahnota
d1d14c196a Merge pull request #6650 from kevlahnota/master2
prevent crash on Android 11 and below
2024-12-02 09:55:46 +08:00
Anthony Calosa
e8a6d4ce92 prevent crash on Android 11 and below
Completablefuture -> completeOnTimeout
2024-12-02 09:44:29 +08:00
Hans Mackowiak
53541e8f5f Update remove-stale-branches.yml (#6645) 2024-12-01 08:54:58 +01:00
kevlahnota
23d0868e0a Merge pull request #6577 from Card-Forge/AI_ATTACK_TIMEOUT
AI Attack & getSpellAbilityToPlay Timeout
2024-12-01 13:12:24 +08:00
kevlahnota
c6c55a5a6a Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-12-01 12:12:31 +08:00
tool4ever
4fb110939a Update commander_liara_portyr.txt 2024-11-30 19:31:26 +00:00
tool4ever
947d19078b Fix cheating class level 3 by copying level 2 activation (#6643) 2024-11-29 12:22:23 +01:00
tool4ever
4b1ca2449c Update mana_drain.txt 2024-11-29 12:21:08 +01:00
Agetian
143e3c8c75 - Add new genetic decks for Standard and Modern as of November 2024. (#6647) 2024-11-29 13:13:11 +03:00
Ayora29
115276fa56 Update draftable edition sections (#6631)
* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix art index when parsing edition files sections
Add "scheme" section
Add fallback sheet in BoosterGenerator
Rewrite FileSection and Use LinkedHashMap for sections map

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Convert MKM to BoosterSlots

* Rename "RareMythic" section

* Remove conjured cards that do not have unique artwork.

* Restore basic land order

* Fixes

* parseSections : Fix Index out of bounds error for empty file

* FileSection.java : use for loop instead of do/while

---------

Co-authored-by: Agetian <stavdev@mail.ru>
2024-11-29 12:15:11 +03:00
Paul Hammerton
593af10942 Merge pull request #6644 from Agetian/lda-fdn
LDA update for current Standard & Modern formats
2024-11-28 23:23:03 +00:00
kevlahnota
486e8d37b5 Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-29 06:03:51 +08:00
kevlahnota
5b183f5a06 update check for internet
- closes #6640
2024-11-29 05:55:28 +08:00
tool4ever
ea8fb23e9b Update lunar_insight.txt 2024-11-28 21:01:19 +00:00
Agetian
a8caee3b10 Merge branch 'master' into lda-fdn 2024-11-28 21:29:12 +03:00
Agetian
4c87dce4e9 - Update LDA deckgen info for the current Standard and Modern formats. 2024-11-28 21:28:44 +03:00
Agetian
9878544b5a - Kayla's Reconstruction AI hint. (#6642) 2024-11-28 20:56:55 +03:00
Agetian
da46cf785e - Kayla's Reconstruction AI hint. 2024-11-28 20:56:16 +03:00
Myyk Seok
535f175864 Alphabetically sort MTGO Cubes so they are easier to find (#6201)
* chore: move files to be alphabetically sorted

* feat: make the alphabetically stored cube contents match the new file names

* fix: cube name typo in MTGO Legacy Cube 2017-01

---------

Co-authored-by: Agetian <stavdev@mail.ru>
2024-11-28 18:04:37 +03:00
Hans Mackowiak
ad3044133c Class level ai (#6641)
* ClassLevelAi: add first logic

* Update ClassLevelUpAi.java

Check for ClassLevelGained Trigger

* Update ClassLevelUpAi.java

~ fix import
2024-11-28 17:59:18 +03:00
kevlahnota
3971d53746 Update TextRenderer.java
fix symbol out of bounds
2024-11-28 20:00:17 +08:00
Paul Hammerton
1bee1a498f Merge pull request #6639 from paulsnoops/edition-updates
Edition updates: PIO, PMEI, SLD
2024-11-28 09:57:39 +00:00
Paul Hammerton
877fb992c5 Edition updates: PIO, PMEI, SLD 2024-11-28 09:54:10 +00:00
Paul Hammerton
2d80cbc54c Merge pull request #6638 from paulsnoops/fix-da1
Fix DA1 edition and related cards
2024-11-27 13:32:00 +00:00
Paul Hammerton
3f7f777be1 Fix DA1 edition and related cards 2024-11-27 13:26:05 +00:00
Paul Hammerton
7d374eaf62 Merge pull request #6637 from churrufli/netdecks271124
Net Decks Archive Updates
2024-11-27 12:22:51 +00:00
Churrufli
d7a93ac59c Net Decks Archive Updates (Standard, Modern, Legacy, Vintage, Pioneer, Pauper) 2024-11-27 11:45:46 +01:00
Northmoc
5aaf65e394 magar_of_the_magic_strings.txt bug fix (#6618)
* take3

* tweak
2024-11-27 12:18:42 +03:00
Northmoc
f76c665e45 UNF: eelectrocute.txt + support (#6616)
* UNF: eelectrocute.txt + support

* tweak

* tweak2
2024-11-26 21:14:52 +03:00
Anthony Calosa
c317d1fb8a Merge remote-tracking branch 'origin/AI_ATTACK_TIMEOUT' into AI_ATTACK_TIMEOUT 2024-11-26 05:48:57 +08:00
Anthony Calosa
e1d7c4a429 use Guava memoize 2024-11-26 05:48:21 +08:00
Paul Hammerton
239ad3734c Merge pull request #6614 from Northmoc/ydsk4
YDSK: harrowing_swarm.txt + support
2024-11-25 21:28:54 +00:00
Paul Hammerton
2e8a373378 Merge pull request #6632 from paulsnoops/edition-updates
Edition updates: PIO
2024-11-25 20:06:34 +00:00
Paul Hammerton
35173eb55e Edition updates: PIO 2024-11-25 20:01:28 +00:00
Paul Hammerton
979635a317 Merge pull request #6630 from paulsnoops/edition-updates
Edition updates: HHO
2024-11-25 16:30:23 +00:00
Paul Hammerton
3e26f859dc Edition updates: HHO 2024-11-25 16:27:39 +00:00
Agetian
cf8c206a73 - Add puzzle PS_FDN1. (#6629) 2024-11-25 19:12:12 +03:00
Paul Hammerton
e3e2429acb Play booster updates: FDN, MH3 2024-11-25 10:37:24 -05:00
Agetian
c3fd663b49 - Only mark Resizable as false on non-fullscreen setups, helps avoid corner cases when fullscreen fails on Linux (e.g. on multiple monitor setups) (#6627) 2024-11-25 18:32:19 +03:00
Hans Mackowiak
451f12826f Update SeekEffect.java
Fix
2024-11-25 15:31:27 +01:00
Hans Mackowiak
4b63fd8dc1 Update SeekEffect.java
Fix StringBuilder.isEmpty to length() != 0
2024-11-25 15:27:43 +01:00
kevlahnota
8fa1ce175f Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-25 20:46:07 +08:00
Anthony Calosa
08bab22a23 refactor lazy initialization 2024-11-25 20:45:05 +08:00
Hans Mackowiak
3c21054f8e Card: moved some getter/setter into a copyFrom 2024-11-25 12:35:08 +01:00
Hans Mackowiak
9170c64847 use CardState.getTypeWithChanges directly 2024-11-25 12:35:08 +01:00
Hans Mackowiak
87a16ea58c Card: copy getChangedCardTypes 2024-11-25 12:35:08 +01:00
Paul Hammerton
901c531964 Merge pull request #6626 from paulsnoops/edition-updates
Fix card name in DA1 edition
2024-11-25 09:56:37 +00:00
Paul Hammerton
b56e5e2029 Fix card name in DA1 edition 2024-11-25 09:53:50 +00:00
tool4ever
8c277983e5 Update reality_acid.txt 2024-11-25 08:34:23 +00:00
Hans Mackowiak
3e5a728646 Miracle: fix index 2024-11-24 19:43:37 +01:00
Chris H
78ad99ae6e Update snapshot automation (#6624)
* Update snapshots-pc.yml

* Update snapshots-android.yml

* Update snapshots-pc.yml
2024-11-24 11:01:51 -05:00
Agetian
85e3cef612 Revert "Update draftable edition sections (#6274)" (#6623)
This reverts commit 46f3f01450.
2024-11-24 16:48:01 +03:00
Ayora29
46f3f01450 Update draftable edition sections (#6274)
* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix art index when parsing edition files sections
Add "scheme" section
Add fallback sheet in BoosterGenerator
Rewrite FileSection and Use LinkedHashMap for sections map

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Fix edition txt files

* Convert MKM to BoosterSlots

* Rename "RareMythic" section

* Remove conjured cards that do not have unique artwork.

* Restore basic land order
2024-11-24 16:39:21 +03:00
tool4ever
c20898ecec Fix Offspring not triggering for AI (#6622) 2024-11-24 11:43:57 +00:00
Hans Mackowiak
870add0da4 ~fix line style in cardsfolder 2024-11-24 11:21:12 +01:00
Paul Hammerton
a39f541b8f Merge pull request #6610 from Northmoc/ydsk3
YDSK: valiant_emberkin.txt + support
2024-11-24 09:53:39 +00:00
Paul Hammerton
44d9b42c2b Merge pull request #6607 from Northmoc/ydsk
YDSK: gilded_ambusher.txt
2024-11-24 09:53:27 +00:00
Paul Hammerton
1924f2126d Merge pull request #6609 from Northmoc/ydsk2
YDSK: improvising_aerialist.txt + support
2024-11-24 09:50:42 +00:00
Paul Hammerton
baf7d5afaa Merge pull request #6615 from Northmoc/ydsk5
YDSK: lurker_in_the_deep.txt + support
2024-11-24 09:50:28 +00:00
Alexander Kim
e035af3389 Update ashroot_animist.txt (#6621) 2024-11-24 09:49:45 +00:00
Hans Mackowiak
212f14063e Miracle&Madness: use ManaCost instead of CardManaCost (#6606)
* Miracle&Madness: use ManaCost instead of CardManaCost
2024-11-24 10:46:07 +01:00
Paul Hammerton
a611930041 Update draft rankings: BLB, DSK, FDN, LCI, MH3, OTJ 2024-11-23 20:56:49 -05:00
Northmoc
30e82c6b25 ChooseCardNameEffect.getStackDescription small fixes 2024-11-23 20:55:47 -05:00
Northmoc
05d812d5c0 harrowing_swarm.txt param fix 2024-11-23 18:16:48 -05:00
Northmoc
6b3159273e harrowing_swarm.txt fixes 2024-11-23 17:21:47 -05:00
Northmoc
14ad887a0a YDSK: harrowing_swarm.txt + support 2024-11-23 17:21:24 -05:00
Northmoc
bd55cc330e tidy up CardProperty.cardHasProperty for Top/BottomLibrary 2024-11-23 16:14:12 -05:00
Northmoc
ac721780f7 YDSK: improvising_aerialist.txt + support 2024-11-23 15:57:19 -05:00
Chris H
4d21db94f9 Update remove-stale-branches.yml 2024-11-23 19:55:22 +01:00
Northmoc
2905c742a8 YDSK: lurker_in_the_deep.txt + support 2024-11-23 13:29:29 -05:00
Anthony Calosa
8fa95a01ae update arrows 2024-11-23 19:32:03 +08:00
Anthony Calosa
b0411423f6 use Executor, update MatchScreen 2024-11-23 13:22:41 +08:00
Northmoc
14291e6a4f YDSK: valiant_emberkin.txt + support 2024-11-22 19:36:00 -05:00
Northmoc
8efa2234d5 YDSK: gilded_ambusher.txt 2024-11-22 17:01:04 -05:00
Anthony Calosa
0b9fb9f379 Merge remote-tracking branch 'origin/AI_ATTACK_TIMEOUT' into AI_ATTACK_TIMEOUT 2024-11-22 19:13:37 +08:00
Anthony Calosa
78e587b32b handle exception 2024-11-22 19:13:15 +08:00
kevlahnota
8486dbbd02 Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-22 16:08:21 +08:00
Anthony Calosa
69fef79105 refactor timeout 2024-11-22 16:06:37 +08:00
kevlahnota
2a499d7390 Merge pull request #6605 from kevlahnota/master2
Fix crash on Splashscreen
2024-11-22 15:55:31 +08:00
Anthony Calosa
66045c0c0a .. 2024-11-22 15:45:44 +08:00
Anthony Calosa
7c3354cf70 Merge remote-tracking branch 'origin/AI_ATTACK_TIMEOUT' into AI_ATTACK_TIMEOUT 2024-11-22 12:46:26 +08:00
kevlahnota
f918ae5978 Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-22 12:46:13 +08:00
Anthony Calosa
afb062e770 revert ManaPool
remove ManaPoolTest for concurrency
refactor timeout for chooseSpellAbilityToPlayFromList
2024-11-22 12:44:51 +08:00
kevlahnota
c773e39b52 Merge pull request #6602 from Card-Forge/kevlahnota-patch-2
prevent NPE
2024-11-22 11:57:14 +08:00
Chris H
03b87003ef Update remove-stale-branches.yml 2024-11-21 22:28:13 -05:00
Chris H
4436a83cc5 Update remove-stale-branches.yml 2024-11-21 22:28:13 -05:00
Chris H
2bf67e931e Update remove-stale-branches.yml 2024-11-21 22:16:18 -05:00
kevlahnota
f01d03e706 Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-22 06:13:37 +08:00
kevlahnota
29ce2e01fd Update ImageView.java 2024-11-22 06:04:25 +08:00
kevlahnota
6f59c0d2ce prevent NPE 2024-11-22 05:58:49 +08:00
tool4ever
5fa9f5b50e Fix Kentaro (#6600) 2024-11-21 16:58:13 +00:00
Anthony Calosa
3d42da96d4 add persistentmana check 2024-11-21 16:10:20 +08:00
Anthony Calosa
259247c842 update ManaMultiMap clear
update ManaPoolTest
2024-11-21 14:37:32 +08:00
Anthony Calosa
dda5afe704 refactor ManaPool
move custom multimap implementation for floating mana since this only covers small section
2024-11-21 13:33:52 +08:00
kevlahnota
27740be1cd Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-21 13:03:58 +08:00
Chris H
0bc4e5d7b9 Restore flatten and version for now 2024-11-20 20:48:21 -05:00
GitHub Actions
c95afd86d8 [maven-release-plugin] prepare for next development iteration 2024-11-20 20:48:21 -05:00
GitHub Actions
ac37ee1947 [maven-release-plugin] prepare release forge-2.0.00 2024-11-20 20:48:21 -05:00
Chris H
0553eb58ef Temporarily remove flatten to get a release out 2024-11-20 20:48:21 -05:00
Anthony Calosa
e23b3b90b4 Merge remote-tracking branch 'origin/AI_ATTACK_TIMEOUT' into AI_ATTACK_TIMEOUT 2024-11-20 22:02:43 +08:00
Anthony Calosa
81777761f5 add ManaPoolTest 2024-11-20 22:02:25 +08:00
kevlahnota
12ae996190 Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-19 22:42:20 +08:00
Anthony Calosa
065f6b9273 Merge remote-tracking branch 'origin/AI_ATTACK_TIMEOUT' into AI_ATTACK_TIMEOUT 2024-11-19 22:33:07 +08:00
Anthony Calosa
0854fbb947 update FCollection
Replace copyonwritearray to a custom implementation for concurrent modification exception. A little bit slower but supports iterator operations.
Added FCollectionTest
2024-11-19 22:32:37 +08:00
Hans Mackowiak
d165aba624 Update tyvar_the_pummeler.txt
Closes #6594
2024-11-19 11:37:22 +01:00
kevlahnota
39fc1415aa Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-19 05:49:27 +08:00
Chris H
0cfc7c2545 Update snapshot-both-pc-android.yml 2024-11-18 15:11:58 -05:00
kevlahnota
6d49bc7e53 Merge pull request #6593 from kevlahnota/master2
fix layout params
2024-11-18 16:28:22 +08:00
Anthony Calosa
fdfabfd5cf fix layout 2024-11-18 15:55:52 +08:00
kevlahnota
974e8b0760 update xstream, netty
fix dependabot vulnerability
2024-11-18 15:17:38 +08:00
kevlahnota
cbe48d0892 Update VPlayerPanel.java
should display error for null icons on VPlayerPanel Infotab. If pointer is still null then the icon seems to be disposed (probably on android) or just deliberately missing.
2024-11-18 15:09:10 +08:00
0nderzeeboot
8d230c774c Update cephalid_inkmage.txt (#6590)
Fixed wrong condition for threshold check.
2024-11-18 09:36:57 +03:00
kevlahnota
b9ac48e861 Merge pull request #6592 from kevlahnota/master2
set navigation bar color
2024-11-18 12:43:12 +08:00
Anthony Calosa
a1d1e2b335 set navigation bar color
add note to edge-to-edge enforcement on android 15
2024-11-18 12:41:58 +08:00
kevlahnota
a6f1b3ac02 Merge pull request #6591 from kevlahnota/master2
try to prevent Splashscreen crash on Linux
2024-11-18 11:28:55 +08:00
Anthony Calosa
f48cf951db .. 2024-11-18 11:23:00 +08:00
0nderzeeboot
9093c77e72 Update arahbo_the_first_fang.txt (#6589) 2024-11-17 23:44:00 +00:00
kevlahnota
f5e024bf63 Update ItemManager.java
it seems this is controlled via preference and would fail the logic for the view index
2024-11-18 06:11:42 +08:00
kevlahnota
b8a2903617 NPE prevention
- closes #6588
2024-11-18 05:11:48 +08:00
Chris H
24182e337a Update rune_sealed_wall.txt (#6587) 2024-11-17 21:02:06 +00:00
Hans Mackowiak
73940c584e ColorSet: use Stream to map ManaSymbol 2024-11-17 10:48:27 +01:00
kevlahnota
c9e733ecbd Update ImageView.java
isempty missing in streambuffer on android
2024-11-17 14:26:08 +08:00
kevlahnota
f6d4e322a8 Merge pull request #6583 from kevlahnota/master2
try to optout on Edge-to-Edge for android 15
2024-11-17 12:16:16 +08:00
Anthony Calosa
cca1468a85 try to optout on Edge-to-Edge for android 15 2024-11-17 12:12:58 +08:00
kevlahnota
c603bfb818 try to use immersive mode on android 13 and above 2024-11-17 11:07:44 +08:00
Anthony Calosa
619130b519 remove unused import 2024-11-17 08:07:07 +08:00
Anthony Calosa
5dc84a68c4 remove threadsafeIterable
The original purpose which is to create a copy of linkedlist to iterate to avoid concurrent modification, but we use copyonwritearray design and it is already thread safe and iteration while modification is handled internally.
2024-11-17 08:00:29 +08:00
kevlahnota
f6d2d420bb use anymatch 2024-11-17 07:14:33 +08:00
kevlahnota
6c847e00a2 refactor AiCardMemory 2024-11-17 06:49:50 +08:00
kevlahnota
f72ab6f22a use removeall
the fcollection will check if removing from set is successful, it will also remove the element from the list
2024-11-17 00:45:27 +08:00
kevlahnota
12613328fe Update PlayEffect.java 2024-11-17 00:37:22 +08:00
kevlahnota
54266e8914 Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-16 20:27:05 +08:00
Anthony Calosa
f46e22cc54 minor cleanup 2024-11-16 20:13:17 +08:00
kevlahnota
cb645670d4 Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-16 19:50:55 +08:00
Anthony Calosa
5597d0bf31 fix arrows drawing out of bounds 2024-11-16 19:50:09 +08:00
kevlahnota
0247acbd49 Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-16 18:52:12 +08:00
Anthony Calosa
95e3304948 add coloridversion check 2024-11-16 18:24:22 +08:00
kevlahnota
5ebaeacb92 Merge pull request #6570 from Card-Forge/CrypticSpire
add support for Cryptic Spire
2024-11-16 17:18:43 +08:00
kevlahnota
b5f96ab8e2 Merge branch 'master' into CrypticSpire 2024-11-16 17:14:51 +08:00
kevlahnota
acfde12ca2 Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-16 12:19:32 +08:00
kevlahnota
c11ca5d3fb Remove input check upload on android snapshot workflow
Don't know why this input is needed but it seems it's not taken into account even with default value to true when the cron job triggers, we have already test build workflow for android apk along with debug signing for checking if build and signing succeeded. Check discord reports on missing/cannot update reports.
2024-11-16 09:39:28 +08:00
Anthony Calosa
cf84ae5719 fix NoSuchElementException 2024-11-16 08:33:45 +08:00
kevlahnota
a53dc4ef85 Update snapshots-android.yml
add missing version.txt
2024-11-16 06:49:36 +08:00
Anthony Calosa
548f97ae36 dumb check for AI 2024-11-15 21:56:15 +08:00
Anthony Calosa
7c35968dfd try to fix ConcurrentModificationException on FCollection -> addAll
cause: tapped.addAll(tappedForMana) on AiCardMemory
2024-11-15 21:19:15 +08:00
Anthony Calosa
5c46048394 removed unused import 2024-11-15 20:44:02 +08:00
Anthony Calosa
f52b7abe61 create ConcurrentMultiMap, remove unused map 2024-11-15 20:24:20 +08:00
kevlahnota
d9c4c818b5 Merge branch 'master' into AI_ATTACK_TIMEOUT 2024-11-15 16:53:04 +08:00
kevlahnota
4b13e55d83 fix infinite notice for missing tokens 2024-11-15 16:26:05 +08:00
tool4ever
bd18600385 Fix DontPayTapCostWithManaSources (#6578)
* Fix DontPayTapCostWithManaSources

* Foundations Update Bulletin (engine)

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2024-11-15 09:01:08 +03:00
kevlahnota
b9a56f04e3 revert multimap, needs better implementation for this 2024-11-15 13:40:27 +08:00
kevlahnota
a094149ce0 remove redundant check for can cast timing 2024-11-15 12:40:14 +08:00
kevlahnota
4936fd3950 remove comment, seems it works fine. need to test on android. 2024-11-15 12:38:00 +08:00
kevlahnota
fc85623343 better to use a linkedqueue 2024-11-15 11:51:26 +08:00
kevlahnota
8a1d25e4e9 fix failing test 2024-11-15 11:46:20 +08:00
kevlahnota
a988261377 check for stack only 2024-11-15 11:19:52 +08:00
kevlahnota
37eed29ad2 try this multimap for manapool 2024-11-15 11:08:17 +08:00
kevlahnota
dcd4fac927 update desktop logic 2024-11-15 09:51:04 +08:00
Anthony Calosa
66c08ab58b try to fix unsupportedoperation 2024-11-15 06:54:22 +08:00
Anthony Calosa
8dbb648638 add user setting for AI Timeout 2024-11-14 22:06:23 +08:00
Anthony Calosa
e2c37d11e7 AI Attack Timeout 2024-11-14 19:11:25 +08:00
tool4ever
ac96890f44 Some fixes (#6575) 2024-11-14 09:34:05 +00:00
kevlahnota
919832cc06 Update pom.xml
remove duplicate plugin
2024-11-14 16:11:14 +08:00
kevlahnota
e0d8b24412 Update ItemManagerConfig.java
use adventure default columns
2024-11-14 15:52:18 +08:00
kevlahnota
4ed7cb30d8 Update SColumnUtil.java
add adventure default columns
2024-11-14 15:51:11 +08:00
kevlahnota
88ca1d509f Update VAssignGenericAmount.java
support double tapping the mana symbols for max amount
2024-11-14 15:28:43 +08:00
Hans Mackowiak
8021520692 moved GameEventCardForetold and GameEventCardPlotted to GameLogFormatter 2024-11-14 07:09:21 +01:00
kevlahnota
9504705cd1 Merge pull request #6576 from Card-Forge/kevlahnota-patch-1
Update snapshots-android.yml
2024-11-14 13:07:08 +08:00
kevlahnota
bf24813aa7 update local-dir 2024-11-14 11:59:14 +08:00
kevlahnota
4248d1930e Update snapshots-android.yml 2024-11-14 11:54:34 +08:00
Anthony Calosa
58e4b7e2df Merge remote-tracking branch 'origin/CrypticSpire' into CrypticSpire 2024-11-14 10:31:11 +08:00
Anthony Calosa
b161502595 update setting colorID 2024-11-14 10:30:33 +08:00
kevlahnota
65c74b2009 Merge branch 'master' into CrypticSpire 2024-11-14 09:05:37 +08:00
Anthony Calosa
8d9dabf7d7 remove uncommited changes 2024-11-14 06:06:26 +08:00
Anthony Calosa
60cfd97162 remove unused imports 2024-11-14 06:02:38 +08:00
Anthony Calosa
71ecf91bb5 from list to set 2024-11-14 06:00:02 +08:00
Anthony Calosa
85913a3d6c load from deck 2024-11-13 23:42:08 +08:00
Jetz
c347ff5810 Merge remote-tracking branch 'origin/master' into code-cleanup
# Conflicts:
#	forge-core/src/main/java/forge/StaticData.java
2024-11-13 09:20:00 -05:00
Jetz
e879abca85 Merge remote-tracking branch 'origin/master' into code-cleanup 2024-11-13 09:17:45 -05:00
Jetz
d81c5a40cf Revert .toList() for Android compatibility 2024-11-13 09:17:33 -05:00
Anthony Calosa
88613c555a refactor some vars, and save to deck file
todo validate
2024-11-13 22:13:18 +08:00
Paul Hammerton
319a00d59e Alchemy Rebalancing for November 12, 2024 (#6568) 2024-11-13 14:20:32 +01:00
Anthony Calosa
4012469910 refactor var name 2024-11-13 19:12:34 +08:00
Hans Mackowiak
af545d69da Update nazar_the_velvet_fang.txt
Closes #6565
2024-11-13 09:45:07 +01:00
Hans Mackowiak
ea3806d7b6 Update lunar_insight.txt
Closes #6572
2024-11-13 09:43:56 +01:00
Anthony Calosa
f7dfdea361 update clone and copy effect 2024-11-13 14:13:16 +08:00
Anthony Calosa
f814292de7 update comment 2024-11-13 13:45:09 +08:00
Anthony Calosa
8fd521b949 update desktop editor 2024-11-13 13:43:47 +08:00
Agetian
93fd2dcf1c Attempt to fix Warlord's Elite AI payment (#6560)
* - Attempt to fix Warlord's Elite AI payment.

* - Add the workaround AI hint for now.
2024-11-13 07:48:27 +03:00
Anthony Calosa
31abd61a3f fix render for ImageView 2024-11-13 11:10:27 +08:00
Anthony Calosa
5afaff814a update deck editor for spire 2024-11-13 10:29:18 +08:00
kevlahnota
82555babd8 Update StaticData.java
remove concurrency for token audit
2024-11-12 22:48:15 +08:00
Anthony Calosa
65c5985281 add TODO 2024-11-12 22:14:11 +08:00
kevlahnota
38b098e5a4 Update AndroidRKeyboardHeightProvider.java 2024-11-12 21:28:53 +08:00
Anthony Calosa
eaab0bdd7d fix Cryptic Spire 2024-11-12 21:21:49 +08:00
Alexander Kim
fb0e147726 Update urdnan_dromoka_warrior.txt
Removed the "Flying" keyword from Urdnan, Dromoka Warrior; this keyword does not seem to appear on the card (source: https://scryfall.com/card/j25/34/urdnan-dromoka-warrior).
2024-11-12 09:26:21 +01:00
Paul Hammerton
334790846a Merge pull request #6567 from paulsnoops/bar_12_nov
Banned and Restricted Announcement for November 12, 2024
2024-11-11 19:19:12 +00:00
Paul Hammerton
2e4f2836f4 Banned and Restricted Announcement for November 12, 2024 2024-11-11 19:13:59 +00:00
kevlahnota
d7fd20ec5f add note 2024-11-11 23:49:26 +08:00
kevlahnota
1dc5c582f8 Merge pull request #6564 from kevlahnota/master2
Support older Android
2024-11-11 23:42:41 +08:00
Anthony Calosa
71480e63df Support older Android
- missing toList from stream
2024-11-11 23:36:54 +08:00
kevlahnota
cc346ca600 Merge pull request #6563 from kevlahnota/master2
update auditer
2024-11-11 21:41:03 +08:00
Anthony Calosa
2e9c685f26 Merge branch 'master' into master2 2024-11-11 20:17:04 +08:00
Anthony Calosa
cb2ddf39f8 update auditer 2024-11-11 17:00:04 +08:00
Agetian
365d9b995c - Added puzzle PS_DSK4. (#6561) 2024-11-10 20:40:05 +03:00
Chris H
9435ca6edc Create remove-stale-branches.yml 2024-11-10 08:53:06 -05:00
Chris H
bc3c847332 Remove cron from double snapshots 2024-11-09 19:06:42 -05:00
Paul Hammerton
1fd6da4813 Merge pull request #6552 from paulsnoops/edition-updates
Edition updates: PMEI, SLD
2024-11-09 10:23:04 +00:00
Paul Hammerton
7a4fc4ddd2 Edition updates: PMEI, SLD 2024-11-09 10:19:34 +00:00
kevlahnota
c25746b6c4 Merge pull request #6550 from kevlahnota/master2
update watermark
2024-11-09 10:36:05 +08:00
Anthony Calosa
b130f45fe1 update watermark
- show watermark on catalogpage only
2024-11-09 10:17:40 +08:00
Jetz
2b5fc37232 Remove unused imports 2024-11-08 20:02:02 -05:00
Jetz
c6ad1226b0 Guava migration - Swap in StreamUtil.stream 2024-11-08 19:49:03 -05:00
Jetz
6b7ac1ebef Guava migration - Use Arrays.stream() 2024-11-08 19:34:02 -05:00
Jetz
4bbc165460 Guava migration - Use .toList() 2024-11-08 19:33:45 -05:00
kevlahnota
05b18b34aa Merge pull request #6549 from kevlahnota/master2
fix SealedScreen
2024-11-09 08:24:52 +08:00
Jetz
7bb8ccd022 Remove unused imports 2024-11-08 19:23:28 -05:00
Jetz
c9ba926f45 Guava migration - Replace .negate() with Predicate.not(...) in compound predicates. 2024-11-08 19:21:25 -05:00
Anthony Calosa
ac15b32f32 fix SealedScreen
bind directly the back button to open the LoadSealedScreen on Sealed Editor
2024-11-09 08:21:19 +08:00
Jetz
903d636f52 Merge remote-tracking branch 'origin/code-cleanup' into code-cleanup 2024-11-08 18:41:17 -05:00
Jetz
d6c8e9a692 Merge remote-tracking branch 'origin/master' into code-cleanup
# Conflicts:
#	forge-ai/src/main/java/forge/ai/ability/ChooseCardAi.java
#	forge-ai/src/main/java/forge/ai/ability/ScryAi.java
#	forge-core/src/main/java/forge/card/DeckHints.java
#	forge-core/src/main/java/forge/util/TextUtil.java
#	forge-gui-mobile/src/forge/itemmanager/ItemManager.java
#	forge-gui/src/main/java/forge/download/AutoUpdater.java
#	forge-gui/src/main/java/forge/player/HumanCostDecision.java
2024-11-08 18:37:02 -05:00
kevlahnota
f47870a698 Update CCombat.java
- closes #6548
2024-11-09 06:34:47 +08:00
Agetian
98611a24b7 AI for Evolved Sleeper (#6547) 2024-11-08 15:10:14 +00:00
Agetian
ee43570ad9 - Add FDN planeswalker achievement by Marek. (#6546) 2024-11-08 08:07:13 +03:00
Simisays
73c3dd3def Jumpstart 2025 format + new dragon hero sprite + better avatars (#6544)
* update

* Update blocks.txt

* cleanup
2024-11-08 07:17:24 +03:00
kevlahnota
b400e612b4 Merge pull request #6545 from kevlahnota/master2
fix room choicelist render
2024-11-08 10:39:23 +08:00
Anthony Calosa
e9e14360f7 fix room choicelist render 2024-11-08 10:31:15 +08:00
Sagar
9d2c85f4ee Add back to top button to Wiki (#6427)
* Revamp Readme for more appealing

* revert back to top button only
2024-11-07 12:31:46 -05:00
kevlahnota
beb658ae99 Update electroduplicate.txt
- closes #6543
2024-11-07 14:57:43 +08:00
kevlahnota
216e3df533 Merge pull request #6542 from kevlahnota/master2
add confirm to autoSell, update ImageView
2024-11-07 14:23:59 +08:00
Anthony Calosa
4abcb0959a Merge branch 'master' into master2 2024-11-07 14:02:17 +08:00
Anthony Calosa
2ada458bf5 update filter description, add prompt option 2024-11-07 13:46:08 +08:00
Anthony Calosa
66e64995e3 add confirm dialog to autosell 2024-11-07 11:51:06 +08:00
Anthony Calosa
95ca1673b8 update ImageView
show NoSell overlay
2024-11-07 10:34:34 +08:00
kevlahnota
cd4b2a02e5 Merge pull request #6541 from kevlahnota/master2
fix sellAll
2024-11-06 23:24:58 +08:00
Anthony Calosa
7f7248f825 fix sellAll 2024-11-06 23:24:01 +08:00
Paul Hammerton
e7e5f4d9a7 Merge pull request #6540 from paulsnoops/master
Edition updates: FDN, J25, PLG24, PMEI
2024-11-06 13:41:45 +00:00
kevlahnota
9db592b10a Merge pull request #6539 from kevlahnota/master2
prevent townPriceModifier NPE
2024-11-06 21:35:00 +08:00
Anthony Calosa
a8bc8d42e1 format 2024-11-06 21:30:43 +08:00
Paul Hammerton
eed723bde2 Edition updates: FDN, J25, PLG24, PMEI 2024-11-06 13:30:37 +00:00
Anthony Calosa
6b31d101db prevent townPriceModifier NPE 2024-11-06 21:29:38 +08:00
kevlahnota
a140570752 Merge pull request #6538 from kevlahnota/master2
update adventure store/event preview filters
2024-11-06 20:15:50 +08:00
Anthony Calosa
e16468ad84 Merge branch 'master' into master2 2024-11-06 20:11:45 +08:00
Anthony Calosa
d85d00fbfb include ADVENTURE_SIDEBOARD config 2024-11-06 20:11:06 +08:00
Anthony Calosa
07d653d99b update adventure store/event preview filters 2024-11-06 19:47:33 +08:00
kevlahnota
307cf5a908 Merge pull request #6537 from kevlahnota/master2
update format filters for Adventure Deck Editor
2024-11-06 13:26:42 +08:00
Anthony Calosa
13eef9434f update filters 2024-11-06 13:14:22 +08:00
Anthony Calosa
0a3d2202c0 update item manager 2024-11-06 12:31:13 +08:00
Anthony Calosa
026913eebe Merge branch 'master' into master2
# Conflicts:
#	forge-gui-mobile/src/forge/adventure/scene/AdventureDeckEditor.java
2024-11-06 10:53:31 +08:00
kevlahnota
e59368422e update translation, remove duplicate single quote 2024-11-05 21:33:47 -05:00
Chris H
9f07bc9a98 Return false instead of throw if an illegal draft choice is made 2024-11-05 21:33:47 -05:00
Anthony Calosa
eb3b620858 update adventure editor default itemConfig 2024-11-06 06:10:22 +08:00
Anthony Calosa
a242f1fe04 update format filters for Adventure Deck Editor
use FormatFilter to filter Collections, AutoSell and NoSell cards
2024-11-05 22:56:47 +08:00
Paul Hammerton
fe52690f17 Merge pull request #6536 from paulsnoops/fix-fdn-edition
Fix FDN edition for boosters
2024-11-05 10:31:55 +00:00
Paul Hammerton
fa63d99d05 Fix FDN edition for boosters 2024-11-05 10:23:23 +00:00
Paul Hammerton
bb2b73d66f Merge pull request #6535 from paulsnoops/edition-updates
Edition updates: FDN
2024-11-05 09:39:41 +00:00
Paul Hammerton
d189a03550 Edition updates: FDN 2024-11-05 09:34:33 +00:00
Hans Mackowiak
a037532cb6 Merge pull request #6533 from Card-Forge/fdn-new-release
Fdn edition stuff
2024-11-05 09:51:58 +01:00
kevlahnota
e9ad6ef63e Merge pull request #6534 from kevlahnota/master2
reuse headerLabel as marker for loot
2024-11-05 15:49:05 +08:00
Anthony Calosa
46c502942b Merge branch 'master' into master2 2024-11-05 15:41:25 +08:00
Anthony Calosa
5d057837ff reuse headerLabel as marker for loot 2024-11-05 15:32:30 +08:00
Chris H
a71f57de3a Foundations new set things 2024-11-04 22:11:42 -05:00
Chris H
0e5303b84e Migrate upcoming 2024-11-04 21:39:55 -05:00
Paul Hammerton
bc6d78c376 Merge pull request #6511 from paulsnoops/combine-ue-into-da1
Combine Unknown Event editions into DA1
2024-11-04 19:01:16 +00:00
kevlahnota
fde2cd4538 Merge pull request #6529 from Card-Forge/kevlahnota-patch-1
Update QuestDataIO.java
2024-11-04 19:59:18 +08:00
tool4ever
41a3b24aef Fix Windfall (#6530) 2024-11-04 11:27:51 +01:00
kevlahnota
d8b86eb606 Update QuestDataIO.java
add EnumMap converter
2024-11-04 12:30:52 +08:00
tool4ever
fe259dafd2 Update fleeting_reflection.txt
Closes #6525
2024-11-03 15:46:11 +00:00
kevlahnota
fc1ba62078 Merge pull request #6523 from kevlahnota/master2
refactor HeroListData, update CoverScreen
2024-11-03 21:29:06 +08:00
Anthony Calosa
87d242028f refactor HeroListData, update CoverScreen
- remove redundant autosave
2024-11-03 21:24:20 +08:00
tool4ever
3e49ec6c88 Fix unattach logic (#6522) 2024-11-03 09:14:17 +00:00
Michael Lo
ecce3ab139 Add info about plotted cards into the game log (#6516) 2024-11-03 08:55:56 +00:00
Paul Hammerton
4fd6b3eff5 Merge pull request #6521 from paulsnoops/fdn-formats
Format updates for FDN & J25
2024-11-03 08:27:28 +00:00
Paul Hammerton
fb4dd87339 fdc_leg_vin 2024-11-03 08:23:58 +00:00
Paul Hammerton
c050d04881 j25_historic 2024-11-03 08:21:54 +00:00
Paul Hammerton
2a9960ca2b Add FDN & J25 to formats 2024-11-03 08:18:32 +00:00
kevlahnota
b179366bdd Merge pull request #6520 from kevlahnota/master2
update VCardDisplayArea, VZoneDisplay
2024-11-03 15:40:05 +08:00
Anthony Calosa
2d85fd845e update teleport animation 2024-11-03 15:27:30 +08:00
Anthony Calosa
5e326ef91a Merge branch 'master' into master2 2024-11-03 13:22:57 +08:00
Anthony Calosa
74f9d05b08 update NPE prevention 2024-11-03 12:14:43 +08:00
Anthony Calosa
4a1bbdc3ba update VZoneDisplay 2024-11-03 10:15:29 +08:00
Anthony Calosa
0ddf5b25d7 refactor VCardDisplayArea, prevent NPE 2024-11-03 10:07:14 +08:00
Chris H
2e7d4e3848 Return false instead of throw if an illegal draft choice is made 2024-11-02 21:57:37 -04:00
kevlahnota
09a1e6ecaf Merge pull request #6517 from kevlahnota/master2
add missing translation, minor speedup generating map
2024-11-03 06:27:51 +08:00
Anthony Calosa
68a5cb6c82 Merge branch 'master' into master2 2024-11-03 06:10:58 +08:00
Anthony Calosa
b01a155aa1 add missing 2024-11-03 06:04:45 +08:00
Fulgur14
9a7a8d7719 Update slinza_the_spiked_stampede.txt (#6515) 2024-11-02 22:01:56 +00:00
Anthony Calosa
c6aecafe6b add missing translation, minor speedup generating map 2024-11-03 05:58:28 +08:00
Agetian
343f09157d - Improve AI for Scry when X payment is necessary. (#6506) 2024-11-02 17:52:57 +03:00
Paul Hammerton
bdcf8ecb87 Merge pull request #6512 from paulsnoops/fix-strix-lookout
Fix Strix Lookout
2024-11-02 12:00:38 +00:00
Paul Hammerton
5ab34cf068 Combine Unknown Event editions into DA1 2024-11-02 11:59:45 +00:00
Paul Hammerton
ac935b92f6 Fix Strix Lookout 2024-11-02 11:55:27 +00:00
kevlahnota
6a12c12473 Merge pull request #6510 from kevlahnota/master2
fix newgame/newgame plus entering spawn point
2024-11-02 19:50:00 +08:00
Anthony Calosa
fa74a3b01c fix newgame/newgame plus entering spawn point 2024-11-02 19:45:01 +08:00
Paul Hammerton
58aacb07a8 Merge pull request #6509 from paulsnoops/edition-updates
Edition updates: FDN
2024-11-02 10:20:12 +00:00
Paul Hammerton
db940973c3 Edition updates: FDN 2024-11-02 10:15:46 +00:00
Fulgur14
9017c82f3e Final baker's dozen of FDN cards (#6507) 2024-11-02 08:31:41 +00:00
kevlahnota
6e961ac64e Merge pull request #6508 from kevlahnota/master2
fix infinite collision on Worldstage
2024-11-02 15:15:33 +08:00
Anthony Calosa
55d945857a fix format 2024-11-02 14:23:29 +08:00
Anthony Calosa
660a16a772 fix infinite collision on Worldstage
- closes #6485
2024-11-02 14:20:36 +08:00
Eli
396163a3de Added script text for Squad Rallier and Stab cards. (#6503)
* Added script text for Squad Rallier and Stab cards.

* Corrected script on Squad Rallier card; removed pump.
2024-11-02 07:22:17 +03:00
kevlahnota
097573d62d Merge pull request #6504 from kevlahnota/master2
move key indicators
2024-11-02 11:12:36 +08:00
Anthony Calosa
8d9f17fbac move key indicators 2024-11-02 11:08:30 +08:00
Fulgur14
a07db9168b Another dozen of FDN cards, nearing the end (#6502) 2024-11-01 21:16:47 +00:00
Paul Hammerton
aafa3a9b9f Merge pull request #6501 from paulsnoops/fix-hungry-ghoul
Fix Hungry Ghoul
2024-11-01 17:48:56 +00:00
Paul Hammerton
670c34a2c2 Fix Hungry Ghoul 2024-11-01 17:45:12 +00:00
Paul Hammerton
24b7373888 Merge pull request #6500 from paulsnoops/edition-updates
Edition updates: FDN, J25, PLTC
2024-11-01 17:34:03 +00:00
Paul Hammerton
6f344b729a Edition updates: FDN, J25, PLTC 2024-11-01 17:30:50 +00:00
Chris H
473a65f9ba Fix crash when a player dies with a card on the stack 2024-11-01 12:44:47 -04:00
Paul Hammerton
7a91e18e2d Merge pull request #6496 from Fulgur14/Fulgur14-patch-887518
Another fresh dozen of FDN cards
2024-11-01 10:49:56 +00:00
Paul Hammerton
b0f6484cbe Merge pull request #6497 from Fulgur14/Fulgur14-patch-946255
Four more FDN cards
2024-11-01 10:48:34 +00:00
Fulgur14
0a1cced6d7 Four more FDN cards 2024-11-01 10:47:59 +01:00
Fulgur14
826c631bd8 Another fresh dozen of FDN cards 2024-11-01 09:26:27 +01:00
tool4ever
28ff42c0a2 Update woodland_liege.txt 2024-11-01 06:42:19 +00:00
kevlahnota
0c676e8927 Merge pull request #6488 from kevlahnota/master2
increase allowance for update
2024-11-01 08:58:43 +08:00
Anthony Calosa
7f16956942 increase allowance for update 2024-11-01 08:57:49 +08:00
kevlahnota
0cb495d65a Merge pull request #6487 from kevlahnota/master2
prevent NPE
2024-11-01 08:36:21 +08:00
Anthony Calosa
e227fb8237 Merge branch 'master' into master2 2024-11-01 08:23:35 +08:00
Anthony Calosa
ce1d4b6a58 update date check, fix version String 2024-11-01 08:17:11 +08:00
Anthony Calosa
43912cbbb2 prevent NPE 2024-11-01 06:52:18 +08:00
BigCrunch22
dded9a56e6 Update Oracle text of some cards (#6479) 2024-10-31 20:23:53 +00:00
tool4ever
6ae0862b0d Goodbye mandatory suspend casting (#6483)
* Fix Divine Resilience
2024-10-31 20:20:08 +00:00
Paul Hammerton
e849999b51 Merge pull request #6486 from paulsnoops/soulstone-sanctuary-fix
Fix Soulstone Sanctuary name
2024-10-31 18:27:56 +00:00
Paul Hammerton
c7bd807714 Fix Soulstone Sanctuary name 2024-10-31 18:24:14 +00:00
Paul Hammerton
0f6cf76aa1 Merge pull request #6484 from paulsnoops/edition-updates
Edition updates: FDN, J25, SPG
2024-10-31 17:36:23 +00:00
Paul Hammerton
5b73ac957b Edition updates: FDN, J25, SPG 2024-10-31 17:32:10 +00:00
Fulgur14
55a6f2b88d Final 10 FDN/J25 cards (for now) (#6481) 2024-10-31 16:55:02 +00:00
Chris H
f2cc07b309 Update star_athlete.txt (#6482) 2024-10-31 17:34:50 +01:00
Fulgur14
2acf72e809 Eighth dozen (this time just FDN) (#6480) 2024-10-31 14:45:23 +01:00
kevlahnota
399fca6418 Merge pull request #6477 from kevlahnota/master2
update keyboardinput, android pom and assets downloader
2024-10-31 21:03:03 +08:00
Anthony Calosa
c55c07b8dd update android bg, min spec 2024-10-31 20:45:20 +08:00
Anthony Calosa
52d77c6862 fix NPE and update keyboard visibility 2024-10-31 17:28:30 +08:00
Anthony Calosa
550f738833 update location for build.txt and version.txt 2024-10-31 13:33:55 +08:00
Anthony Calosa
1f369732e5 fix updater message 2024-10-31 13:29:38 +08:00
Anthony Calosa
4664ff441b Merge branch 'master' into master2 2024-10-31 11:56:28 +08:00
Anthony Calosa
cea913e03c update tmxmaploader 2024-10-31 11:50:12 +08:00
Anthony Calosa
00a401de0e try to fix keyboardinput 2024-10-31 06:51:08 +08:00
Fulgur14
76b58e3ba7 Seventh dozen of FDN/J25 cards (#6475) 2024-10-30 20:19:25 +00:00
Fulgur14
4a70a27cf9 The fifth dozen of FDN/J25 cards (#6472) 2024-10-30 19:34:17 +00:00
Fulgur14
2c9ee76860 Sixth dozen of FDN/J25 cards, brought to you by letter S (#6474) 2024-10-30 18:41:06 +00:00
Paul Hammerton
935c720ab5 Merge pull request #6473 from paulsnoops/edition-updates
Edition updates: FDN, FDC, J25, SPG
2024-10-30 16:16:33 +00:00
Paul Hammerton
4979622425 Edition updates: FDN, FDC, J25, SPG 2024-10-30 16:13:16 +00:00
Fulgur14
a1235a89de Fourth dozen of FDN/J22 cards (#6470) 2024-10-30 12:57:52 +01:00
kevlahnota
f3a8a64207 Enable sync 2024-10-30 18:09:33 +08:00
kevlahnota
567ca35a29 Missed quote 2024-10-30 17:30:16 +08:00
Chris H
5f5e871840 Add a toggle to reenable declaring combatant ordering (#6467)
* Add a toggle to reenable declaring combatant ordering

* update translation

---------

Co-authored-by: kevlahnota <anthonycalosa@gmail.com>
2024-10-30 12:27:25 +03:00
kevlahnota
bd6d69c764 Update snapshot-both-pc-android.yml 2024-10-30 16:52:36 +08:00
kevlahnota
6f41d8ac0c Merge pull request #6471 from kevlahnota/master2
fix filename
2024-10-30 16:41:15 +08:00
Anthony Calosa
eefc20a1ac fix filename 2024-10-30 16:37:06 +08:00
kevlahnota
f8e9c15c79 Merge pull request #6469 from Card-Forge/kevlahnota-patch-1
Create snapshot-both-pc-android.yml
2024-10-30 14:18:13 +08:00
kevlahnota
5a333623fd Create snapshot-both-pc-android.yml 2024-10-30 12:51:04 +08:00
kevlahnota
ab3b238b29 Merge pull request #6468 from kevlahnota/master2
fix ClassCastException
2024-10-30 12:13:34 +08:00
Anthony Calosa
c1e7e4a3c1 revert class name (still can't override androidapplication), disable keyboardprovider 2024-10-30 12:01:13 +08:00
Anthony Calosa
e34b6b55ec Merge branch 'master' into master2 2024-10-30 11:22:35 +08:00
Anthony Calosa
c25467eda8 fix ClassCastException
forge.app.Main cannot be cast to com.badlogic.gdx.backends.android.AndroidApplication
2024-10-30 11:16:21 +08:00
tool4ever
e49f0baa12 Fix AbilityResolves timing (#6464) 2024-10-29 20:45:59 +00:00
Fulgur14
d54b48ec1d Third dozen of FDN/J25 cards (#6463) 2024-10-29 20:44:44 +00:00
tool4ever
3569dd37f1 Rename emergent woodwurm.txt to emergent_woodwurm.txt 2024-10-29 20:32:25 +00:00
tool4ever
86e4f5b500 Rename emrakul's messenger.txt to emrakuls_messenger.txt 2024-10-29 20:31:48 +00:00
tool4ever
80010d5fb5 Update anep_vizier_of_hazoret.txt 2024-10-29 20:25:54 +00:00
Fulgur14
2de9e7f92c Another 12 FDN/J25 cards (#6461) 2024-10-29 17:17:06 +00:00
kevlahnota
be983bcb20 Merge pull request #6462 from kevlahnota/master2
fix timestamp differences on build.txt
2024-10-30 01:02:44 +08:00
Anthony Calosa
a2419137e1 fix timestamp differences on build.txt 2024-10-30 00:57:56 +08:00
tool4ever
4a08a6a4e0 Fix some scripts (#6460) 2024-10-29 14:17:36 +00:00
Paul Hammerton
d4e6a67285 Merge pull request #6458 from Fulgur14/Fulgur14-patch-938101
12 FDN/J25 cards
2024-10-29 13:14:31 +00:00
kevlahnota
5c18bd0684 Merge pull request #6459 from kevlahnota/master2
restore libgdx keyboardheightprovider without androidx
2024-10-29 21:01:41 +08:00
Anthony Calosa
12407a62af Merge branch 'master' into master2 2024-10-29 20:55:07 +08:00
Anthony Calosa
57ccf5dd9e restore libgdx keyboardheightprovider without androidx
- https://github.com/libgdx/libgdx/pull/7485
2024-10-29 20:44:01 +08:00
Fulgur14
085bee2f61 Update cat_collector.txt 2024-10-29 13:25:46 +01:00
Fulgur14
63a09acb9f Update billowing_shriekmass.txt 2024-10-29 13:18:02 +01:00
Fulgur14
a21283fe8f Update claws_out.txt 2024-10-29 13:16:33 +01:00
Fulgur14
40d1423681 Update battlesong_berserker.txt 2024-10-29 13:16:00 +01:00
tool4ever
de4b35cc1d King of the Oathbreakers should trigger for Changeling (Discord post) (#6453)
* Fix NPE with Street Spasm
2024-10-29 12:02:32 +00:00
Paul Hammerton
5db52c38ec Merge pull request #6455 from Fulgur14/Fulgur14-patch-197369
Update gate_colossus.txt
2024-10-29 11:08:44 +00:00
Fulgur14
bbe2b3565e 12 FDN/J22 cards 2024-10-29 12:04:12 +01:00
kevlahnota
3972f68fe6 Merge pull request #6457 from kevlahnota/master2
fix android filtering
2024-10-29 18:58:26 +08:00
Anthony Calosa
ea472ba708 Merge branch 'master' into master2 2024-10-29 18:57:56 +08:00
Anthony Calosa
c74b282ed2 fix android filtering 2024-10-29 18:56:20 +08:00
Paul Hammerton
9de1847005 Merge pull request #6456 from paulsnoops/edition-updates
Edition updates: FDC, J25, PW24
2024-10-29 10:17:37 +00:00
Paul Hammerton
0c20c34452 Edition updates: FDC, J25, PW24 2024-10-29 10:02:08 +00:00
Fulgur14
ea1a5cbada Update gate_colossus.txt 2024-10-29 10:15:59 +01:00
kevlahnota
489611c3c4 Merge pull request #6454 from kevlahnota/master2
fix android updater, add fallback to android check
2024-10-29 16:52:26 +08:00
Anthony Calosa
a31e568557 Merge branch 'master' into master2 2024-10-29 16:45:54 +08:00
Anthony Calosa
1ef0656495 fix android updater, add fallback to android check
- copy build.txt to assets (gdx.files.internal looks only inside assets folder)
2024-10-29 16:44:29 +08:00
Fulgur14
4ad0126e22 Add files via upload (#6446) 2024-10-29 08:23:29 +00:00
kevlahnota
b70df0d422 Merge pull request #6452 from kevlahnota/master2
prevent NPE
2024-10-29 14:54:14 +08:00
Anthony Calosa
b3c867e326 prevent NPE 2024-10-29 14:41:25 +08:00
kevlahnota
2370bff495 Merge pull request #6451 from kevlahnota/master2
fix assetsdownloader release parsing
2024-10-28 22:55:29 +08:00
Anthony Calosa
9eebd7edd9 Merge branch 'master' into master2 2024-10-28 20:24:14 +08:00
Paul Hammerton
eea0123bed Merge pull request #6450 from Fulgur14/Fulgur14-patch-849353
Ashroot Animist (FDN)
2024-10-28 12:16:25 +00:00
Anthony Calosa
037344755a update constant 2024-10-28 20:13:34 +08:00
Anthony Calosa
51e0f37a14 update constant name 2024-10-28 20:10:33 +08:00
Anthony Calosa
f663fc52dc update release parsing 2024-10-28 20:04:47 +08:00
Anthony Calosa
9d569b4538 fix missing filename 2024-10-28 19:42:22 +08:00
Anthony Calosa
ad9b6e57bd move hardcoded url to ForgeConstants 2024-10-28 19:27:41 +08:00
Fulgur14
4a3e8b56bd Ashroot Animist (FDN) 2024-10-28 11:51:44 +01:00
Paul Hammerton
2fce568b51 Merge pull request #6448 from Fulgur14/master-1
Four J25 legends with their tokens
2024-10-28 10:32:50 +00:00
Fulgur14
0352e775dd Update cynette_jelly_drover.txt 2024-10-28 11:29:56 +01:00
Paul Hammerton
2f1f9a4294 Merge pull request #6449 from Fulgur14/Fulgur14-patch-906307
Elvish Regrower (FDN)
2024-10-28 10:26:15 +00:00
Fulgur14
0f947aa1fb Elvish Regrower (FDN) 2024-10-28 11:08:33 +01:00
Fulgur14
0758536352 Add files via upload 2024-10-28 06:52:52 +01:00
Fulgur14
6f01202042 Add files via upload 2024-10-28 06:51:10 +01:00
kevlahnota
c62f1c8631 Merge pull request #6447 from kevlahnota/master2
check snapshot update by timestamp
2024-10-28 12:44:14 +08:00
Anthony Calosa
0b5c3c54bd don't process logs if snapsBuildDate is empty 2024-10-28 12:38:06 +08:00
Anthony Calosa
750d41a2d3 filter commit messages 2024-10-28 12:34:48 +08:00
Anthony Calosa
0bac8ea04d format message 2024-10-28 12:19:50 +08:00
Anthony Calosa
20db37477f missing space 2024-10-28 12:12:17 +08:00
Anthony Calosa
b807c604e3 update mobile timestamp check 2024-10-28 12:07:22 +08:00
Anthony Calosa
e97b77cc8f missing return 2024-10-28 11:49:08 +08:00
Anthony Calosa
a6ae8ef051 Merge branch 'master' into master2 2024-10-28 11:45:56 +08:00
Anthony Calosa
420f6964ff update desktop timestamp check 2024-10-28 10:51:17 +08:00
Simisays
c3c5e0f114 FDN 10 cards (#6434) 2024-10-27 18:54:20 +00:00
Fulgur14
587399c422 15 FDN/J25 cards (#6436) 2024-10-27 17:17:05 +00:00
Anthony Calosa
6d77e0cff4 check snapshot update by timestamp 2024-10-27 23:49:14 +08:00
kevlahnota
885f030bed Merge pull request #6443 from Card-Forge/kevlahnota-patch-4
Update snapshots-pc.yml
2024-10-27 20:19:19 +08:00
Paul Hammerton
6409c5a791 Merge pull request #6444 from paulsnoops/edition-updates
Edition updates: FDC, -PE24, PEWK
2024-10-27 08:57:27 +00:00
Paul Hammerton
43aed05ad2 Edition updates: FDC, -PE24, PEWK 2024-10-27 08:53:42 +00:00
kevlahnota
0f60951219 Update snapshots-pc.yml 2024-10-27 16:32:25 +08:00
TwentyToedToad
9097e607a2 Add Verdant Dread (YDSK) (#6352)
* Add Verdant Dread (YDSK)

* Update verdant_dread.txt

* Update verdant_dread.txt

* Update verdant_dread.txt

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2024-10-27 08:55:01 +03:00
TwentyToedToad
f5f2bc340c Add Crude Abattoir // Unsavory Kitchen (YDSK) (#6348)
* Add Crude Abattoir // Unsavory Kitchen (YDSK)

* Update crude_abattoir_unsavory_kitchen.txt

* Update crude_abattoir_unsavory_kitchen.txt

* Update crude_abattoir_unsavory_kitchen.txt

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2024-10-27 08:37:19 +03:00
kevlahnota
18d8817b7e Merge pull request #6442 from kevlahnota/master2
include build.txt
2024-10-27 13:25:20 +08:00
Anthony Calosa
b711b00640 include build.txt 2024-10-27 13:24:32 +08:00
kevlahnota
16b0bd2809 Merge pull request #6440 from kevlahnota/master2
refactor mobile ImageCache, ImageView, FChoiceList
2024-10-27 13:17:10 +08:00
Anthony Calosa
89bc9c126f update snapshot notification message 2024-10-27 13:00:39 +08:00
Anthony Calosa
609777cf60 Merge branch 'master' into master2 2024-10-27 11:41:26 +08:00
Anthony Calosa
9bde207575 add settings for snapshot notification, removed obsolote java 8 check 2024-10-27 11:39:28 +08:00
Anthony Calosa
720ac7f8ca fix uncommited changes 2024-10-27 09:38:53 +08:00
Anthony Calosa
6fb600e6fb refactor mobile ImageCache, ImageView, FChoiceList
removed method to generate borderless card since we used shader as default method
Texture, TextureRegion and other LibGDX objects that are disposable should be nonstatic
show Morph image on FChoiceList
2024-10-27 08:52:58 +08:00
TwentyToedToad
2169263662 Add Mothlight Processionist (YDSK) (#6340) 2024-10-26 20:12:02 +00:00
Fulgur14
57c0246f82 Qala, Ajani's Pridemate 2024-10-26 20:11:45 +00:00
TwentyToedToad
ef500b7cec Add Effie, Fast Learner (YDSK) (#6361) 2024-10-26 20:02:38 +00:00
Paul Hammerton
004bd9a142 Merge pull request #6439 from paulsnoops/edition-updates
Edition updates: J25
2024-10-26 20:04:30 +01:00
Paul Hammerton
654c757ad2 Edition updates: J25 2024-10-26 20:01:06 +01:00
Simisays
a42bf18b9c update (#6433) 2024-10-26 18:14:15 +03:00
Paul Hammerton
0c5766caae Merge pull request #6435 from paulsnoops/edition-updates
Edition updates: DFT, FDN, INR, PE24, SPG
2024-10-26 13:46:14 +01:00
Paul Hammerton
fce6afb9db Edition updates: DFT, FDN, INR, PE24, SPG 2024-10-26 13:39:22 +01:00
kevlahnota
007941fda3 Merge pull request #6431 from kevlahnota/master2
prevent NPE
2024-10-26 06:34:32 +08:00
Anthony Calosa
5d1e780beb prevent crash audit 2024-10-26 06:31:36 +08:00
Anthony Calosa
4ae88ae6ba update static 2024-10-26 06:27:30 +08:00
Anthony Calosa
4f23a6026e update prevent NPE 2024-10-26 06:23:14 +08:00
Anthony Calosa
e6e6a6e0a4 prevent NPE 2024-10-26 06:05:03 +08:00
kevlahnota
6362796df5 Merge pull request #6428 from kevlahnota/master2
fix GameLauncher
2024-10-25 19:57:43 +08:00
Anthony Calosa
6f3debba7a Merge branch 'master' into master2 2024-10-25 19:56:35 +08:00
Anthony Calosa
ca6c105aff move check 2024-10-25 19:50:44 +08:00
Anthony Calosa
e71193b69b fix GameLauncher 2024-10-25 19:45:42 +08:00
kevlahnota
bd3bf824ed Merge pull request #6424 from kevlahnota/master2
fix manifest entries, update autoupdater
2024-10-25 18:29:34 +08:00
Anthony Calosa
e9aed24c8b update rssreader dependency 2024-10-25 18:18:07 +08:00
Anthony Calosa
6334c9f922 update AtomReader, add support releaseTag on android 2024-10-25 18:03:46 +08:00
Anthony Calosa
1f05a5a295 update AtomReader, add support releaseTag on android 2024-10-25 17:43:35 +08:00
Anthony Calosa
07bb0e6fe3 update check for release tag 2024-10-25 17:32:05 +08:00
Anthony Calosa
9897c85559 use release tag for downloading latest github releases... 2024-10-25 17:24:48 +08:00
Anthony Calosa
dcbd25d00e move shaders to Shaders class 2024-10-25 13:26:57 +08:00
Anthony Calosa
cd82a74eb0 Merge branch 'master' into master2 2024-10-25 12:31:41 +08:00
Anthony Calosa
2f05168b81 force non immersive mode 2024-10-25 11:54:27 +08:00
Anthony Calosa
7c5aa5fd90 revert Changes.txt 2024-10-25 11:44:03 +08:00
Anthony Calosa
8c085bbd33 add mobile updater, update gdx natives 2024-10-25 11:41:06 +08:00
wcoldren
2585ad1cf6 fix: add executable permissions for .command files during installation
- Update install.xml to set 775 permissions for .command files in Script pack
- Add .command files to target directory copy tasks in pom.xml
- Allow macOS users to run Forge apps without manual chmod

This change ensures .command files receive proper executable permissions
during installation, matching the behavior of .sh files on Unix/Linux.
2024-10-24 18:43:46 -04:00
Agetian
a6ccbe0f1d - Add GameState support for unlocked doors. (#6426)
- Add puzzle PS_DSK3.
2024-10-24 20:01:43 +03:00
Anthony Calosa
a0c865b4b3 add snapshot notification button 2024-10-24 20:44:22 +08:00
Anthony Calosa
fa974504b9 format release notes 2024-10-24 18:38:24 +08:00
Anthony Calosa
bf3111ba03 update TextUtil 2024-10-24 18:26:56 +08:00
Anthony Calosa
7a976291ba add desktop RSSReader, update autoupdater 2024-10-24 18:12:04 +08:00
Agetian
d92cacae7f Various improvements to AI-related logic (Canopy lands, Ugin's Labyrinth, Zuran Orb, Pyrite Spellbomb, Eladamri) (#6418)
* - Improve AI for Canopy lands.
- Improve AI for Ugin's Labyrinth.

* - Pyrite Spellbomb: also don't sac immediately.

* - Improve AI for Eladamri, Korvecdal

* - Improve AI decision for Zuran Orb.

* - Cleaner implementation for Eladamri AI
- More generic implementation for SacToDraw AI that doesn't need a logic parameter

* - Fix imports

* - Cleaner implementation for Eladamri AI

* - Suggested code tweak
2024-10-24 12:31:23 +03:00
Anthony Calosa
b26d0db07e fix manifest entries
BuildInfo reflects correct version
2024-10-24 09:18:32 +08:00
kevlahnota
e28d041ede Merge pull request #6419 from Card-Forge/revert-6234-ok_shortcut
Revert "gui-desktop : add keyboard shortcut to press OK/Yes button"
2024-10-24 07:35:01 +08:00
kevlahnota
c593c812bc Merge pull request #6423 from kevlahnota/master2
update splash closing
2024-10-24 07:34:00 +08:00
Anthony Calosa
07d2d0a023 update splash closing 2024-10-24 07:30:16 +08:00
Chris H
76ac1e2534 Revert "gui-desktop : add keyboard shortcut to press OK/Yes button" 2024-10-23 12:57:32 -04:00
kevlahnota
f06c8c3881 finally renamed 2024-10-23 09:35:40 +08:00
kevlahnota
0de880c68d update rename script 2024-10-23 07:42:34 +08:00
kevlahnota
f7cd6426d5 single mv workflow 2024-10-23 07:15:11 +08:00
kevlahnota
f1961c0394 Update snapshots-pc.yml again 2024-10-23 07:00:03 +08:00
kevlahnota
8000e80c13 Update snapshots-pc.yml 2024-10-23 05:55:50 +08:00
kevlahnota
8568498b69 Merge pull request #6412 from kevlahnota/master2
display locked room, fix nonrotated card panels
2024-10-23 05:49:21 +08:00
kevlahnota
051ec47ff6 Merge pull request #6234 from Ayora29/ok_shortcut
gui-desktop : add keyboard shortcut to press OK/Yes button
2024-10-23 05:48:04 +08:00
kevlahnota
99b0c96bfd Merge pull request #6392 from CollinJ/master
Fix the SpellSmith missing some cards.
2024-10-23 05:47:16 +08:00
tool4ever
4f3dc5891a Update attack_in_the_box.txt
Closes #6416
2024-10-22 21:16:31 +00:00
Chris H
2bab2f6c2b Merge branch 'master' into ok_shortcut 2024-10-22 15:40:18 -04:00
CollinJ
a02a0a25fc Merge branch 'master' into master 2024-10-22 10:12:12 -07:00
Paul Hammerton
dd33f9a28a Merge pull request #6414 from paulsnoops/22bar
Ban Leyline of Resonance in Arena Standard archive
2024-10-22 16:53:08 +01:00
Paul Hammerton
65f72b25ed Ban Leyline of Resonance in Arena Standard archive 2024-10-22 16:48:34 +01:00
Anthony Calosa
310f0ea352 incorporate emptyroom 2024-10-22 23:28:49 +08:00
Anthony Calosa
f7f9943436 update code as suggested 2024-10-22 23:05:47 +08:00
Anthony Calosa
b9a06e14a4 update better fix and replace rotate transform to spiral image (so it will not conflict with the existing rotate transform) 2024-10-22 22:36:05 +08:00
Anthony Calosa
f2cb01677e Merge branch 'master' into master2 2024-10-22 21:50:53 +08:00
Anthony Calosa
1b3e3f7f7c display locked room, fix nonrotated card panels 2024-10-22 21:38:23 +08:00
Agetian
84965594d0 Further improvement to PeekAndRevealAi (fix AI paying 0 for X) (#6410)
* - Add puzzle PS_DSK2.

* - Fix PeekAndRevealAi not paying the X mana cost.

* - Further improvement to PeekAndRevelAi.
2024-10-22 14:07:13 +03:00
Paul Hammerton
9014e282cb Merge pull request #6409 from paulsnoops/edition-updates
Edition updates: FDN, PW24
2024-10-22 11:16:47 +01:00
Paul Hammerton
890c5f0b0d Merge pull request #6407 from Ayora29/fix_token_names
Fix tokens things
2024-10-22 11:11:59 +01:00
Paul Hammerton
e05d0de220 Edition updates: FDN, PW24 2024-10-22 11:11:30 +01:00
tool4ever
031cd4176d Fix logic for Henzie (#6402) 2024-10-22 10:14:43 +02:00
fanch
18b22279df Fix tokens things 2024-10-22 09:59:33 +02:00
tool4ever
9dd712c18c Update experimental_lab_staff_room.txt 2024-10-22 07:51:45 +02:00
kevlahnota
32b209b47b Merge pull request #6405 from kevlahnota/master2
update manifest
2024-10-22 11:47:03 +08:00
Anthony Calosa
c5a01eb5d1 update manifest 2024-10-22 11:34:06 +08:00
kevlahnota
d231af2cad Merge pull request #6404 from kevlahnota/master2
Fix NPE, add manifest entries to jar
2024-10-22 10:59:28 +08:00
Anthony Calosa
bfca273ca6 Merge branch 'master' into master2 2024-10-22 10:58:54 +08:00
Anthony Calosa
5a84c9c4f4 prevent NPE 2024-10-22 10:36:57 +08:00
Anthony Calosa
2aa6d9a6e6 add manifest entries to forge desktop/mobile jar
allow launching the jar without launcher if possible
2024-10-22 10:18:07 +08:00
Chris H
1536868d61 Fix snaps (#6403)
* Update snapshots-pc.yml

* Update snapshots-pc.yml

* Update snapshots-pc.yml
2024-10-21 21:55:05 -04:00
Anthony Calosa
1ab6d82f69 Merge branch 'master' into master2
# Conflicts:
#	.github/workflows/snapshots-pc.yml
2024-10-22 06:49:11 +08:00
Anthony Calosa
5305050546 update snapshot-pc workflow 2024-10-22 06:25:05 +08:00
Anthony Calosa
13f0cda7f6 update snapshot-android workflow 2024-10-22 06:14:09 +08:00
kevlahnota
1a815b4ed7 Merge pull request #6401 from Card-Forge/kevlahnota-patch-3
Update AudioClip.java
2024-10-22 00:21:46 +08:00
kevlahnota
b4bffe93f1 Update AudioClip.java
Surround audio clip with try catch, seems accessing audio in lwjgl3 produce invalidid, could be thread problem.
2024-10-22 00:15:27 +08:00
Hans Mackowiak
7a34369c5e Merge branch 'master' into code-cleanup 2024-10-21 17:57:21 +02:00
Anthony Calosa
21a738e616 delete version.txt if res folder is incomplete to allow redownload 2024-10-21 11:16:55 -04:00
Anthony Calosa
993578d695 try to fix permission check 2024-10-21 11:16:55 -04:00
Anthony Calosa
0d06258edb add info on permission 2024-10-21 11:16:55 -04:00
Anthony Calosa
ec9209ceb6 update permission, include shell script to archive 2024-10-21 11:16:55 -04:00
Anthony Calosa
9a36808611 pretty print xml 2024-10-21 11:16:55 -04:00
Anthony Calosa
fbf26efc60 update installer, restore the tar.bz2 archive along with the installer and try to grant permission on the shell executables. 2024-10-21 11:16:55 -04:00
Anthony Calosa
4273420da5 delete version.txt if res folder is incomplete to allow redownload 2024-10-21 22:53:56 +08:00
Anthony Calosa
91cfd1ff3a try to fix permission check 2024-10-21 21:56:23 +08:00
Anthony Calosa
05ce94d36f add info on permission 2024-10-21 20:43:54 +08:00
Anthony Calosa
f3aa3c53ed update permission, include shell script to archive 2024-10-21 20:35:24 +08:00
Anthony Calosa
6e9febdfc7 pretty print xml 2024-10-21 19:41:07 +08:00
Anthony Calosa
995336a764 update installer, restore the tar.bz2 archive along with the installer and try to grant permission on the shell executables. 2024-10-21 19:35:23 +08:00
kevlahnota
2814207390 Merge pull request #6399 from Card-Forge/kevlahnota-patch-2
Update snapshots-pc.yml
2024-10-21 18:14:18 +08:00
kevlahnota
a47d4e6a6c Update snapshots-pc.yml 2024-10-21 18:13:49 +08:00
Agetian
41c64b282a Fix AI paying 0 for PeekAndRevealAi (#6396)
* - Add puzzle PS_DSK2.

* - Fix PeekAndRevealAi not paying the X mana cost.
2024-10-21 12:33:47 +03:00
Anthony Calosa
e9fa2a5fea remove adventure-mac command (-XstartOnFirstThread isn't needed anymore to start on Mac) 2024-10-21 15:26:30 +08:00
Anthony Calosa
ca5b0683d1 update version code, remove redundant CURRENT_VERSION 2024-10-21 15:01:39 +08:00
CollinJ
94c75f1e71 Merge branch 'master' into master 2024-10-20 22:05:24 -07:00
kevlahnota
ece5772217 Merge pull request #6394 from kevlahnota/master2
fix updater versionstring
2024-10-21 12:58:19 +08:00
Anthony Calosa
59f672225d update 2024-10-21 12:41:26 +08:00
Anthony Calosa
7203eaa07a Merge branch 'master' into master2 2024-10-21 12:19:02 +08:00
Anthony Calosa
f82236cc4f fix updater versionstring 2024-10-21 12:14:17 +08:00
Chris H
2495b02c73 Merge pull request #6393 from Card-Forge/tehdiplomat-patch-4
Update snapshots-pc.yml
2024-10-20 23:08:17 -04:00
Chris H
33c85a4f0f Update snapshots-pc.yml
izpack needs to allow jar files
2024-10-20 23:07:11 -04:00
Chris H
4e48daeadb Merge pull request #6103 from kevlahnota/master2
Update Android build (SDK 35), Java 17, LibGDX 1.13.0
2024-10-20 22:55:10 -04:00
Anthony Calosa
1979c23389 update pom 2024-10-21 09:15:57 +08:00
Anthony Calosa
612473c1fb fix adventure-editor pom 2024-10-21 09:13:45 +08:00
Collin
5de234aacb Fix the SpellSmith missing some cards.
The main issues is that getAllCards returns a card list that is unique
by name. That menas each card only has a single rarity. In this case,
cards like "Forbidden Orchard" and "Choke" de-deuplicate to a version of
the card with 'S' rarity. This means that when filtering by rarity, the
'S' rarity will be filtered out.
Another similar issue is that when a card exists in multiple sets with
different rarities, you might filter to a set in which the card is 'R',
but the de-duped version in allCards has rarity 'U', so using the cardDB
to check the rarity to filter on doesn't work.

When filtering by a specific set, the solution is to use the rarity of
the card in that set.
When not filtering by a set but filtering by rarity, we have to address
the root cause of the de-duping.

WHen de-duping, I changed the logic to ignore 'S' rarities. This fixes
the rarity filter when not filtering by an edition (although if there
are multiple rarities you still have to kind of guess).
This has the side-effect of making the card image used something more
legible. Before 'Choke' de-duped to the MPS_AHK set which has illegible
text. By ignoring 'S' rarities, it not de-dups to 8ED.

More work could probably be done to improve de-duping, but perfect
correctness would probably involve de-duping only after filtering, which
is likely too slow.
2024-10-20 12:29:11 -07:00
Anthony Calosa
e833b9f400 use flatten plugin 2024-10-21 00:03:42 +08:00
Anthony Calosa
9cf06a04da remove slf4j-simple 2024-10-20 22:23:01 +08:00
Anthony Calosa
7bebf8732c Merge branch 'master' into master2 2024-10-20 21:56:30 +08:00
Jetz
e52a7b1a53 Remove unused imports 2024-10-20 09:35:52 -04:00
Jetz
c5be6f1b17 Merge branch 'master' into code-cleanup
# Conflicts:
#	forge-game/src/main/java/forge/game/GameEntityCounterTable.java
#	forge-game/src/main/java/forge/game/ability/effects/PumpEffect.java
#	forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java
2024-10-20 09:33:41 -04:00
Jetz
64609b0867 Add some helper methods to StreamUtil;
Rewrite `generateParticipants`
2024-10-20 09:26:36 -04:00
Anthony Calosa
5a1f864db0 fix dependency conflict 2024-10-20 21:19:13 +08:00
Paul Hammerton
5a3f2ed607 Merge pull request #6386 from dracontes/rb-sld-2-marvel
SLD: Marvel x MTG Superdrop
2024-10-20 13:30:03 +01:00
Anthony Calosa
7b714423d8 remove '-P' 2024-10-20 20:19:30 +08:00
Anthony Calosa
39c8a6af3e fix compilation 2024-10-20 20:09:29 +08:00
Anthony Calosa
426e63598f Merge branch 'master' into master2 2024-10-20 18:38:41 +08:00
Anthony Calosa
1f596668f2 cleanup 2024-10-20 18:36:48 +08:00
Anthony Calosa
d1be724896 create forge-installer 2024-10-20 18:27:14 +08:00
tool4EvEr
0186759bf7 Support Black Panther 2024-10-20 12:21:00 +02:00
tool4ever
98c0959d8f Fix Embodiment of Agonies counting Asmoranomardicadaistinaculdacar (#6388) 2024-10-20 10:02:48 +00:00
tool4EvEr
cf7aa54769 Support Captain America 2024-10-20 10:45:16 +02:00
Anthony Calosa
86b58ef479 update dependency 2024-10-20 04:28:09 +08:00
Anthony Calosa
8a7866da87 update plugins 2024-10-20 04:00:07 +08:00
Renato Filipe Vidal Santos
43434e4999 Update TypeLists.txt 2024-10-19 14:29:27 +01:00
Anthony Calosa
5bc364393a Merge branch 'master' into master2 2024-10-19 20:04:26 +08:00
Renato Filipe Vidal Santos
26281603bb Add files via upload 2024-10-19 13:02:10 +01:00
Renato Filipe Vidal Santos
28a42b116b Update iron_man_titan_of_innovation.txt 2024-10-19 12:43:00 +01:00
Renato Filipe Vidal Santos
84eb2f28f5 Update wolverine_best_there_is.txt 2024-10-19 12:42:36 +01:00
Renato Filipe Vidal Santos
0a8c925a71 Update captain_america_first_avenger.txt 2024-10-19 12:41:51 +01:00
Renato Filipe Vidal Santos
9fb4e6e359 Update black_panther_wakandan_king.txt 2024-10-19 12:41:08 +01:00
Renato Filipe Vidal Santos
b0cc6fc49f Add files via upload 2024-10-19 12:01:29 +01:00
Paul Hammerton
42893234b3 Merge pull request #6385 from paulsnoops/marvel_formats
Add Marvel SLD to Vintage & Legacy Archived formats
2024-10-19 10:38:23 +01:00
Paul Hammerton
d9d89e9c0d Add Marvel SLD to Vintage & Legacy Archived formats 2024-10-19 10:30:37 +01:00
Paul Hammerton
1d6d356e02 Merge pull request #6384 from paulsnoops/edition_updates
Edition updates: PSPL, SLD
2024-10-19 10:26:29 +01:00
Paul Hammerton
af5e4eab69 Edition updates: PSPL, SLD 2024-10-19 10:20:17 +01:00
Anthony Calosa
a953818a76 Merge branch 'master' into master2 2024-10-19 15:59:18 +08:00
Agetian
339b04c60a - Add puzzle PS_DSK2. (#6382) 2024-10-19 08:33:38 +03:00
Anthony Calosa
ce7a182911 minor cleanup 2024-10-19 12:39:42 +08:00
Anthony Calosa
677bb7b12c fix tags 2024-10-19 12:13:43 +08:00
Anthony Calosa
8ad1f41fef fix name 2024-10-19 12:09:01 +08:00
Anthony Calosa
7f0ce0b4e7 refactor module to map-editor, add gdx particle editor 2024-10-19 12:07:36 +08:00
kevlahnota
8ce2f61390 remove custom manifest entries 2024-10-19 07:19:50 +08:00
Anthony Calosa
a09de0294f replacer token -> mandatory.java.args 2024-10-19 07:05:10 +08:00
Anthony Calosa
0cdcdeaa49 Merge branch 'master' into master2 2024-10-19 03:08:41 +08:00
Ayora29
1e707dcdbf Merge branch 'master' into ok_shortcut 2024-10-18 20:09:06 +02:00
Paul Hammerton
4ee2af4e1e Merge pull request #6377 from Ayora29/fix_token_names
WOC : Fix token name
2024-10-18 17:33:12 +01:00
tool4ever
b2ec9c3a49 Update longhorn_firebeast.txt 2024-10-18 16:29:09 +00:00
Anthony Calosa
3455045f2e update scripts 2024-10-18 23:16:00 +08:00
fanch
a1de6fa6cc Revert "ZNC : Add token b_1_1_faerie_rogue_flying (from card "Notorious Throng")"
This reverts commit 7f09129683.
2024-10-18 16:20:04 +02:00
fanch
7f09129683 ZNC : Add token b_1_1_faerie_rogue_flying (from card "Notorious Throng") 2024-10-18 16:18:54 +02:00
fanch
e7ec681470 WOC : Fix token name w_1_1_pegasus_flying -> w_2_2_pegasus_flying 2024-10-18 16:12:31 +02:00
Ayora29
b080a337be Merge branch 'master' into ok_shortcut 2024-10-18 16:05:52 +02:00
fanch
be6f353867 Merge branch 'master' into ok_shortcut
# Conflicts:
#	forge-gui-desktop/src/main/java/forge/toolbox/FOptionPane.java
2024-10-18 15:47:10 +02:00
Anthony Calosa
548450eb1a unused import 2024-10-18 20:00:55 +08:00
Anthony Calosa
c1779a55d5 update to LibGDX 1.13.0, add ForgeAndroidApplication (modified AndroidApplication) 2024-10-18 19:44:30 +08:00
Anthony Calosa
e6caed4ced cleanup 2024-10-18 11:38:57 +08:00
Anthony Calosa
5f98543f6d test remove old build tools on modded android maven plugin 2024-10-18 11:28:56 +08:00
Anthony Calosa
e0639ba33a Merge branch 'master' into master2 2024-10-18 05:23:38 +08:00
Anthony Calosa
2ec505b01a test older build tools 2024-10-18 05:13:21 +08:00
TwentyToedToad
e6a62e54fc Add Enduring Friendship (YDSK) (#6354) 2024-10-17 20:26:18 +00:00
JMAilan
2571aff4c8 Constructed as default mode (#6358)
Co-authored-by: Agetian <stavdev@mail.ru>
2024-10-17 17:58:01 +02:00
fanch
e862f4d8ca MH2 : Fix token name u_1_1_bird_flying -> w_1_1_bird_flying 2024-10-17 17:56:23 +02:00
TwentyToedToad
95eb400b19 Add Chittering Illuminator (YDSK) (#6370)
* Add Chittering Illuminator (YDSK)
2024-10-17 17:55:12 +02:00
fanch
faaec84a8b MH2 : Fix token name u_1_1_bird_flying -> w_1_1_bird_flying 2024-10-17 17:08:28 +02:00
fanch
0d63692ec6 Merge branch 'master' of https://github.com/Ayora29/forge 2024-10-17 17:06:59 +02:00
fanch
ed2a4bf3bf MH2 : Fix token name u_1_1_bird_flying -> w_1_1_bird_flying 2024-10-17 17:05:39 +02:00
Anthony Calosa
8403bda70e Merge branch 'master' into master2 2024-10-17 22:37:36 +08:00
Anthony Calosa
b1ba4b2c4f fix 2024-10-17 22:33:30 +08:00
Anthony Calosa
bde1ebc990 update 2024-10-17 22:20:46 +08:00
Anthony Calosa
54a1995572 test list 2024-10-17 21:48:20 +08:00
TwentyToedToad
9281f89974 Add Eager Flameguide (YDSK) (#6350) 2024-10-17 15:27:13 +02:00
TwentyToedToad
0048f25db2 Add Wingbright Thief (YDSK) (#6368) 2024-10-17 15:25:58 +02:00
TwentyToedToad
65775f87b4 Add Mischievous Lookout (YDSK) (#6366) 2024-10-17 15:25:14 +02:00
TwentyToedToad
54396e7f71 Add Unnatural Summons (YDSK) (#6367) 2024-10-17 15:16:45 +02:00
TwentyToedToad
ace00aa5f8 Add Golden Sidekick (YDSK) (#6362) 2024-10-17 15:11:29 +02:00
Anthony Calosa
dc357461d8 test tmate 2024-10-17 21:09:08 +08:00
TwentyToedToad
d2d38d5d26 Add Soul Shredder (YDSK) (#6338) 2024-10-17 15:03:31 +02:00
Anthony Calosa
e7814ec6d1 test min 2024-10-17 21:02:47 +08:00
TwentyToedToad
c44e41b4d3 Add Ethrimik, Imagined Fiend (YDSK) (#6339) 2024-10-17 15:02:41 +02:00
Anthony Calosa
a5d1165214 test again 2024-10-17 20:55:15 +08:00
Anthony Calosa
1db465d17c test build-tools 2024-10-17 20:53:15 +08:00
Anthony Calosa
331366687e test platform-tools 2024-10-17 20:50:55 +08:00
Jetz
67cedada04 Merge branch 'master' into code-cleanup
# Conflicts:
#	forge-gui-mobile/src/forge/adventure/data/AdventureEventData.java
2024-10-17 08:25:39 -04:00
Anthony Calosa
b1bc765627 test permission 2024-10-17 20:23:54 +08:00
Jetz
9be2c3df8b Merge branch 'master' into code-cleanup 2024-10-17 08:23:36 -04:00
Anthony Calosa
57b1c9e0c8 test android root 2024-10-17 20:18:57 +08:00
Anthony Calosa
5b26688303 test without path 2024-10-17 19:54:43 +08:00
Anthony Calosa
97f9ce6b43 add test-build profile 2024-10-17 19:43:17 +08:00
Anthony Calosa
24638ecfce Merge branch 'master' into master2 2024-10-17 15:56:46 +08:00
Anthony Calosa
e7aad18787 remove test build 2024-10-17 15:48:02 +08:00
Anthony Calosa
5c419df8b5 update name 2024-10-17 15:36:38 +08:00
Anthony Calosa
e1e69a4897 test android workflow 2024-10-17 15:34:29 +08:00
TwentyToedToad
ea045f6a15 Add Glimmer Hoarder (YDSK) (#6333) 2024-10-17 09:08:56 +02:00
TwentyToedToad
4aa7f0a4fe Add Razor Demon (#6334) 2024-10-17 09:07:15 +02:00
TwentyToedToad
aedd3bc521 Add Housemeld (YDSK) (#6341) 2024-10-17 09:01:46 +02:00
TwentyToedToad
7c3f8b57f0 Add Fear of Ridicule (YDSK) (#6343) 2024-10-17 08:56:28 +02:00
TwentyToedToad
9d8df142b4 Add Replicating Terror (YDSK) (#6344) 2024-10-17 08:55:06 +02:00
TwentyToedToad
c3aa31cb98 Add Welcome the Darkness (YDSK) (#6346) 2024-10-17 08:53:50 +02:00
TwentyToedToad
fbde7dca06 Add Anugished Recollection (YDSK) (#6347) 2024-10-17 08:52:45 +02:00
TwentyToedToad
dc6be93b25 Add Wary Zone Guard (YDSK) (#6353) 2024-10-17 08:48:07 +02:00
TwentyToedToad
b5246c42cf Add Mangled Soulrager (YDSK) (#6364) 2024-10-17 08:35:55 +02:00
TwentyToedToad
47a8b72b2e Add Polterheist (YDSK) (#6365) 2024-10-17 08:33:46 +02:00
Jetz72
54ecbeef6e Fix IndexOutOfBoundsException in generateParticipants (#6359)
Co-authored-by: Jetz <Jetz722@gmail.com>
2024-10-17 08:03:11 +03:00
Simisays
db0e188fab Sorin tweaks (#6373)
* update

* Update enemies.json
2024-10-17 08:01:58 +03:00
Anthony Calosa
e2a6dfabe8 update version digits 2024-10-17 12:35:11 +08:00
Anthony Calosa
89c699b94d update android pom 2024-10-17 11:34:37 +08:00
Anthony Calosa
0420ad4ef2 Merge branch 'master' into master2
# Conflicts:
#	README.md
#	forge-gui-android/pom.xml
#	forge-gui-android/src/main/AndroidManifest.xml
2024-10-17 10:48:20 +08:00
Hans Mackowiak
f5b30a6826 removed version from AndroidManifest 2024-10-16 21:12:02 -04:00
Hans Mackowiak
94f1835462 ~ fix version pattern for android.manifest merger 2024-10-16 21:12:02 -04:00
Hans Mackowiak
0c5f7962e2 ~ update android-maven-plugin 2024-10-16 21:12:02 -04:00
Hans Mackowiak
23be0c568d AndroidManifest 2024-10-16 21:12:02 -04:00
VishalKeerthan
0edd7d9d87 Update README.md 2024-10-16 21:09:13 -04:00
VishalKeerthan
c05760bab8 Update README.md 2024-10-16 21:09:13 -04:00
Anthony Calosa
143f2d883f update start button colors 2024-10-17 05:42:26 +08:00
Anthony Calosa
c07329db42 Merge branch 'master' into master2 2024-10-17 05:33:20 +08:00
TwentyToedToad
28744ff211 Add Fear of Change (#6327) 2024-10-16 17:12:10 +02:00
Paul Hammerton
ed7ba03b5a Merge pull request #6363 from paulsnoops/slp_edition
Edition updates: SLP
2024-10-16 15:52:36 +01:00
Paul Hammerton
ffda686533 Edition updates: SLP 2024-10-16 15:37:11 +01:00
Paul Hammerton
f727371a12 Merge pull request #6360 from Ayora29/fix_token_names
Fix token name in C21
2024-10-16 15:28:30 +01:00
Anthony Calosa
be8b77bf06 update button colors 2024-10-16 22:04:44 +08:00
fanch
cbefaf1984 Fix token name g_4_4_phyrexian_beast -> g_4_4_fungus_beast_trample 2024-10-16 15:15:09 +02:00
Anthony Calosa
d66a7ba604 Merge branch 'master' into master2 2024-10-16 20:45:48 +08:00
Hans Mackowiak
a1f425a803 Merge pull request #6337 from nwg5817/rewardRaritySort
Adventure: Reward Scene Sort by Rarity
2024-10-16 13:13:32 +02:00
Hans Mackowiak
a07cee4e76 Merge pull request #6335 from nwg5817/boosterQoL
Adventure: Minor Booster Pack QoL Changes
2024-10-16 13:12:36 +02:00
Anthony Calosa
94d5fc62bd replace ${alpha-version} -> ${revision} 2024-10-16 18:16:19 +08:00
Anthony Calosa
059d7aae1b Merge branch 'master' into master2 2024-10-16 18:16:03 +08:00
tool4ever
9d04766d13 Script fixes (#6356) 2024-10-16 11:35:40 +02:00
Paul Hammerton
4d04e49bd9 Merge pull request #6357 from churrufli/netdecks161024
Net Decks Archive Updates
2024-10-16 10:21:47 +01:00
Churrufli
92ee722db6 Net Decks Archive Updates (Standard, Modern, Legacy, Vintage, Pioneer, Pauper) 2024-10-16 11:12:14 +02:00
Anthony Calosa
fe83488c21 Merge branch 'master' into master2 2024-10-16 15:12:56 +08:00
Fulgur14
d65dedb92a Update demonic_covenant.txt (#6355) 2024-10-16 08:32:43 +02:00
Anthony Calosa
9c44efc629 Merge branch 'master' into master2 2024-10-16 09:05:08 +08:00
Chris H
5f53b8995e Update tunnel_surveyor.txt 2024-10-15 20:47:04 -04:00
JMAilan
38d8761fe3 Merge branch 'master' into rewardRaritySort 2024-10-15 11:46:19 -04:00
JMAilan
965dd136bb Merge branch 'master' into boosterQoL 2024-10-15 11:36:57 -04:00
Meta
0a08650393 Booster QoL
Remove open confirmation and disable leaving inventory scene when opening boosters.

Change Booster Pack Inventory Name

Old:
Booster Pack: WAR

New:
War of the Sparks Booster

Final

Tweak
2024-10-15 11:26:00 -04:00
tool4ever
83dd00e294 Update furious_spinesplitter.txt
Closes #6332
2024-10-15 12:41:39 +00:00
Anthony Calosa
ed58a68128 Merge branch 'master' into master2 2024-10-15 19:16:13 +08:00
Anthony Calosa
a565eff5fb update phase for upload since signv2 will run on verify phase and it should finish first before uploading 2024-10-15 19:14:45 +08:00
tool4ever
ce70a3949f Update head_games.txt 2024-10-15 10:51:57 +00:00
tool4ever
8f7b782d6b Update experimental_lab_staff_room.txt 2024-10-15 10:47:26 +00:00
Agetian
1466346d72 - Add DSK alt wincon achievement by Marek. (#6331) 2024-10-15 09:50:38 +03:00
Anthony Calosa
8fc3b45b12 quick fix for black texture 2024-10-15 10:55:56 +08:00
Jetz
2d6952f126 Swap out lingering use of Iterables.any 2024-10-14 22:51:16 -04:00
Jetz
6b93e628ac Merge branch 'master' into code-cleanup
# Conflicts:
#	forge-ai/src/main/java/forge/ai/ComputerUtil.java
#	forge-core/src/main/java/forge/card/DeckHints.java
#	forge-game/src/main/java/forge/game/ability/AbilityFactory.java
#	forge-game/src/main/java/forge/game/cost/CostUntapType.java
#	forge-gui/src/main/java/forge/player/HumanCostDecision.java
2024-10-14 22:36:07 -04:00
Anthony Calosa
83df147d0e Merge branch 'master' into master2
# Conflicts:
#	forge-adventure/pom.xml
#	forge-ai/pom.xml
#	forge-core/pom.xml
#	forge-game/pom.xml
#	forge-gui-android/AndroidManifest.xml
#	forge-gui-android/pom.xml
#	forge-gui-desktop/pom.xml
#	forge-gui-ios/pom.xml
#	forge-gui-mobile-dev/pom.xml
#	forge-gui-mobile/pom.xml
#	forge-gui-mobile/src/forge/Forge.java
#	forge-gui/pom.xml
#	forge-lda/pom.xml
#	pom.xml
2024-10-15 10:29:23 +08:00
Jetz
31547c6bbb Merge branch 'master' into code-cleanup
# Conflicts:
#	forge-game/src/main/java/forge/game/phase/PhaseHandler.java
2024-10-14 22:20:44 -04:00
Meta
5b62a1ffb5 Fixed non-cards for rarity sorting
import
2024-10-14 21:56:30 -04:00
Chris H
0475f4bafa Manually update files that need to be updated 2024-10-14 21:53:45 -04:00
GitHub Actions
d366bf8ffc [maven-release-plugin] prepare for next development iteration 2024-10-14 21:53:45 -04:00
GitHub Actions
fa538bd5c9 [maven-release-plugin] prepare release forge-1.6.65 2024-10-14 21:53:45 -04:00
Fulgur14
3db4db0d07 Add files via upload 2024-10-14 19:30:33 -04:00
Chris H
932bfb9e33 Migrate DSK upcoming 2024-10-14 14:22:35 -04:00
Chris H
da712a5e49 Add Winter Cynical Opportunist (#6325) 2024-10-14 18:04:30 +00:00
TwentyToedToad
0fb2db556b Add Experimental Lab // Staff Room (#6324) 2024-10-14 17:32:34 +00:00
TwentyToedToad
b820d6b622 Update my_will_is_irresistible.txt 2024-10-14 11:58:29 -04:00
TwentyToedToad
79337dbf1f Update my_will_is_irresistible.txt 2024-10-14 11:58:29 -04:00
TwentyToedToad
1a6d0a4354 Add My Will Is Irresistible 2024-10-14 11:58:29 -04:00
Paul Hammerton
68bb0ebd39 Fix Demonic Covenant (#6326) 2024-10-14 15:49:13 +00:00
Anthony Calosa
4af8061824 Merge branch 'master' into master2 2024-10-14 20:46:23 +08:00
Paul Hammerton
cc3b2a20ce Merge pull request #6323 from paulsnoops/ydsk_formats
Add YDSK to formats
2024-10-14 13:24:32 +01:00
Paul Hammerton
81faad08d4 Merge pull request #6322 from paulsnoops/edition_updates
Edition updates: SLD, YDSK
2024-10-14 13:22:05 +01:00
Paul Hammerton
c31b26a13d Add YDSK to formats 2024-10-14 13:21:03 +01:00
Paul Hammerton
efd883ef12 Edition updates: SLD, YDSK 2024-10-14 13:17:13 +01:00
tool4ever
b6f118f89b Fear of Sleep Paralysis and support (#6287) 2024-10-14 10:55:00 +00:00
tool4ever
8f33da5b9c AI aura targeting fix (#6320) 2024-10-14 10:23:18 +00:00
tool4ever
90adf4b0cb Update struggle_for_project_purity.txt 2024-10-14 06:38:01 +00:00
tool4ever
0df84b91f2 Support recursive check for tokens that create others (#6315) 2024-10-14 06:33:41 +00:00
tool4ever
2a5fa9d0a5 Fix CardZoneTable not using the LastStates before moving (#6291) 2024-10-14 08:05:24 +02:00
Anthony Calosa
12d2ec89f7 update android pom -> run signv2 on verify phase, fix versin string 2024-10-14 11:02:54 +08:00
Anthony Calosa
1e2d66f574 Merge branch 'master' into master2
# Conflicts:
#	README.md
2024-10-14 09:56:34 +08:00
Dnaynu
6859380e9e Docs: Typo fix
Corrected "[enviroment]" to "[environment]" in [README.md].

This pull request addresses a minor typo found in repository. The typo has been corrected to improve clarity and maintain the quality of the documentation.

This change is purely cosmetic and does not affect functionality.
2024-10-13 20:09:09 -04:00
Anthony Calosa
00e81d20dd Merge branch 'master' into master2 2024-10-14 06:06:40 +08:00
Chris H
8669859706 Accidentally pushed 2024-10-13 17:33:05 -04:00
Chris H
c948355f12 Add new set things 2024-10-13 17:20:02 -04:00
tool4ever
dc5cef1446 Update dreams_of_steel_and_oil.txt 2024-10-13 15:34:57 +00:00
tool4ever
bd659a1e44 Update defiled_crypt_cadaver_lab.txt 2024-10-13 15:32:42 +00:00
tool4EvEr
036e6ec1bf Ghostly Dancers and support 2024-10-13 11:03:02 -04:00
tool4ever
9568abc6f4 Update kraul_harpooner.txt 2024-10-13 11:50:01 +00:00
Renato Filipe Vidal Santos
31a1f05d51 Edit pile cleanup: Line reordering, second pass: part 10, folders 'w' to 'z' 2024-10-13 11:14:44 +00:00
Renato Filipe Vidal Santos
5bf12ab4eb Edit pile cleanup: Line reordering, second pass: part 9, folders 't' to 'v' (#6312) 2024-10-13 11:13:59 +00:00
Renato Filipe Vidal Santos
7fc3e18ff5 Edit pile cleanup: Line reordering, second pass: part 8, folder 's' 2024-10-13 11:11:20 +00:00
Renato Filipe Vidal Santos
9766d4b1e5 Edit pile cleanup: Line reordering, second pass: part 7, folders 'r', 'rebalanced' 2024-10-13 11:10:34 +00:00
Renato Filipe Vidal Santos
2a342b7e3b Edit pile cleanup: Line reordering, second pass: part 6, folders 'o' to 'q' (#6309) 2024-10-13 11:10:02 +00:00
Renato Filipe Vidal Santos
2a1b8b4c93 Edit pile cleanup: Line reordering, second pass: part 5, folders 'l' to 'n' 2024-10-13 11:09:26 +00:00
Renato Filipe Vidal Santos
f538eb1ec3 Edit pile cleanup: Line reordering, second pass: part 4, folders 'h' to 'k' 2024-10-13 11:07:58 +00:00
Renato Filipe Vidal Santos
ae28cd17c0 Edit pile cleanup: Line reordering, second pass: part 3, folders 'e' to 'g' 2024-10-13 11:07:28 +00:00
Renato Filipe Vidal Santos
add0e812a2 Edit pile cleanup: Line reordering, second pass: part 2, folders 'c' to 'd' 2024-10-13 11:06:57 +00:00
Renato Filipe Vidal Santos
0e9c95e542 Edit pile cleanup: Line reordering, second pass: part 1, folders 'a' to 'b' (#6304) 2024-10-13 11:06:16 +00:00
Chris H
6b03f6909f Add Central elevator (#6292) 2024-10-13 08:45:41 +00:00
Renato Filipe Vidal Santos
0bf92af38b Edit pile cleanup: Line reordering, first pass: part 10, folder 'tokenscripts', part 6 2024-10-13 08:34:39 +00:00
Renato Filipe Vidal Santos
042638612e Edit pile cleanup: Line reordering, first pass: part 9, folder 'tokenscripts', part 5 2024-10-13 08:34:22 +00:00
Renato Filipe Vidal Santos
b494ad8cd1 Edit pile cleanup: Line reordering, first pass: part 8, folder 'tokenscripts', part 4 2024-10-13 08:34:01 +00:00
Renato Filipe Vidal Santos
a2901eeeb8 Edit pile cleanup: Line reordering, first pass: part 7, folder 'tokenscripts', part 3 2024-10-13 08:33:32 +00:00
Renato Filipe Vidal Santos
e826c976c7 Edit pile cleanup: Line reordering, first pass: part 6, folder 'tokenscripts', part 2 2024-10-13 08:33:00 +00:00
Renato Filipe Vidal Santos
2ef75ac2a3 Edit pile cleanup: Line reordering, first pass: part 5, folder 'tokenscripts', part 1 2024-10-13 08:32:17 +00:00
Renato Filipe Vidal Santos
b9ac2aeaf8 Edit pile cleanup: Line reordering, first pass: part 4, folders 'w' to 'z' 2024-10-13 08:31:21 +00:00
Renato Filipe Vidal Santos
e86769ead6 Edit pile cleanup: Line reordering, first pass: part 3, folders 'o' to 'v', 'rebalanced', 'upcoming' (#6296) 2024-10-13 08:30:46 +00:00
Renato Filipe Vidal Santos
f91a2dbf58 Edit pile cleanup: Line reordering, first pass: part 2, folders 'e' to 'n' 2024-10-13 08:29:20 +00:00
Renato Filipe Vidal Santos
8d264b1ae9 Edit pile cleanup: Line reordering, first pass: part 1, folders 'a' to 'd' 2024-10-13 08:27:51 +00:00
Anthony Calosa
2b08b57179 Merge branch 'master' into master2 2024-10-13 12:35:31 +08:00
loud1990
44e8f3f20f Added Smoky Lounge//Misty Salon DSK (#6289) 2024-10-12 18:49:40 +00:00
loud1990
1b4a41d5da Updated Enter The Enigma DSK (#6288)
Changed to Sorcery
2024-10-12 17:45:51 +02:00
tool4ever
60216dc214 Fix NPE when creating room token (#6281) 2024-10-12 06:57:15 +00:00
tool4ever
4d8e55842f Update rendmaw_creaking_nest.txt 2024-10-12 06:49:40 +00:00
Fulgur14
ba4ad308cf Update mine_is_the_only_truth.txt (#6268) 2024-10-11 19:15:36 +00:00
Fulgur14
f92901d570 Polluted Cistern // Dim Oubliette (#6284) 2024-10-11 19:10:09 +00:00
Anthony Calosa
353600042f Merge branch 'master' into master2 2024-10-11 20:30:45 +08:00
tool4ever
b6cfbe3fae Update unholy_annex_ritual_chamber.txt 2024-10-11 08:03:06 +02:00
tool4ever
e5f60ca83d Update rendmaw_creaking_nest.txt 2024-10-11 08:01:48 +02:00
tool4ever
5189313d4d Update oblivious_bookworm.txt (#6272) 2024-10-10 20:23:29 +00:00
loud1990
73513cf2c1 Updated 3 DSK Cards (#6270) 2024-10-10 18:45:46 +00:00
Renato Filipe Vidal Santos
1068ff3f1a Edit pile cleanup: part 5, folder 'upcoming' part 2 2024-10-10 15:05:08 +02:00
Renato Filipe Vidal Santos
4fc77be4df Edit pile cleanup: part 4, folder 'upcoming' part 1 (#6221) 2024-10-10 15:04:18 +02:00
Renato Filipe Vidal Santos
747ed18e16 Edit pile cleanup: part 6, folder 'upcoming' part 3 (#6223) 2024-10-10 15:03:29 +02:00
Anthony Calosa
1da3e298e1 Merge branch 'master' into master2 2024-10-10 19:34:39 +08:00
Anthony Calosa
3e8b4cc3ca remove redundant plugin 2024-10-10 19:26:00 +08:00
Anthony Calosa
ad81b0e32d auto update snapshot-version, snapshot-versionCode via regex property 2024-10-10 17:10:05 +08:00
Agetian
fddab97eea - Added puzzle PS_DSK1. (#6269) 2024-10-10 10:28:38 +03:00
TwentyToedToad
cca7db5654 Add Rendmaw Creaking Nest and supporting changes (#6265)
* Add Rendmaw Creaking Nest, supporting property numTypes, and black 2/2 bird flying token

* Updated accoring to PR requests

* Update rendmaw_creaking_nest.txt

* Added landplayed trigger

---------

Co-authored-by: loperjchris <christopher.loper1990@gmail.com>
2024-10-10 10:16:39 +03:00
TwentyToedToad
96d065189b Add Demonic Covenant and supporting changes (#6257)
* Add Demonic Covenant and supporting changes

* Updated changes

* Update demonic_covenant.txt

* Addressing PR comments

---------

Co-authored-by: loperjchris <christopher.loper1990@gmail.com>
2024-10-10 10:13:19 +03:00
TwentyToedToad
b251328873 Added Your Plans Mean Nothing (#6262)
* Added Your Plans Mean Nothing

Tested with teammates to ensure that if a teammate is targeted they do not get to draw cards but they do discard their hand.

* Update your_plans_mean_nothing.txt
2024-10-10 10:13:11 +03:00
tool4ever
6f9cb7c74d Fix Summary Dismissal (#6263) 2024-10-10 08:34:41 +02:00
TwentyToedToad
1bd54d2ca0 Add Mine Is the Only Truth (#6259) 2024-10-09 20:27:33 +00:00
TwentyToedToad
5f022923b0 Add Running Is Useless (#6261) 2024-10-09 19:39:20 +00:00
Fulgur14
73c40b620b Room scripts (#6253) 2024-10-09 18:54:39 +00:00
Anthony Calosa
28a28bfd68 fix compilation 2024-10-09 22:54:57 +08:00
Anthony Calosa
f278aa5613 fix lines 2024-10-09 22:15:06 +08:00
Anthony Calosa
371b700a1e update JVMOptions info 2024-10-09 22:13:41 +08:00
Anthony Calosa
abdff9bb15 update to SDK 35 (Android 15), update versionString 2024-10-09 21:25:29 +08:00
Anthony Calosa
644fa46681 Merge branch 'master' into master2 2024-10-09 16:44:29 +08:00
TwentyToedToad
e1452ef997 Add I Am Never Alone (#6258)
* Add I Am Never Alone

* Update i_am_never_alone.txt

* Update i_am_never_alone.txt

---------

Co-authored-by: loperjchris <christopher.loper1990@gmail.com>
2024-10-09 10:30:45 +03:00
Anthony Calosa
39f5632df1 fix flatten plugin location 2024-10-09 14:18:43 +08:00
Anthony Calosa
708fed3350 update and unified version code property 2024-10-09 12:32:09 +08:00
Jetz72
48adeb357d Show chosen mana for mana abilities as symbols (#6256)
* Support for icons in dialogs.
Mana abilities show chosen mana via icons.
Thread safety for showOptionDialog

* Ensure EventDispatchThread for showInputDialog

---------

Co-authored-by: Jetz <Jetz722@gmail.com>
2024-10-08 22:17:18 +03:00
TwentyToedToad
cbdbe1d62b Added Fear My Authority (#6255) 2024-10-08 16:53:07 +00:00
TwentyToedToad
5e3833436e Added Disorienting Choice (#6244) 2024-10-08 16:12:03 +02:00
tool4ever
fe0abb25a6 Support Torture Pit (#6254) 2024-10-08 15:09:10 +02:00
kevlahnota
cfd90362e2 add translation 2024-10-08 09:07:15 -04:00
Chris H
dd60a84f40 Add Spell Smith Insurance (reject smithing for 10% cost) 2024-10-08 09:07:15 -04:00
Marco F
69d8bf52d3 Fixed spell description of snakeskin_veil (#6250) 2024-10-08 13:48:34 +02:00
Fulgur14
443a28e786 Update demon_of_fates_design.txt (#6251) 2024-10-08 13:48:00 +02:00
Fulgur14
31bd6d87ed Update Eerie cards (#6252) 2024-10-08 13:46:50 +02:00
Paul Hammerton
9a4d7fd399 Merge pull request #6249 from paulsnoops/add_ydsk
Edition updates: YDSK
2024-10-08 09:45:25 +01:00
Paul Hammerton
6060cfa5ee Edition updates: YDSK 2024-10-08 09:38:20 +01:00
Hans Mackowiak
065cf48d35 Merge pull request #6246 from Card-Forge/opened-rooms
Add Rampaging Soulrager
2024-10-08 10:35:40 +02:00
Hans Mackowiak
28e2627020 Merge pull request #6243 from Ivniinvi/patch-1
Aerie Typo Fix
2024-10-08 10:34:39 +02:00
Hans Mackowiak
4d93a40a56 Merge pull request #6247 from paulsnoops/fix_primo
Fix Primo the Indivisible token
2024-10-08 10:33:58 +02:00
Paul Hammerton
c8e4a8bde5 Merge pull request #6248 from paulsnoops/sld_update
Edition updates: SLD
2024-10-08 09:29:35 +01:00
Anthony Calosa
f6f51b916a Merge branch 'master' into master2 2024-10-08 16:27:50 +08:00
Anthony Calosa
af22edaff5 Merge remote-tracking branch 'origin/master' 2024-10-08 16:26:11 +08:00
Anthony Calosa
af3ceb3348 fix crash when card defined is missing or invalid
these card should be replaced or create a custom card for adventure mode
Power Struggle, Necropolis of Azar
2024-10-08 16:25:52 +08:00
Paul Hammerton
89f499baae Edition updates: SLD 2024-10-08 09:20:04 +01:00
Paul Hammerton
93d381a7ee Fix primo the Indivisible token 2024-10-08 09:14:39 +01:00
Paul Hammerton
e771ca43d8 Merge pull request #6242 from Simisays/ROOMBIS
DSK 10 Room cards
2024-10-08 08:52:03 +01:00
Anthony Calosa
7b310ae2ac Merge branch 'master' into master2 2024-10-08 13:08:38 +08:00
Chris H
ca9f6c2f8d Add Rampaging Soulrager 2024-10-07 22:23:00 -04:00
Chris H
57011c6cf5 Update glassworks_shattered_yard.txt 2024-10-07 22:14:24 -04:00
Anthony Calosa
8863c46caa Merge branch 'master' into master2 2024-10-08 09:30:02 +08:00
Matt Headley
fec420574f Update aerie_0.tmx 2024-10-07 19:51:37 -04:00
Anthony Calosa
dd50b54ffb reorder module, seems output is affected when builds are in parallel (-T 1C flag) 2024-10-08 06:50:43 +08:00
Anthony Calosa
877c8e71b7 update exec-id 2024-10-08 05:48:13 +08:00
Simisays
89c4f695c5 Update mirror_room_fractured_realm.txt 2024-10-07 19:59:53 +02:00
Simisays
33ae2ee952 cleanup 2024-10-07 19:31:25 +02:00
Simisays
d90577c77d update 2024-10-07 19:12:18 +02:00
Hans Mackowiak
5054223bb7 Create inquisitive_glimmer.txt (#6240) 2024-10-07 16:29:18 +00:00
Anthony Calosa
0594627833 fix pom entries 2024-10-07 17:00:40 +08:00
Anthony Calosa
fea65ddd4a update animated splash 2024-10-07 15:43:34 +08:00
Anthony Calosa
eada2c6d4f Merge branch 'master' into master2 2024-10-07 06:06:05 +08:00
Paul Hammerton
4b2640d412 Edition updates for rooms: DSC, DSK (#6239) 2024-10-06 19:46:31 +00:00
Hans Mackowiak
80b30d9a6a Room: First Spell Part (#6044)
* Room: First Spell 

----

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
Co-authored-by: TRT <>
Co-authored-by: Anthony Calosa <anthonycalosa@gmail.com>
2024-10-06 20:11:28 +02:00
Renato Filipe Vidal Santos
88006ebe85 Edit pile cleanup: part 2, folders 'h' to 'q' (#6219) 2024-10-06 17:14:01 +00:00
Renato Filipe Vidal Santos
7ca16f29eb Edit pile cleanup: part 1, folders 'a' to 'g' (#6218) 2024-10-06 16:20:08 +00:00
Anthony Calosa
4bb902dc31 splashscreen logo 2024-10-06 23:15:21 +08:00
Anthony Calosa
f4671133f3 add splashscreen for mobile-dev 2024-10-06 23:13:51 +08:00
Renato Filipe Vidal Santos
ae95ff2ea6 Edit pile cleanup: part 3, folders 'r' to 'u' & 'rebalanced' (#6220) 2024-10-06 14:08:23 +00:00
tool4ever
0829d02237 Display additional cost text during payment (#6233) 2024-10-06 14:08:11 +00:00
Renato Filipe Vidal Santos
5526621328 PCEL: 1996 World Champion (#6088)
* Add files via upload

* Update 1996_world_champion.txt

* Add files via upload

* Add files via upload
2024-10-06 13:25:15 +03:00
Anthony Calosa
5d959dc963 missing import 2024-10-06 16:03:08 +08:00
Anthony Calosa
4dfd344298 add JVM check 2024-10-06 15:29:51 +08:00
Anthony Calosa
4f819a9be3 update launch4j 2024-10-05 21:25:28 +08:00
Anthony Calosa
f40d3057b4 update info 2024-10-05 19:20:26 +08:00
Anthony Calosa
110575842e update enforce check 2024-10-05 17:41:13 +08:00
Anthony Calosa
a322dd45d8 update dependency 2024-10-05 13:13:58 +08:00
Anthony Calosa
f14de828ea mobile new summoning sickness icon 2024-10-05 12:20:16 +08:00
Anthony Calosa
5ce506c5ab update ImageView 2024-10-04 19:19:30 +08:00
Anthony Calosa
487f33e1e6 Merge branch 'master' into master2 2024-10-04 15:52:04 +08:00
kevlahnota
5affe7dd23 fix AI crash when minimum cards to discard exceeds than the valid cards
reported here: https://discord.com/channels/267367946135928833/1291545865814675578/1291545865814675578
2024-10-04 15:45:11 +08:00
Anthony Calosa
deff16b8f4 Merge branch 'master' into master2 2024-10-04 14:40:42 +08:00
kevlahnota
fea8855e0e prevent NPE 2024-10-04 11:33:36 +08:00
Anthony Calosa
650ee98c06 update standalone proguard 7.6.0
https://github.com/Guardsquare/proguard/releases/tag/v7.6
2024-10-03 20:44:14 +08:00
fanch
2debe4a42b Fix encoding 2024-10-03 08:58:52 +02:00
Anthony Calosa
1521f29ae3 Merge branch 'master' into master2 2024-10-03 10:24:22 +08:00
tool4ever
0971db66f4 Update screaming_nemesis.txt 2024-10-03 00:13:09 +00:00
Anthony Calosa
ee00fa3ec8 Merge branch 'master' into master2 2024-10-03 05:54:59 +08:00
fanch
12e31f4419 gui-desktop : Match : add a configurable keyboard shortcut to press OK/yes button from prompt and pop-up.
Allow to quickly pass phases and accept stack events.
Default to 'space bar'
2024-10-02 20:59:58 +02:00
Paul Hammerton
6a745c721b Merge pull request #6232 from Ayora29/artist
Update @Artist names in edition txt files
2024-10-02 19:25:59 +01:00
fanch
ab8a4be1ce Fix bad section move 2024-10-02 20:11:52 +02:00
Jetz72
84e6a61052 Fix ChangeZoneEffect ordering to library; Aetherspouts prompt (#5798)
* Fix ChangeZone ordering to library
Fix cards not showing up for Aetherspouts.
2024-10-02 15:39:51 +00:00
TwentyToedToad
436a3382b6 Sadistic Shell Game 2024-10-02 14:11:00 +00:00
fanch
95eea713ee Update @Artist names in edition txt files 2024-10-02 13:29:45 +02:00
Anthony Calosa
fdca506d20 Merge branch 'master' into master2 2024-10-02 18:48:53 +08:00
Anthony Calosa
1f5b90d998 Merge branch 'master' into master2 2024-10-02 16:51:04 +08:00
Paul Hammerton
3df291c1f5 Merge pull request #6231 from Ayora29/typos
Fix wrong rarity in edition txt files
2024-10-02 09:50:10 +01:00
tool4ever
9cbf0f8fc6 Update paranormal_analyst.txt 2024-10-02 07:48:27 +02:00
tool4ever
f336bd1284 Support second main (#6230) 2024-10-02 07:23:14 +02:00
fanch
abb6162e6f Revert CMB1 change in card names 2024-10-01 22:48:41 +02:00
Ayora29
d6aa7f3e35 Merge branch 'Card-Forge:master' into typos 2024-10-01 21:24:58 +02:00
fanch
589d50d553 More fixes to rarities 2024-10-01 21:14:40 +02:00
Renato Filipe Vidal Santos
301c000653 Update shichifukujin_dragon.txt (#6176) 2024-10-01 18:47:49 +00:00
Simisays
8d4ddec7da DSK 2 cards (#6210) 2024-10-01 18:38:50 +00:00
Ayora29
b502e0f8ac Restore Anthologies.txt L rarity for lands (#6229) 2024-10-01 18:38:15 +00:00
fanch
aa9f18f9fb Special rarities for masterpieces cards 2024-10-01 20:28:43 +02:00
fanch
345912fbae Fix wrong rarities 2024-10-01 20:23:49 +02:00
TwentyToedToad
c752f862ee Star Athlete (DSC) 2024-10-01 17:18:41 +00:00
Renato Filipe Vidal Santos
310cd28423 Edit pile cleanup: part 7, folders 'v' to 'z' & 'tokenscripts' (#6224) 2024-10-01 17:31:17 +02:00
fanch
e2a6e3b1b1 Add Scryfall code 2024-10-01 12:10:09 +02:00
fanch
d7ec1a225c Add Scryfall code 2024-10-01 11:59:35 +02:00
fanch
377d30dbf5 Restore Anthologies.txt L rarity for lands 2024-10-01 10:30:02 +02:00
Paul Hammerton
bd4843c6a3 Merge pull request #6228 from Ayora29/anthologies
Re-arange Anthologies edition txt file according to Scryfall
2024-10-01 09:14:29 +01:00
fanch
135f19e91a Re-arange Anthologies edition txt file according to Scryfall. Pictures still displayin correctly. 2024-10-01 09:31:50 +02:00
Agetian
4fcd6f577a LDA Update (better names for deck archetypes) (#6227)
* - Add new genetic decks (Standard, Modern) with metagame as of Bloomburrow

* - LDA Update
2024-10-01 09:44:32 +03:00
Anthony Calosa
36a1c0d5a3 Merge branch 'master' into master2 2024-10-01 06:12:26 +08:00
BigCrunch22
2691363738 Update Oracle text of some "main phase" related cards (#6216) 2024-09-30 18:09:56 +00:00
Anthony Calosa
55ec837b16 Merge branch 'master' into master2 2024-09-30 20:52:34 +08:00
Anthony Calosa
0cb589a905 update generated box display 2024-09-30 20:49:03 +08:00
Paul Hammerton
9e17cf433a Merge pull request #6214 from paulsnoops/edition_updates
Edition updates: SLD
2024-09-30 10:04:43 +01:00
Paul Hammerton
02ac064252 Edition updates: SLD 2024-09-30 09:55:23 +01:00
Anthony Calosa
61bf589f05 Merge branch 'master' into master2 2024-09-30 11:51:41 +08:00
tool4ever
a949a988a5 Fix GameStates starting with frozen stack if RE executes (#6213)
* Fix GameStates starting with frozen stack if RE executes

* Fix NPE when facedown
2024-09-29 20:18:35 +00:00
Jetz
c43015f05d Merge branch 'master' into code-cleanup
# Conflicts:
#	forge-game/src/main/java/forge/game/ForgeScript.java
2024-09-29 15:54:17 -04:00
Jetz
2e769ac279 Bug fix in RandomReservoir accumulator 2024-09-29 11:03:12 -04:00
Anthony Calosa
f9fc5b4213 fix some icon colors 2024-09-29 22:48:54 +08:00
Agetian
ea070a85aa - Add new genetic decks (Standard, Modern) with metagame as of Bloomburrow (#6212) 2024-09-29 17:29:34 +03:00
Anthony Calosa
683f9c2158 Merge branch 'master' into master2 2024-09-29 21:47:54 +08:00
Anthony Calosa
ea9aab7c4f mobile -> enable combat arrows on 2 player 2024-09-29 20:41:20 +08:00
Anthony Calosa
ddf009fed5 update skinlist 2024-09-29 15:34:52 +08:00
Anthony Calosa
7594888f8e SKIN Update 2024-09-29 15:25:11 +08:00
tool4ever
86dc3a4d5e Some cleanup (#6211)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2024-09-28 19:04:41 +03:00
Paul Hammerton
6169285cdb Merge pull request #6183 from Ayora29/master
Reorder card entries in 111 edition files.
2024-09-27 19:17:47 +01:00
Ayora29
ab7037f59c Merge branch 'Card-Forge:master' into master 2024-09-27 19:49:28 +02:00
tool4ever
cb4e0e5721 Some cleanup (#6209) 2024-09-27 18:59:27 +02:00
Hans Mackowiak
ac335a6b80 Merge pull request #6204 from Agetian/master
Add LDA information for Bloomburrow metagame (Standard, Modern)
2024-09-27 18:57:19 +02:00
tool4ever
c5aaf75838 Update enter_the_enigma.txt (#6206)
Closes #6202
2024-09-27 15:22:32 +02:00
Ayora29
b104249205 Add WithDifferentPowers$ to DigEffect + "Rip, Spawn Hunter" card (#6208) 2024-09-27 15:22:16 +02:00
Fulgur14
ec7314673e 10 DSK cards 2024-09-27 14:53:52 +02:00
Simisays
69985e4c2f Update myra_the_magnificent.txt (#6203) 2024-09-27 14:22:42 +02:00
Agetian
4622441ec8 - Add LDA information for Bloomburrow metagame (Standard, Modern). 2024-09-27 14:59:43 +03:00
Anthony Calosa
1f6f14cb3c remove unused property 2024-09-27 10:41:08 +08:00
Anthony Calosa
83e28d65f6 update android pom, proguard 2024-09-27 06:37:44 +08:00
tool4ever
ba4682e038 Update drop_tower.txt 2024-09-26 18:00:47 +00:00
Jetz
474be7bd67 Fix ConcurrentModificationException 2024-09-26 12:01:17 -04:00
Anthony Calosa
352967c8b8 update proguard, fix expected stack map table for method with non-linear control flow 2024-09-26 22:40:17 +08:00
Jetz
b35981218a Merge branch 'master' into code-cleanup
# Conflicts:
#	forge-game/src/main/java/forge/game/ability/effects/ManifestBaseEffect.java
2024-09-26 10:21:19 -04:00
Jetz
871947a540 Guava migration - Optimize imports 2024-09-26 09:59:26 -04:00
Jetz
6a04fcd500 Guava migration - Remove migration scaffold 2024-09-26 09:36:50 -04:00
Anthony Calosa
3a41f9d492 update more dependency, update CardMockTestCase 2024-09-26 19:36:59 +08:00
Anthony Calosa
f5949b9413 Merge branch 'master' into master2 2024-09-26 16:07:00 +08:00
Anthony Calosa
67cbd1444c update info 2024-09-26 16:02:50 +08:00
tool4ever
941a1129e5 Make Myriad optional for each player again (#6191)
* Make Myriad optional for each player again

* Fix scripts

* Fix NPE due to not removing empty shards

---------

Co-authored-by: TRT <>
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2024-09-26 08:52:08 +03:00
Anthony Calosa
a7c69da4e6 fix tests 2024-09-26 13:17:02 +08:00
Anthony Calosa
c07e3b99a3 update argsfor Java 17 2024-09-26 12:28:55 +08:00
Anthony Calosa
56400d4444 JAVA17 Update 2024-09-26 11:52:42 +08:00
Fulgur14
2ac31bf45c Rename monstruous_emergence.txt to monstrous_emergence.txt (#6197) 2024-09-25 18:19:53 +00:00
Michael Lo
786d6834ef Fix valiant cards only triggering once per game rather than once per turn (#6196) 2024-09-25 14:58:28 +00:00
Jetz
0278f5817b Guava migration - Create IterableUtil to house iterable helper methods dependent on Java predicates 2024-09-25 09:26:41 -04:00
Jetz
f636910ebb Guava migration - Rename StreamUtils -> StreamUtil for consistency 2024-09-25 09:01:46 -04:00
Jetz
1395baa2ff Guava migration - Fix build error 2024-09-25 08:59:21 -04:00
Jetz
d01c4e056b Guava migration - Remove unused imports 2024-09-25 08:48:28 -04:00
Jetz
52112e671c Guava migration - Slight cleanup 2024-09-25 08:46:07 -04:00
Ayora29
68db59f080 New dsk card : Monstrous Emergence (#6194) 2024-09-25 11:01:18 +00:00
tool4ever
fb5d9a0b56 Update valgavoths_onslaught.txt (#6187) 2024-09-25 08:02:36 +00:00
Agetian
35cd7d0f4e - Add puzzle PS_BLB4, fix GameState support for class level. (#6195) 2024-09-25 08:02:22 +00:00
Anthony Calosa
3577f57419 Merge branch 'master' into master2 2024-09-25 06:27:21 +08:00
Jetz
a57bab1dac Guava migration - Remove single use Predicate implementations
Remove unused parameters of other predicates
2024-09-24 09:33:23 -04:00
kevlahnota
dd5aa11742 Update a_premonition_of_your_demise.txt 2024-09-24 20:38:59 +08:00
Anthony Calosa
7725d9e042 Merge branch 'master' into master2 2024-09-24 08:56:21 +08:00
Paul Hammerton
6334d22bf0 Merge pull request #6192 from paulsnoops/cmdr_bans_23_9
Commander Banned and Restricted September 23, 2024
2024-09-23 17:54:06 +01:00
Paul Hammerton
3df6319efa Commander Banned and Restricted September 23, 2024 2024-09-23 17:46:46 +01:00
Ayora29
1cd976344a Merge branch 'Card-Forge:master' into master 2024-09-23 09:49:00 +02:00
Anthony Calosa
c6d334ad69 update 2024-09-23 11:10:48 +08:00
Anthony Calosa
bd8ff97dc2 Merge branch 'master' into master2 2024-09-23 09:48:00 +08:00
Jetz
1af22ff4b6 Guava migration - Remove CollectionSuppliers 2024-09-22 16:54:49 -04:00
Jetz
cb4c64ce2c Guava migration - Added PaperCard predicates for commonly forwarded CardRules predicates 2024-09-22 16:48:08 -04:00
Jetz
d173c22688 Fixed some predicate logic issues. 2024-09-22 16:12:04 -04:00
Jetz
cbcfa8f884 Guava migration - Replace select usages of Aggregates methods 2024-09-22 15:56:48 -04:00
Jetz
e739dad1ba Guava migration - Slim down quest reward logic 2024-09-22 14:48:20 -04:00
Jetz
05d58c2fce Guava migration - Add StreamUtils.random collectors 2024-09-22 14:47:57 -04:00
loud1990
2b41b1cbe8 Fixed 2 DSK cards (#6186)
Fixed Trial of Agony which wasn't dealing the damage, and Disturbing Mirth which was only allowing you to sacrifice another enchantment (not a creature).
2024-09-22 20:56:17 +03:00
tool4ever
aebde7a1d0 Fix NPE with Starforged Sword (#6188)
* Fix NPE

* Fix The Lord of Pain

---------

Co-authored-by: TRT <>
2024-09-22 20:54:02 +03:00
Jetz
c2f72bb3c2 Guava migration - Stream support for FCollectionView 2024-09-22 11:05:19 -04:00
Anthony Calosa
34c6258d26 update maven 2024-09-22 08:53:13 +08:00
fanch
3825904d42 collector number stating with F\d are considered numeric only 2024-09-21 21:44:40 +02:00
fanch
59a8050a5f Reorder card entries in 111 edition files.
No card add, no card remove. Only reorder, numerically then alphabetically.
2024-09-21 15:31:31 +02:00
Anthony Calosa
ca2110c2c2 Merge branch 'master' into master2 2024-09-21 09:16:36 +08:00
tool4ever
11a7f7b271 Script cleanup (#6180)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
2024-09-20 19:29:27 +03:00
Renato Filipe Vidal Santos
a67ab2818b Fixes gleaned from notes: pass #3 (#6179) 2024-09-20 14:59:41 +00:00
Anthony Calosa
c1f9c766b2 Merge branch 'master' into master2 2024-09-20 20:19:12 +08:00
tool4ever
7a192a6873 Fix Valiant triggers failing if another player targets first (#6178) 2024-09-20 11:53:07 +02:00
Anthony Calosa
25435c847b update sign tool 2024-09-20 06:55:14 +08:00
Anthony Calosa
f53bc65f96 Merge branch 'master' into master2 2024-09-19 22:06:29 +08:00
Jetz
c91334029a Guava migration - Refactor edition type checks 2024-09-19 09:20:02 -04:00
Hans Mackowiak
869db7febb Impending NonCreature as StaticAbility (#6177) 2024-09-19 10:36:13 +03:00
tool4ever
86294108eb Update grist_voracious_larva_grist_the_plague_swarm.txt 2024-09-19 09:27:56 +02:00
Renato Filipe Vidal Santos
ac807c4766 Fixes gleaned from notes: pass #2, Cataclysm-like and other "choose to keep" effects. (#6165)
* Add files via upload

* Update slaughter_the_strong.txt

* Update incriminate.txt

* Update a-incriminate.txt

* Update phyrexian_dreadnought.txt

* Update killing_wave.txt

* Update global_ruin.txt

* Update barrins_spite.txt

* Update szats_will.txt

* Update soul_shatter.txt

* Update slaughter_the_strong.txt

* Update shadowgrange_archfiend.txt

* Update professor_onyx.txt

* Update phyrexian_dreadnought.txt

* Update myrkuls_edict.txt

* Update gixs_command.txt

* Update flare_of_malice.txt

* Update demonic_hordes.txt

* Update crackling_doom.txt

* Update revival_experiment.txt

* Update perilous_predicament.txt

* Update regnas_sanction.txt

* Update catch_release.txt

* Update regnas_sanction.txt

* Update regnas_sanction.txt

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2024-09-19 06:56:29 +03:00
Anthony Calosa
fd4ba1397a Merge branch 'master' into master2 2024-09-18 21:41:52 +08:00
kevlahnota
e09c09b924 Merge pull request #6173 from tool4ever/fix18
Fix RE choice for different sources
2024-09-18 19:18:44 +08:00
tool4EvEr
ee3c8173e1 Fix RE choice for different sources 2024-09-18 09:37:11 +02:00
tool4ever
daf1a891c0 Update zndrsplts_judgment.txt 2024-09-18 07:11:28 +00:00
tool4ever
b396e780cf Fix scripts (#6169) 2024-09-18 10:08:58 +03:00
Fulgur14
7b94f07fa8 DSK cards from misplaced PR (#6157) 2024-09-18 07:25:08 +02:00
Glorax
dd0bd28d2c Erratic Apparition fix (#6170) 2024-09-18 07:24:43 +02:00
Fulgur14
95dd06e55f Ancient Cellarspawn - incomplete, might need support (#6123)
* Ancient Cellarspawn - incomplete, might need support

* Support Ancient Cellarspawn

---------

Co-authored-by: TRT <>
2024-09-18 08:18:06 +03:00
Anthony Calosa
0dde987367 update jaxb-api -> fix illegal access warning 2024-09-18 10:56:36 +08:00
Anthony Calosa
fd7da13f15 Merge branch 'master' into master2 2024-09-18 06:01:03 +08:00
Glorax
922a0c21be Overgrown Zealot fix (#6167) 2024-09-17 20:48:07 +00:00
Glorax
05bf665f52 Spineseeker Centipede fix (#6166) 2024-09-17 20:21:05 +00:00
Anthony Calosa
5099d0f24f set landscape sensor from android 11 onwards 2024-09-17 20:16:29 +08:00
Anthony Calosa
bbc3d5639c update maven, dependency plugins 2024-09-17 20:05:37 +08:00
Anthony Calosa
de9823ab71 Merge branch 'master' into master2 2024-09-17 16:12:19 +08:00
Paul Hammerton
90d550facc Merge pull request #6163 from paulsnoops/dsk_formats
Format updates for DSK & DSC
2024-09-17 08:56:04 +01:00
Paul Hammerton
120d435424 Format updates for DSK & DSC 2024-09-17 08:51:21 +01:00
Paul Hammerton
e204ea751d Merge pull request #6162 from paulsnoops/edition_updates
Edition updates: SCH, SLD
2024-09-17 08:35:55 +01:00
Paul Hammerton
5d389ad62c Edition updates: SCH, SLD 2024-09-17 08:32:45 +01:00
Anthony Calosa
0c248d76eb Merge branch 'master' into master2 2024-09-17 15:13:11 +08:00
kevlahnota
663bde22ac Add ReplacementEffectView, StaticAbility View for Netplay Dialog 2024-09-17 14:58:43 +08:00
tool4ever
0a4cff5adc Update suspended_sentence.txt 2024-09-17 07:38:06 +02:00
Fulgur14
7c7c1fda01 Fulgur14 patch 191321 (#6158) 2024-09-16 20:13:43 +00:00
tool4ever
4c7c7edbf1 Update only_i_know_what_awaits.txt 2024-09-16 15:34:27 +00:00
Jetz
7ab333a60a Guava migration - ItemPool collector 2024-09-16 09:10:21 -04:00
Anthony Calosa
21540668c3 Merge branch 'master' into master2 2024-09-16 19:42:48 +08:00
kevlahnota
79b1c3c9fd Update PlayerControllerHuman.java
show more info on choice list on non network game
2024-09-16 19:38:30 +08:00
Hans Mackowiak
7b9e2a6735 ManifestDread as separate Effect (#6151) 2024-09-16 12:36:31 +02:00
Anthony Calosa
c04055fff0 Merge branch 'master' into master2 2024-09-16 16:19:52 +08:00
Fulgur14
6e3c17a2a8 18 mostly leaked DSK/DSC cards (plus one token) (#6131) 2024-09-16 10:17:22 +02:00
kevlahnota
512b3208ae Merge pull request #6156 from Card-Forge/kevlahnota-patch-1
fix netplay crash
2024-09-16 16:09:33 +08:00
kevlahnota
c4d943750c fix netplay crash
-closes issue #6145
2024-09-16 16:04:19 +08:00
Fulgur14
a63f87e5be Update all_shall_smolder_in_my_wake.txt (#6155) 2024-09-16 09:58:15 +02:00
Anthony Calosa
9fc93847b3 Merge branch 'master' into master2 2024-09-16 13:52:07 +08:00
kevlahnota
cb325996c9 prevent NPE 2024-09-16 13:34:48 +08:00
tool4ever
419ca27328 Update commander_liara_portyr.txt (#6152) 2024-09-16 06:53:15 +03:00
Anthony Calosa
116720a10f update compiler release 2024-09-16 08:43:03 +08:00
Jetz
ae251372c1 Guava migration - Cleanup 2024-09-15 18:18:27 -04:00
Jetz
8189f134eb Merge branch 'master' into code-cleanup
# Conflicts:
#	forge-ai/src/main/java/forge/ai/AiAttackController.java
#	forge-ai/src/main/java/forge/ai/ComputerUtilCard.java
#	forge-core/src/main/java/forge/item/IPaperCard.java
#	forge-game/src/main/java/forge/game/ForgeScript.java
#	forge-game/src/main/java/forge/game/ability/effects/ManifestBaseEffect.java
#	forge-game/src/main/java/forge/game/card/CardState.java
#	forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java
#	forge-game/src/main/java/forge/game/trigger/Trigger.java
2024-09-15 18:11:24 -04:00
Jetz
1644e7427e Guava migration - Replace select usages of Iterables.transform 2024-09-15 17:33:18 -04:00
Jetz
76aa19622e Guava migration - Replace select usages of Iterables.filter 2024-09-15 17:16:24 -04:00
Chris H
b85b6cac6e Update victor_valgavoths_seneschal.txt 2024-09-15 16:37:35 -04:00
tool4ever
cbfcbfa8c5 Fix Mutate + Unexpectedly Absent (#6150) 2024-09-15 17:05:14 +00:00
Fulgur14
0ab14fdb37 2 DSC cards + 6 schemes (#6136) 2024-09-15 14:21:51 +00:00
tool4ever
91e952da63 Fix optional shuffle into Library cases (#6147) 2024-09-15 14:21:39 +00:00
Anthony Calosa
ef6716c5f6 update exec-plugin 2024-09-15 21:19:16 +08:00
Anthony Calosa
99c235eb62 Merge branch 'master' into master2 2024-09-15 18:33:40 +08:00
Paul Hammerton
653bf46404 Merge pull request #6148 from paulsnoops/edition_updates
Edition updates: DSC
2024-09-15 11:31:24 +01:00
Paul Hammerton
148a13c9cf Edition updates: DSC 2024-09-15 11:28:19 +01:00
Fulgur14
a60f3f84e0 2 DSK cards, some DSC cards, 5 Schemes (#6122) 2024-09-15 09:18:24 +00:00
tool4ever
f1ff92801f Fix Undying not triggering when dying from SBA (#6146) 2024-09-15 08:15:54 +00:00
Anthony Calosa
dd11d04452 Merge branch 'master' into master2 2024-09-15 16:09:52 +08:00
Fulgur14
445508d3ab 5 DSC Schemes (#6134)
* Update amped_raptor.txt

* Add files via upload

* Update i_call_for_slaughter.txt

* Update reality_is_mine_to_control.txt

* Update you_exist_only_to_amuse.txt

* Update your_nightmares_are_delicious.txt

* Update your_nightmares_are_delicious.txt

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2024-09-15 07:24:43 +03:00
Anthony Calosa
372c3cf25e Merge branch 'master' into master2 2024-09-15 11:48:45 +08:00
Glorax
813588b897 Update coordinated_clobbering.txt (#6144) 2024-09-14 20:48:39 +00:00
tool4ever
21c34b552d Fix Frankenstein's Monster (#6143) 2024-09-14 19:47:40 +02:00
Anthony Calosa
b6a0540b9b Merge branch 'master' into master2 2024-09-14 22:21:14 +08:00
tool4ever
d303bb122c Update your_own_face_mocks_you.txt 2024-09-14 10:17:37 +00:00
Paul Hammerton
12f937e4ca Merge pull request #6142 from paulsnoops/edition_updates
Edition updates: DSC, DSK
2024-09-14 10:52:50 +01:00
Paul Hammerton
df868df7cd Edition updates: DSC, DSK 2024-09-14 10:49:45 +01:00
Renato Filipe Vidal Santos
2db3e4d7ba Update ogre_battlecaster.txt (#6140) 2024-09-14 09:40:23 +00:00
Paul Hammerton
78a134b2df Fix Break Down the Door, Wickerfolk Thresher (#6141) 2024-09-14 07:51:24 +00:00
Anthony Calosa
74eebf4081 move signer to tools 2024-09-14 08:43:13 +08:00
Anthony Calosa
edc3af50af Merge branch 'master' into master2 2024-09-14 08:08:00 +08:00
Anthony Calosa
ca9f2dad48 update manifest, add uber-apk-signer 2024-09-14 07:58:48 +08:00
Anthony Calosa
1918770d3f update to sdk 33, update v2 signer-modded 2024-09-14 07:55:01 +08:00
Renato Filipe Vidal Santos
52ae896280 Update season_of_gathering.txt (#6139) 2024-09-13 19:37:07 +00:00
Fulgur14
2ac557c46e 23 DSK cards (+one Scheme) (#6112) 2024-09-13 19:36:58 +00:00
Fulgur14
d8c45e7d62 Seized from Slumber (DSK) (#6137)
This should be the last new card, all unimplemented cards are now in the project.
2024-09-13 20:01:44 +03:00
Paul Hammerton
5143f3ade0 Merge pull request #6138 from paulsnoops/edition_updates
Edition updates: DSC, DSK
2024-09-13 17:30:48 +01:00
Paul Hammerton
33e733559e fix_test 2024-09-13 17:27:43 +01:00
Paul Hammerton
a2d653a0fc Edition updates: DSC, DSK 2024-09-13 17:22:12 +01:00
Anthony Calosa
368ef9d903 Merge branch 'master' into master2 2024-09-13 21:20:01 +08:00
Fulgur14
e76eb919d9 Violent Urge (DSK) (#6132) 2024-09-13 08:16:38 +03:00
Anthony Calosa
b9a36bd039 Merge branch 'master' into master2 2024-09-13 09:31:25 +08:00
Paul Hammerton
486a93e4b1 Merge pull request #6133 from paulsnoops/edition_updates
Edition updates: DSK
2024-09-12 17:41:49 +01:00
Paul Hammerton
f87c24b9f5 Edition updates: DSK 2024-09-12 17:26:30 +01:00
Anthony Calosa
f442189868 update SplashScreen 2024-09-12 20:06:58 +08:00
Fulgur14
7cf11e21ae Add files via upload (#6125) 2024-09-12 08:38:52 +03:00
Fulgur14
0a58e8a354 Fear of Exposure and Killer's Mask (DSK) (#6128) 2024-09-12 08:38:47 +03:00
Anthony Calosa
83b653a0bb Merge branch 'master' into master2 2024-09-12 07:12:34 +08:00
Paul Hammerton
82d3c549f2 Merge pull request #6130 from paulsnoops/edition_updates
Edition updates: DSC, DSK
2024-09-11 17:55:51 +01:00
Paul Hammerton
f14d2ca26f Edition updates: DSC, DSK 2024-09-11 17:48:41 +01:00
Hans Mackowiak
9efa29cbf0 Teferi without PlayerKeyword 2024-09-11 12:51:54 +02:00
Anthony Calosa
b683f2d64e Merge branch 'master' into master2 2024-09-11 18:42:17 +08:00
Fulgur14
d76b798526 4 DSK + 7 DSC cards (#6099)
* Support The Tale of Tamiyo

* Support Kianne, Corrupted Memory
2024-09-11 12:24:44 +02:00
tool4ever
bd1f48d530 Fix MDFC NPE (#6121)
Co-authored-by: TRT <>
2024-09-11 10:11:42 +03:00
Anthony Calosa
d6b9ad525d Merge branch 'master' into master2 2024-09-10 23:47:33 +08:00
Anthony Calosa
78f3d3d74d update more dependency 2024-09-10 23:39:51 +08:00
Fulgur14
138c866b12 Add files via upload (#6118) 2024-09-10 17:11:22 +03:00
Fulgur14
8aa398f7eb 8 DSK cards (Marvin, Murderous Mimic and audience) (#6117)
* 8 DSK cards (Marvin, Murderous Mimic and audience)

* Update optimistic_scavenger.txt

* Update rootwise_survivor.txt

* Update rootwise_survivor.txt
2024-09-10 17:11:11 +03:00
Paul Hammerton
246a49e642 Merge pull request #6120 from paulsnoops/edition_updates
Edition updates: DSK
2024-09-10 14:33:35 +01:00
Paul Hammerton
56c4ffa39b Edition updates: DSK 2024-09-10 14:30:38 +01:00
Anthony Calosa
d7c106ba7e Merge branch 'master' into master2 2024-09-10 19:52:07 +08:00
Hans Mackowiak
e1c794c640 Player: use LifeReduced CantHappen for Archon of Coronation (#6116)
* Player: use LifeReduced CantHappen for Archon of Coronation
2024-09-10 12:56:31 +02:00
Fulgur14
ebe9fbebe4 Valgavoth's Onslaught (#6119) 2024-09-10 12:42:06 +02:00
Anthony Calosa
e623e02c53 update network check 2024-09-10 17:56:24 +08:00
Anthony Calosa
bfca199175 Merge branch 'master' into master2 2024-09-10 16:37:59 +08:00
tool4ever
69158e01ba Support for Valgavoth's Onslaught (#6114) 2024-09-10 09:58:46 +02:00
Anthony Calosa
822676dcfd Merge branch 'master' into master2 2024-09-10 10:32:34 +08:00
Chris H
4170ba7b32 Update bashful_beastie.txt (#6113) 2024-09-09 21:23:53 +02:00
Paul Hammerton
e061766cfc Merge pull request #6111 from paulsnoops/edition_updates
Edition updates: DSC, DSK
2024-09-09 17:40:46 +01:00
Paul Hammerton
b5fa9b81f6 Edition updates: DSC, DSK 2024-09-09 17:35:25 +01:00
Anthony Calosa
b790455866 Merge branch 'master' into master2 2024-09-09 21:05:12 +08:00
Anthony Calosa
c40edf88e9 revert to sdk 29 (Android 10) until the v2 signing works on android 11 above 2024-09-09 21:04:35 +08:00
Fulgur14
4fe3e51e62 Arabella, Abandoned Doll (DSK) (#6110) 2024-09-09 12:38:39 +02:00
Hans Mackowiak
5ff515b03b Drop Java 8 Test (#6109) 2024-09-09 10:38:44 +02:00
Anthony Calosa
7ea3e6b7b4 Merge branch 'master' into master2 2024-09-09 14:39:30 +08:00
Anthony Calosa
21b6e156ad update 2024-09-09 14:22:54 +08:00
Anthony Calosa
af89e52213 update target sdk and build tools to 33 2024-09-09 14:18:37 +08:00
Hans Mackowiak
75bbbfe6c8 Update PlayerPredicates.java
CANT_WIN not used anymore, use player.cantWin()
2024-09-09 06:59:15 +02:00
Jetz
cf68a75c03 Guava migration - Inline Iterables.all (Collection overload) 2024-09-08 15:29:41 -04:00
Jetz
7e3bb81428 Guava migration - Inline Iterables.any (Collection overload) 2024-09-08 15:27:36 -04:00
Jetz
b4015af203 Guava migration - Inline Iterables.any and Iterables.all (FCollectionView overloads) 2024-09-08 14:56:05 -04:00
Jetz
47164153f4 Guava migration - Add helper methods for FCollectionView anyMatch and allMatch 2024-09-08 14:21:43 -04:00
tool4ever
d6bc1788d9 Fix Enhanced Surveillance (#6104) 2024-09-08 14:59:58 +00:00
Anthony Calosa
a8f6842e21 update some dependency 2024-09-08 21:30:29 +08:00
Anthony Calosa
3e5b239062 Merge branch 'master' into master2 2024-09-08 20:58:32 +08:00
Anthony Calosa
09b5ee8ac5 update android builds to SDK 29, use Java 11 2024-09-08 20:44:23 +08:00
Fulgur14
5f3e531d2e 4 DSK cards + some Schemes (#6101) 2024-09-08 12:34:24 +00:00
Paul Hammerton
036365e984 Merge pull request #6102 from paulsnoops/edition_updates
Edition updates: DSC, DSK
2024-09-08 10:42:23 +01:00
Paul Hammerton
6813e80e1e Edition updates: DSC, DSK 2024-09-08 10:37:44 +01:00
Paul Hammerton
050e3d1eb6 Fix Erratic Apparition 2024-09-07 15:43:26 -04:00
Fulgur14
0408b3149e Under the Skin (DSK) (#6098) 2024-09-07 14:58:06 +00:00
Fulgur14
cce6ccfd01 13 DSK cards (Diversion Specialist and friends) (#6084) 2024-09-07 14:20:48 +00:00
Hans Mackowiak
4862071db7 Keyword: link StaticAbility into it (#6079)
* Keyword: link StaticAbility into it

* fix getKeywordMagnitude to check for StaticAbility
2024-09-07 17:19:57 +03:00
Fulgur14
e7b05b2c9b 7 DSK cards (Boilerbilges Ripper and victims) (#6092)
* 7 DSK cards (Boilerbilges Ripper and victims)

* Update glimmerburst.txt
2024-09-07 17:19:29 +03:00
Hans Mackowiak
f792a5b79e Impending: use Effect for Last Time counter removed (#6096) 2024-09-07 17:19:17 +03:00
Fulgur14
73adb8b2d9 Eerie DSK cards (#6063)
* Eerie DSK cards

* Add files via upload

* Update zimone_mystery_unraveler.txt

* Add files via upload

* Update stalked_researcher.txt

* Update victor_valgavoths_seneschal.txt
2024-09-07 17:19:00 +03:00
tool4ever
7a1fa8b1a4 Update cloudsteel_kirin.txt 2024-09-07 13:48:18 +00:00
Fulgur14
b6aeb14e57 Growing Dread -- might need support (#6083)
* Bonus Hallow fix / old revert
2024-09-07 09:27:04 +00:00
Paul Hammerton
5aa0832e7b Merge pull request #6095 from paulsnoops/edition_updates
Edition updates: DSK
2024-09-07 10:13:31 +01:00
Paul Hammerton
7d2f1ba193 Edition updates: DSK 2024-09-07 10:10:30 +01:00
Hans Mackowiak
d2e3175961 Add Room Helper functions (#6093) 2024-09-07 10:55:10 +02:00
kevlahnota
07cc3ef58f Update it-IT.properties
try to fix UnknownFormatConversionException
Conversion = 'm'
2024-09-07 15:58:34 +08:00
tool4ever
825296eaf2 Dread fix (#6094) 2024-09-07 07:26:10 +00:00
Fulgur14
af519dc62d Lionheart Glimmer (DSK) (#6087) 2024-09-07 07:11:54 +00:00
kevlahnota
86b142099d Merge pull request #6090 from Card-Forge/kevlahnota-patch-1
Update nahiri_heir_of_the_ancients.txt
2024-09-07 09:21:30 +08:00
kevlahnota
8b5ad4ebe7 Update nahiri_heir_of_the_ancients.txt 2024-09-07 09:20:58 +08:00
kevlahnota
5b3e7eff63 Merge pull request #6089 from kevlahnota/master2
check awaitNextInputTimer
2024-09-07 08:33:43 +08:00
Jetz
dfac93a668 Guava migration - Inline Iterables.find (Collection overload) 2024-09-06 20:33:37 -04:00
Jetz
36cff7e401 Guava migration - Inline Iterables.removeIf (Collection overload) 2024-09-06 20:32:22 -04:00
Anthony Calosa
f61fa59566 check awaitNextInputTimer 2024-09-07 08:30:24 +08:00
Jetz
8489866461 Guava migration - Inline Iterables.contains (Collection overload) 2024-09-06 20:23:14 -04:00
Jetz
79a640ca8a Guava migration - Cleanup imports 2024-09-06 20:20:06 -04:00
Jetz
d9c54aa9a1 Guava migration - Inline Iterables.addAll (Collection overload) 2024-09-06 20:18:49 -04:00
Jetz
c1de0dee6a Guava migration - Inline Iterables.removeAll (Collection overload) 2024-09-06 19:58:24 -04:00
Jetz
efe55efa43 Guava migration - Inline Iterables.isEmpty (Collection overload) 2024-09-06 19:57:22 -04:00
Jetz
4c8a94b18a Guava migration - Inline Predicates.compose 2024-09-06 19:50:14 -04:00
Jetz
6e3726ee79 Guava migration - Remove unused imports 2024-09-06 19:23:54 -04:00
Jetz
734bcec8bf Guava migration - Helper method for composing CardRules into PaperCards 2024-09-06 19:17:28 -04:00
Jetz
85f80bb5f1 Guava migration - Explode Predicate "Presets" subclasses 2024-09-06 18:10:24 -04:00
tool4ever
07154c1265 Update tin_street_gossip.txt 2024-09-06 17:48:45 +00:00
Fulgur14
73f2a1a041 Overgrown Zealot (DSK) 2024-09-06 17:46:56 +00:00
tool4ever
d2af4c2bcb Fix intrinsic ETB replacement not working if card enters from sideboard (#6082) 2024-09-06 16:40:11 +00:00
tool4ever
45c70b08fd Support for Overgrown Zealot (#6085) 2024-09-06 16:40:01 +00:00
tool4ever
1049f9c885 Update kirtars_wrath.txt 2024-09-06 14:31:48 +00:00
Jetz
0bf04c2fc8 Guava migration - Add common helper predicates 2024-09-06 09:24:32 -04:00
kevlahnota
46c1e5db72 Merge pull request #6081 from kevlahnota/master2
Update Adventure BG files
2024-09-06 20:12:05 +08:00
tool4ever
c7841c6e56 Update threats_around_every_corner.txt 2024-09-06 12:10:16 +00:00
Anthony Calosa
1781eb2ba3 Update Adventure BG files 2024-09-06 20:05:27 +08:00
Fulgur14
d20a75d171 3 DSK cards (Omnivorous Flytrap and friends) (#6080) 2024-09-06 08:26:41 +02:00
Fulgur14
ba4defbb53 Irreverent Gremlin (#6078)
* Add files via upload

* Update irreverent_gremlin.txt
2024-09-06 08:52:16 +03:00
Fulgur14
faadf62e2a 8 DSK cards (#6076) 2024-09-05 17:03:32 +00:00
Paul Hammerton
dbf6fc0134 Merge pull request #6077 from paulsnoops/edition_updates
Edition updates: DSK
2024-09-05 18:01:49 +01:00
Paul Hammerton
b1e6920e3f Edition updates: DSK 2024-09-05 17:57:27 +01:00
Fulgur14
0231e68d85 6 DSK cards (#6067) 2024-09-05 16:38:02 +00:00
Fulgur14
e8b98039ca Orphans of the Wheat (#6073) 2024-09-05 15:13:00 +00:00
Fulgur14
14262404b8 5 DSK cards (#6065)
* 5 DSK cards

* Update shrewd_storyteller.txt

* Update fear_of_burning_alive.txt
2024-09-05 18:06:17 +03:00
Fulgur14
b8a70ef9df More DSK cards (#6059)
* Update veteran_survivor.txt

* Update carrionette.txt

* Add files via upload

* Update titania_voice_of_gaea_titania_gaea_incarnate.txt

* Add files via upload

* Update carrionette.txt

* Update titania_voice_of_gaea_titania_gaea_incarnate.txt

* Update haunted_screen.txt

* Update haunted_screen.txt

* Update overlord_of_the_boilerbilges.txt

* Update savior_of_the_small.txt

* Update untimely_malfunction.txt

* Update savior_of_the_small.txt

* Update savior_of_the_small.txt

* Update insidious_fungus.txt
2024-09-05 18:06:03 +03:00
Fulgur14
dd2f9cad54 Unstoppable Slasher and Dashing Bloodsucker (#6069)
* Unstoppable Slasher and Dashing Bloodsucker

* Add files via upload
2024-09-05 18:04:54 +03:00
Fulgur14
1b7405dffa 19 DSK cards (#6054)
* 19 DSK cards

Ghost Vacuum has a weird bug: if AI uses the second ability, I get a window where I can order how the cards should enter the battlefield.

* Add files via upload

* Update grievous_wound.txt

* Update meathook_massacre_ii.txt

* Update say_its_name.txt

* Update say_its_name.txt

* Update drag_to_the_roots.txt

* Update patchwork_beastie.txt

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2024-09-05 18:04:44 +03:00
tool4ever
9acbcb710e Fix self-replacement scripts (#6041)
* Fix self-replacement scripts

* Fix scripts to use current value on resolve

* Clean up

* Try to get right controller when ordering

* Fix corner case

* Fix script

* Revert for now

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2024-09-05 18:03:38 +03:00
Kay Schwenk
a396312deb Fixed typos in Heartflame Slash and Tyr's Blessing (#6074) 2024-09-05 15:00:35 +00:00
tool4ever
30af288318 Fix transformed backside cast failing when some AltCost apply (#6070) 2024-09-05 13:34:17 +00:00
tool4ever
1f8317dae9 Fix SVar fallback for Splice (#6072) 2024-09-05 13:33:01 +00:00
Hans Mackowiak
32510dd118 Update dog_umbra.txt
Closes #6061
2024-09-05 14:37:44 +02:00
Chris H
9a5f0b9ff1 Fix MH3 generation 2024-09-05 07:13:13 -04:00
tool4ever
53719aeab7 Zimone, All-Questioning and support (#6040) 2024-09-05 12:41:21 +02:00
tool4ever
dbaf9451c5 Fix Pawprint in Compleated (#6060) 2024-09-04 17:54:28 +00:00
Hans Mackowiak
a9755129f2 TriggerFullyUnlock: Trigger used for Eerie (#6052) 2024-09-04 20:32:46 +03:00
Paul Hammerton
1ced41dded Merge pull request #6062 from paulsnoops/edition_updates
Edition updates: DSK, SPG
2024-09-04 18:19:50 +01:00
Paul Hammerton
8a3ce730c6 Edition updates: DSK, SPG 2024-09-04 18:13:17 +01:00
tool4ever
1ee37020dd Hauntwoods Shrieker and support (#6058) 2024-09-04 16:13:39 +00:00
Fulgur14
959bfe8d31 Added cards with manifest dread (#6057)
* Added cards with manifest dread

* Add files via upload

* Update disturbing_mirth.txt

* Update zimone_mystery_unraveler.txt

* Update turn_inside_out.txt
2024-09-04 15:01:58 +02:00
Fulgur14
4a0a4c110a 3 new DSK cards (#6034) 2024-09-04 10:30:27 +00:00
Fulgur14
cf4879c040 Balustrade Wurm (DSK) (#6056) 2024-09-04 13:03:23 +03:00
Fulgur14
5d1d6cab14 Niko, Light of Hope -- needs a bit more (#6053)
* Niko, Light of Hope -- needs a bit more

* Fix script

* Add support

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2024-09-04 13:03:08 +03:00
Fulgur14
14e2fa9ff5 7 DSK cards from Card Gallery (#6048)
* 7 DSK cards from Card Gallery

* Update acrobatic_cheerleader.txt

* Update fanatic_of_the_harrowing.txt

* Update acrobatic_cheerleader.txt

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2024-09-04 13:02:50 +03:00
tool4EvEr
9e30bd943c Manifest Dread 2024-09-04 11:28:18 +02:00
Fulgur14
d33f6296a7 Intervening if triggers with tapped/untapped state (#6037) 2024-09-04 07:12:26 +00:00
Hans Mackowiak
53d9936fb9 CardTraitBase: PresentDefined for Trigger and ReplacementEffects 2024-09-04 07:39:08 +02:00
tool4ever
67edc8d371 DSK: Undead Sprinter (#6050) 2024-09-04 07:24:05 +02:00
Simisays
676174043e DSC 4 cards + moving upcoming to folders (#6027)
* Support Aminatou, Veil Piercer

---------

Co-authored-by: TRT <>
2024-09-04 07:10:42 +02:00
Renato Filipe Vidal Santos
736ccdd893 Add files via upload (#6049) 2024-09-04 08:01:10 +03:00
Jetz
2d233f8ad5 Guava migration - Inline Predicates.or 2024-09-04 00:23:58 -04:00
Jetz
b37f8725ba Guava migration - Inline Predicates.and 2024-09-03 20:22:45 -04:00
Jetz
78bc9fd04e Guava migration - Inline Predicates.not 2024-09-03 09:41:07 -04:00
Jetz
22e7465212 Guava migration - Swap in Predicate.isEqual 2024-09-03 09:12:41 -04:00
Jetz
6b96bca83f Guava migration - Inline Predicates.equalTo 2024-09-03 08:54:18 -04:00
Paul Hammerton
a512990cf5 Merge pull request #6046 from paulsnoops/dsk_fixes
Some DSK card script fixes
2024-09-03 13:17:48 +01:00
Paul Hammerton
7bcb127e9d file_name 2024-09-03 13:10:42 +01:00
Paul Hammerton
e8ce564605 Some DSK card script fixes 2024-09-03 13:08:38 +01:00
Paul Hammerton
8d714fce30 Merge pull request #6026 from Fulgur14/Fulgur14-patch-53
18 Duskmourn cards + 2 Schemes
2024-09-03 12:54:43 +01:00
Paul Hammerton
aa47c8099f Merge pull request #6018 from Lykrast/master
27 cards from 2024 Unknown Events (1 is in mystery booster 2)
2024-09-03 12:53:49 +01:00
Paul Hammerton
bc8f8bb4ff Merge pull request #6038 from Fulgur14/Fulgur14-patch-57
Common dual cycle for DSK
2024-09-03 12:53:20 +01:00
kevlahnota
13c50ffe60 Merge pull request #6043 from kevlahnota/master2
update adventure UI BG
2024-09-03 19:31:47 +08:00
Anthony Calosa
bfaaed2738 increase badge fb resolution 2024-09-03 19:23:26 +08:00
Anthony Calosa
9296aece25 update bg, ui outline 2024-09-03 18:18:02 +08:00
Paul Hammerton
c27af329b1 Merge pull request #6045 from paulsnoops/edition_updates
Edition updates: DSC, DSK, SLD
2024-09-03 10:54:19 +01:00
Paul Hammerton
b56d9b7894 Edition updates: DSC, DSK, SLD 2024-09-03 10:40:23 +01:00
Fulgur14
0f36b53a1e Update kaito_bane_of_nightmares.txt 2024-09-03 08:12:37 +02:00
Anthony Calosa
5b4f093032 pixelized other UI icons, indexed BG color 2024-09-03 13:02:58 +08:00
Anthony Calosa
76b433ec93 downscale tavernevent 2024-09-03 11:54:03 +08:00
Anthony Calosa
b5c46f388a update defeat badge
- u[scale and proper pixelized
2024-09-03 11:34:36 +08:00
kevlahnota
a634ffeb89 Merge pull request #6042 from kevlahnota/master2
fix autosell refresh, update SaveLoadScene
2024-09-03 10:14:00 +08:00
Anthony Calosa
df04f1b1b1 add defeat badge, prevent console toggle when controls are frozen 2024-09-03 10:10:16 +08:00
Anthony Calosa
b785f5042e update location info 2024-09-03 08:56:58 +08:00
Anthony Calosa
13968ffb08 update preview info 2024-09-03 08:30:36 +08:00
Anthony Calosa
b80ac34189 fix autosell refresh, update SaveLoadScene 2024-09-03 08:18:40 +08:00
Jetz
4eb8fddfef Guava migration - Inline Predicates.in 2024-09-02 20:06:49 -04:00
Jetz
ef011d3f51 Guava migration - Inline Predicates.instanceOf 2024-09-02 20:03:13 -04:00
Jetz
77ba9f1728 Guava migration - Inline Predicates.alwaysTrue 2024-09-02 20:00:38 -04:00
Jetz
16c0fa1095 Guava migration - Fix lingering build errors 2024-09-02 19:51:21 -04:00
Jetz
055dff71ce Guava migration - Inline Predicate varargs methods 2024-09-02 19:36:39 -04:00
Jetz
a070feefb2 Guava migration - Remove forwarding overloads 2024-09-02 18:19:04 -04:00
Jetz
67f22c647d Guava migration - Migrate Lists.transform 2024-09-02 18:16:25 -04:00
Jetz
6a87768647 Guava migration - Migrate Suppliers 2024-09-02 18:03:26 -04:00
Jetz
ecf25a8c00 Guava migration - Migrate Optionals 2024-09-02 17:52:18 -04:00
Jetz
8702e299cd Guava migration - Migrate Functions 2024-09-02 17:40:41 -04:00
Jetz
9765279166 Guava migration - Migrate Predicates 2024-09-02 17:08:25 -04:00
Jetz
4d6292802f Guava migration - Migrate static libraries 2024-09-02 14:52:42 -04:00
Agetian
1a1833c588 - Add puzzle PS_BLB3, add support for class level to GameState. (#6039) 2024-09-02 19:59:07 +03:00
Jetz
fb16a46389 Guava migration - Remove Functions dependency 2024-09-02 12:29:50 -04:00
Lykrast
9e28e06d70 Fix ate o clock spell description 2024-09-02 18:23:01 +02:00
Fulgur14
bc056c7f92 Add files via upload 2024-09-02 18:09:47 +02:00
Fulgur14
2fd7f66e25 Update nowhere_to_run.txt 2024-09-02 18:06:36 +02:00
Jetz
bb520b1a60 Guava migration - Create migration scaffold 2024-09-02 12:04:24 -04:00
Jetz
b46c1deeb4 Guava migration - Preliminary 2024-09-02 12:03:59 -04:00
Fulgur14
319e743df1 Common dual cycle for DSK 2024-09-02 18:02:37 +02:00
Fulgur14
205a13ce2a Update nowhere_to_run.txt 2024-09-02 17:56:25 +02:00
Fulgur14
29db7f6ccb Update kaito_bane_of_nightmares.txt 2024-09-02 17:48:51 +02:00
Fulgur14
7322ffbdad Update veteran_survivor.txt 2024-09-02 15:51:16 +02:00
kevlahnota
19d8c7bac6 Merge pull request #6036 from kevlahnota/master2
update adventure defeat penalty
2024-09-02 21:41:47 +08:00
Anthony Calosa
f59ebf64e9 update adventure defeat penalty
- random armor crack (unusable)
- add difficulty indicator in load game preview (red - insane, gold - hard, green - normal, cyan - easy)
2024-09-02 21:38:19 +08:00
Fulgur14
8a409c91b0 Update champions_of_archery_join_the_group.txt (#6035) 2024-09-02 14:18:54 +02:00
Fulgur14
c5da294e05 Update veteran_survivor.txt 2024-09-02 13:21:27 +02:00
tool4ever
229b1562be Some cleaning brought with smaller fixes (#6029)
* Fix Teferi's Imp
2024-09-02 10:47:50 +02:00
Hans Mackowiak
40bc5aa021 GameLoss: use CantHappen for cantLose (#6024)
* GameLoss: use CantHappen for cantLose
2024-09-02 10:35:45 +02:00
Renato Filipe Vidal Santos
bf9a9beac6 Update mishra_claimed_by_gix_mishra_lost_to_phyrexia.txt (#6030) 2024-09-02 07:34:47 +02:00
Fulgur14
e530c3a34c Update veteran_survivor.txt 2024-09-01 19:50:36 +02:00
Fulgur14
695e1344d6 Update overlord_of_the_mistmoors.txt 2024-09-01 19:50:19 +02:00
Fulgur14
6ec11f0a77 Update kaito_bane_of_nightmares.txt 2024-09-01 19:49:59 +02:00
kevlahnota
4db49a094a Merge pull request #6028 from kevlahnota/master2
fix freeze
2024-09-01 20:37:51 +08:00
Anthony Calosa
9aecf60ac7 fix freeze 2024-09-01 20:37:19 +08:00
Chris H
754cfcd79a Fix booster replacement for Bloomburrow 2024-09-01 08:00:53 -04:00
Fulgur14
8d23de631f Add files via upload 2024-09-01 12:20:30 +02:00
Fulgur14
29cbb11e24 18 Duskmourn cards + 2 Schemes 2024-09-01 12:19:45 +02:00
Paul Hammerton
bcbfe14a70 Merge pull request #6023 from paulsnoops/edition_updates
Edition updates: DSC, DSK, SPG
2024-09-01 08:40:28 +01:00
Paul Hammerton
ae2ab498f1 Edition updates: DSC, DSK, SPG 2024-09-01 08:37:00 +01:00
kevlahnota
f8c89995db Merge pull request #6022 from kevlahnota/master2
Disable autosell/nosell labels
2024-09-01 12:08:09 +08:00
Anthony Calosa
00ab0bf50b Disable labels
-todo distinction
2024-09-01 12:06:37 +08:00
kevlahnota
845f7f60f0 Merge pull request #6020 from kevlahnota/master2
update AdventureDeckEditor
2024-09-01 07:20:04 +08:00
Anthony Calosa
cdbc3cfab7 update AdventureDeckEditor
- show Shop prices, show Auto Sell / No Sell card label
2024-09-01 07:12:53 +08:00
Paul Hammerton
256fc780d8 Merge pull request #6019 from paulsnoops/edition_updates
Edition updates: DSK, PRES
2024-08-31 09:53:00 +01:00
Paul Hammerton
d2fb65c108 Edition updates: DSK, PRES 2024-08-31 09:48:20 +01:00
Simisays
6d43aa9152 YBLB 24 cards (#5955)
* update

* Update awestruck_cygnet.txt

* 10 more

* cleanup + last 4

* cleanup

* Update archival_whorl.txt

* cleanup

* Update buxton_decorated_host.txt

* cleanup 2

* cleanup
2024-08-31 07:47:05 +03:00
Lykrast
0db4ac579c Amsterdam cards 2024-08-31 03:10:41 +02:00
tool4ever
080d347199 Fix Conspiracy removing types without choice for new one (#6017)
* Skip incomplete overwrite

* Fix NPE for Unhaunting
2024-08-30 17:13:49 +00:00
Paul Hammerton
cadf278871 Merge pull request #6013 from paulsnoops/mh3_m3c_updates
MH3 & M3C remove unnecessary tokens
2024-08-30 08:52:09 +01:00
kevlahnota
6d42917005 Merge pull request #6016 from kevlahnota/master2
fix noSell cardreward
2024-08-30 09:51:08 +08:00
Anthony Calosa
5978b3ef16 fix noSell cardreward 2024-08-30 09:47:16 +08:00
kevlahnota
20f5bbed98 Merge pull request #6012 from kevlahnota/master2
add autosell toggle for rewards
2024-08-30 06:21:46 +08:00
Anthony Calosa
e184fb20b9 update touchcancelled 2024-08-30 06:15:09 +08:00
Paul Hammerton
9b7659ab84 MH3 & M3C remove unnecessary tokens 2024-08-29 18:34:04 +01:00
Renato Filipe Vidal Santos
d24e296322 PH19: Champions of Archery (#6006) 2024-08-29 16:28:43 +00:00
tool4ever
7421871a36 Merge pull request #5933 from Jetz72/youreInCommand
You're In Command + Support
2024-08-29 18:28:29 +02:00
Anthony Calosa
b1e6e6fd3d update button 2024-08-29 23:09:27 +08:00
Anthony Calosa
4e68ac3807 add autosell toggle for rewards 2024-08-29 22:31:07 +08:00
kevlahnota
78bff0a8f9 Merge pull request #6010 from kevlahnota/master2
update player death transition
2024-08-29 19:36:16 +08:00
Anthony Calosa
f5ab73d32d update player death transition 2024-08-29 19:26:40 +08:00
Hans Mackowiak
239e327f0b ColorlessDamageSource as StaticAbility (#6007)
* ColorlessDamageSource as StaticAbility
2024-08-29 10:06:58 +02:00
kevlahnota
3111e73a63 Merge pull request #6009 from kevlahnota/master2
restrict menu and movement on player defeat dialog
2024-08-29 15:47:33 +08:00
kevlahnota
6a2f185b08 remove uncommited changes 2024-08-29 15:42:17 +08:00
Anthony Calosa
977c11ced0 retrict menu and movement on player defeat dialog 2024-08-29 14:45:54 +08:00
kevlahnota
96080ca479 Merge pull request #6002 from kevlahnota/master2
add resetPlayerLocation on defeat
2024-08-29 11:28:55 +08:00
Anthony Calosa
a3f8b0aca2 fix overlapping dialog, fix player position 2024-08-29 11:24:50 +08:00
Anthony Calosa
14c14b880d update message 2024-08-29 10:40:26 +08:00
Renato Filipe Vidal Santos
36bb086246 YBLB: Shellfish Scholar, Tasteful Offering, Tempest Trapper, Thought Rattle, Three Tree Battalion, Vigorous Farming (#5944) 2024-08-28 20:08:39 +00:00
tool4ever
229fd798fb Fix missing ChangesZoneAll (#6005) 2024-08-28 18:23:31 +00:00
tool4ever
756ba28a14 Some fixes (#6004)
* Fix NPE
2024-08-28 15:54:28 +00:00
Hans Mackowiak
4b533d22a0 StaticAbilityAssignNoCombatDamage (#5998)
* StaticAbilityAssignNoCombatDamage

---------

Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2024-08-28 17:18:36 +02:00
Anthony Calosa
24d4899cde add resetPlayerLocation on defeat 2024-08-28 21:54:48 +08:00
Renato Filipe Vidal Santos
51abd277d2 MB2: Fetching Garden, Gobland, The Heron Moon, Omenpath to Naya (#5989)
* Add files via upload

* Add files via upload

* Add files via upload

* Update CounterEnumType.java

* Add files via upload

* Add files via upload

* Update CounterEnumType.java
2024-08-28 09:24:48 +03:00
Jetz
a8351fadc7 Fix mapping copied commander effects between games 2024-08-27 20:35:10 -04:00
kevlahnota
53084f43c3 Merge pull request #5991 from Jetz72/fixes20240825
Translation support for functional variants
2024-08-27 12:43:35 +08:00
kevlahnota
27102729ab Merge pull request #5997 from hovergoat/master
Fix for crash when no multikicker cost is paid
2024-08-27 12:40:22 +08:00
hovergoat
7cf9ea0ded Merge branch 'Card-Forge:master' into master 2024-08-26 21:30:20 -04:00
hovergoat
7327d66743 Fixed crash when multikicker is 0 2024-08-26 21:30:05 -04:00
Paul Hammerton
d66666007c Merge pull request #5995 from paulsnoops/bnr_26_aug
Banned and Restricted Announcement for August 26, 2024
2024-08-26 20:57:15 +01:00
Paul Hammerton
c725a49f52 Banned and Restricted Announcement for August 26, 2024 2024-08-26 20:51:36 +01:00
Simisays
927c6fab58 Update sorins_boss_effect.txt (#5985) 2024-08-26 16:47:10 +03:00
Agetian
5890bdffc3 - Improve AI for Searing Blaze (#5987) 2024-08-26 16:45:22 +03:00
kevlahnota
11c0b12ec8 Merge pull request #5993 from kevlahnota/master2
fix actor placement GameHUD -> currentStage
2024-08-26 20:42:02 +08:00
Anthony Calosa
2442883501 adjust blur divisor 2024-08-26 20:27:47 +08:00
Anthony Calosa
c212c41a30 update avatar listener single tap/click set translucency, double tap/click set hud visibility 2024-08-26 20:00:17 +08:00
Anthony Calosa
284a4daf88 update actor groupings 2024-08-26 17:28:24 +08:00
Anthony Calosa
4a8776a2f7 fix actor placement GameHUD -> currentStage
- add hud transluscency via avatar/gamehud double click/tap
2024-08-26 16:58:45 +08:00
Jetz72
bba94d5a9e Merge branch 'Card-Forge:master' into fixes20240825 2024-08-26 00:26:28 -04:00
Jetz
4afc86b4b4 Support functional variants in translations 2024-08-26 00:25:43 -04:00
Renato Filipe Vidal Santos
17ffe17e9d MB2: Slumbering Waterways, Temur Elevator, Under-Construction Skyscraper, Wrenn and One (#5980)
* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload
2024-08-26 07:04:35 +03:00
kevlahnota
c1edd4a2f4 Merge pull request #5970 from misha-colbourne/hud-visibility-fix
Fixed missing elements from HUD in towns/dungeons/etc
2024-08-26 09:11:43 +08:00
Lykrast
bccc6d81b1 Unknown Event Chicago 2024 (+ edition for amsterdam) 2024-08-25 23:22:21 +02:00
Jetz
fd56341446 DetachedCardEffect GameCopier copying 2024-08-25 16:40:58 -04:00
kevlahnota
68bc50770d Merge pull request #5990 from kevlahnota/master2
update GameHUD items
2024-08-25 22:58:24 +08:00
Anthony Calosa
c13396f984 update GameHUD 2024-08-25 22:51:15 +08:00
Jetz
b97788d8eb DetachedCardEffect LKI copying 2024-08-25 09:58:59 -04:00
Hans Mackowiak
c3a2e67130 CopyPermanentEffect: use DefinedName for special copies (#5988)
* CopyPermanentEffect: use DefinedName for special copies
2024-08-25 10:44:15 +02:00
Hans Mackowiak
3ef0479d76 LandAbility: skip if already in Battlefield 2024-08-25 09:12:55 +02:00
Jetz
7b7dd0f7c3 Fix commander snapshotting
Fix DetachedCardEffect snapshottong
2024-08-24 16:35:35 -04:00
Jetz
34e5938f08 Remove "by Commander Effect" from SA list 2024-08-24 16:34:22 -04:00
kevlahnota
2dc025bf67 LDA Standard - August 7, 2024 2024-08-24 23:01:48 +08:00
tool4ever
30a358dda1 Fix Wheel of Potential (#5983)
* Wheel of Potential revision

* Logic cleanup

---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2024-08-24 14:25:36 +03:00
Paul Hammerton
6a503ccdbd Merge pull request #5984 from paulsnoops/edition_updates
Edition updates: DSK, SLD and add YBLB to formats
2024-08-24 09:31:30 +01:00
Paul Hammerton
1716fd2e1a Edition updates: DSK, SLD, YBLB (also add YBLB to formats) 2024-08-24 09:26:43 +01:00
kevlahnota
8f4e70aa04 Merge pull request #5982 from kevlahnota/master2
update PlayerStatisticScene, BlurUtils
2024-08-24 12:59:14 +08:00
Chris H
3522492c85 Fix bad logic check (#5981) 2024-08-24 07:51:57 +03:00
Anthony Calosa
e04451b962 update PlayerStatisticScene, BlurUtils
- make blur pixelized
2024-08-24 12:47:30 +08:00
kevlahnota
3bfef56d51 Update insatiable_frugivore.txt
- fixes 5977
2024-08-24 07:45:35 +08:00
Jetz
0b43d3ebf5 Merge branch 'master' into youreInCommand 2024-08-23 19:06:02 -04:00
Jetz
955314527a Single commander effect per player
Support DetachedCardEffect with no source card
2024-08-23 19:04:59 -04:00
Jetz
610488bc22 include components for RememberTargets 2024-08-23 18:55:52 -04:00
kevlahnota
ab11c10fd4 Update config.json
general playtest and some funny cards shouldn't be on adventure unless specified otherwise
2024-08-23 23:45:32 +08:00
kevlahnota
30ae922c5e Merge pull request #5974 from kevlahnota/master2
Update NewGameScene
2024-08-23 19:02:50 +08:00
TRT
45b333b8ac Fix NPE with Brilliant Ultimatum 2024-08-23 12:10:31 +02:00
Agetian
76f4113fb7 - First draft: fix AI for Fireball and Shatterskull Smashing (#5975) 2024-08-23 12:37:23 +03:00
Renato Filipe Vidal Santos
33e5d14ea5 Add files via upload (#5971) 2024-08-23 12:36:02 +03:00
Lykrast
8d433e019d 73 cards from Unknown Events 2023 (some being in mb2) (#5913)
* Unknown Philadelphia 2023 and Minenapolis 2023

* Barcelona 2023 what I could

* A few of the las vegas ones

* Questing role give to creature instead of being on aura

* Changed prizes to promo, should fix phila

And also put the you make the card on a special sheet, should fix a future issue if I got it right

* Fix the etb tapped from bloomburrow patch

Kept old wording for now cause those cards don't have oracle texts, might change if asked

* Las Vegas 2023 (what I could)

* Shortened set codes as suggested

* Fix edition change on las vegas ymtc
2024-08-23 12:35:52 +03:00
Anthony Calosa
b6485e7094 minor 2024-08-23 17:35:19 +08:00
Anthony Calosa
3df84ca71e remove duplicate function 2024-08-23 17:16:33 +08:00
Anthony Calosa
6bba3ee954 minor cleanup 2024-08-23 17:02:13 +08:00
Hans Mackowiak
77710cf1b0 refactor LandAbility to be created by CardFactory (#5047)
---------

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
2024-08-23 10:57:33 +02:00
Anthony Calosa
c7c2cd74fe Update NewGameScene
- Hint TextButton -> ImageButton
- add Random Avatar Listener
- update NameGenerator Listener
- update disabled Menu text
- use AsyncAudio for Android
2024-08-23 16:53:07 +08:00
kevlahnota
a52e06fb82 Merge pull request #5963 from misha-colbourne/AdventureEnemyFreezeFix
Adventure enemy freeze fix
2024-08-23 13:10:43 +08:00
Agetian
45353b6d73 Fix Scry AI that requires targeting (Kozilek's Command) (#5972)
* - Fix Scry AI that requires targeting (Kozilek's Command)

* - Slight tweak to targeted Scry AI.
2024-08-23 07:38:42 +03:00
misha-colbourne
2ec0061640 Removed lingering outdated comment 2024-08-23 01:36:04 +01:00
misha-colbourne
b9c576ad5d Font tag size constants, cleaned up unused variables I added 2024-08-23 01:28:01 +01:00
misha-colbourne
478ad3a135 Font tag size constants, cleaned up unused variables I added 2024-08-23 00:24:49 +01:00
misha-colbourne
663a712852 Fixed missing elements from HUD when not on world map (now translucent instead of invisible) 2024-08-22 19:31:06 +01:00
Agetian
3ae72e9d8a - Fix AI assuming no token created for non-creature tokens 2024-08-22 12:35:46 +02:00
Renato Filipe Vidal Santos
8ba1edaba7 Update moonstone_harbinger.txt (#5966) 2024-08-22 07:16:54 +02:00
misha-colbourne
a445520ef5 Merge branch 'Card-Forge:master' into AdventureEnemyFreezeFix 2024-08-22 01:24:09 +01:00
misha-colbourne
7ffd7b1d63 Added check for frozen enemy to enemy idle anim condition 2024-08-22 01:19:25 +01:00
Sunnovah
3141293c29 Rename Reap the Tide.dck to Reap the Tides.dck (#5959) 2024-08-21 18:16:04 +00:00
tool4ever
064512ed83 Implement CR 800.4m (#189)
* Relocate effects instead of exiling
2024-08-21 18:14:13 +00:00
Sunnovah
38fb16c64f Rename Stalward Unity [C16] [2016].dck to Stalwart Unity [C16] [2016].dck (#5960) 2024-08-21 18:13:11 +00:00
Chris H
90fcb38fec Fix a few issues with boosters in quest mode 2024-08-21 13:27:49 -04:00
tool4ever
d369c500df Misc cleanup (#5958) 2024-08-21 17:47:25 +02:00
Renato Filipe Vidal Santos
3e2c0198fd Update oracle_en_vec.txt (#5956) 2024-08-21 10:30:15 +02:00
Hans Mackowiak
7ba2d02172 GameActionUtil: use Multikicker as KeywordExtraCost (#5881)
* GameActionUtil: use Multikicker as KeywordExtraCost

* ~ remove getMultiKickerManaCost

* ~ remove Announce$ Multikicker

* some AI tweaks

* Fix MultiKicker for AI

* Update ComputerUtilMana.java

* Update ComputerUtil.java
2024-08-21 10:25:47 +03:00
NimSpork
3df0a15d7d Update alharu_solemn_ritualist.txt (#5952) 2024-08-19 10:45:13 +00:00
Hans Mackowiak
492ff16c12 Keyword: add 'Bands with other' keyword (#5950) 2024-08-19 06:32:44 +02:00
Renato Filipe Vidal Santos
bb07351d4e Update cackling_observer.txt (#5949) 2024-08-18 17:28:43 +00:00
Chris H
d2178756b5 Declare Forge user agent (#5946) 2024-08-18 19:17:43 +02:00
Chris H
80cc302c99 Fix booster generation for editions without booster slots 2024-08-18 10:39:44 -04:00
Renato Filipe Vidal Santos
acf15a65a8 Glyph cleanup: August 2024 pass 2024-08-18 11:37:16 +00:00
Renato Filipe Vidal Santos
7b5f790fe4 Duplication cleanup: pass #1 (#5942) 2024-08-18 09:40:20 +00:00
Jetz
601f6a72c1 Merge branch 'master' into youreInCommand 2024-08-17 15:56:13 -04:00
Jetz
ec7f2be51c Merge branch 'master' into youreInCommand
# Conflicts:
#	forge-game/src/main/java/forge/game/player/Player.java
2024-08-17 15:40:38 -04:00
Jetz
6929231fd5 setCommanders rewrite 2024-08-17 15:21:44 -04:00
Chris H
600cf82308 Only grab BLB cards for Booster Slots. Ideally this would happen by default, but yknow how it goes. 2024-08-17 15:15:12 -04:00
tool4ever
1857d1795d Improve resetOriginalHost (#5939)
Co-authored-by: TRT <>
2024-08-17 09:58:34 +02:00
Renato Filipe Vidal Santos
852cdacb02 Add files via upload (#5868) 2024-08-17 09:58:09 +02:00
Renato Filipe Vidal Santos
fdef390c65 Add files via upload (#5867) 2024-08-17 09:57:58 +02:00
Renato Filipe Vidal Santos
26a5d5caf4 Add files via upload (#5866) 2024-08-17 09:57:45 +02:00
Renato Filipe Vidal Santos
fc80c84df9 Add files via upload (#5869)
Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
2024-08-17 09:57:28 +02:00
Chris H
c2206d533d Fix some issues 2024-08-16 16:57:21 -04:00
Chris H
925819c83e Convert BLB to new Booster Slot definition 2024-08-16 16:57:21 -04:00
Chris H
4554dee721 Generate individual booster slots with individual replacement percentages
Convert MH3 to booster slot percentages
2024-08-16 16:57:21 -04:00
Paul Hammerton
658542309a Merge pull request #5938 from paulsnoops/edition_updates
Edition updates: FDN, MB2, YBLB
2024-08-16 11:42:40 +01:00
Paul Hammerton
5342518b98 YBLB 2024-08-16 11:39:52 +01:00
Paul Hammerton
668c5d64e8 eternal 2024-08-16 11:05:35 +01:00
Paul Hammerton
a2951abac8 Edition updates: FDN, MB2 2024-08-16 11:03:13 +01:00
kevlahnota
c06e97d57b Merge pull request #5937 from kevlahnota/master2
fix NPE
2024-08-16 10:29:35 +08:00
Anthony Calosa
de3b6b82cb fix NPE 2024-08-16 10:27:25 +08:00
Paul Hammerton
e590df1a08 Merge pull request #5934 from dracontes/rb-fdn-2
FDN: Felidar Savior, Helpful Hunter, Prideful Parent, Vengeful Bloodwitch
2024-08-15 17:07:51 +01:00
Renato Filipe Vidal Santos
0ac16b3b28 Update helpful_hunter.txt 2024-08-15 16:54:23 +01:00
Renato Filipe Vidal Santos
00a08d325d Update prideful_parent.txt 2024-08-15 16:53:48 +01:00
Renato Filipe Vidal Santos
7f150ce741 Update ajani_nacatl_pariah_ajani_nacatl_avenger.txt 2024-08-15 16:53:14 +01:00
Renato Filipe Vidal Santos
ec8dc5ff0c Update spirited_companion.txt 2024-08-15 16:52:42 +01:00
Renato Filipe Vidal Santos
4ce94b929f Add files via upload 2024-08-15 16:37:27 +01:00
Renato Filipe Vidal Santos
b7605ee1da Update desert_warfare.txt (#5926) 2024-08-15 17:27:31 +02:00
Jetz
6a53c187ad You're In Command + Support 2024-08-15 09:33:11 -04:00
Paul Hammerton
038374c3c5 Merge pull request #5931 from paulsnoops/edition_updates
Edition updates: FDN, SLD, YBLB
2024-08-15 10:46:44 +01:00
Paul Hammerton
d3fd7523e2 Edition updates: FDN, SLD, YBLB 2024-08-15 10:42:51 +01:00
Renato Filipe Vidal Santos
6ef5acbd51 Update planequake.txt (#5928) 2024-08-15 09:52:46 +02:00
Renato Filipe Vidal Santos
6f110c114a Update long_river_lurker.txt (#5927) 2024-08-15 09:52:18 +02:00
Chris H
df78ac9a73 Update karn_living_legacy.txt (#5930) 2024-08-15 08:44:45 +02:00
Simisays
9201ccb390 UNF last 3 attractions (#5845)
* update

* cleanup

* Update tunnel_of_love.txt
2024-08-15 05:26:20 +03:00
Chris H
8be414d9dd Blb release (#5929)
* [maven-release-plugin] prepare release forge-1.6.64

* [maven-release-plugin] prepare for next development iteration

* Update pom.xml

* Update AndroidManifest.xml

* Update pom.xml

* Update Forge.java

---------

Co-authored-by: GitHub Actions <actions@github.com>
2024-08-14 21:06:29 -04:00
11473 changed files with 150846 additions and 81966 deletions

View File

@@ -2,10 +2,21 @@ name: Publish Desktop Forge
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
release_android:
type: boolean
description: 'Also try to release android build'
required: false
default: false
jobs:
build:
if: github.repository_owner == 'Card-Forge'
runs-on: ubuntu-latest
permissions:
contents: write
@@ -14,10 +25,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: cardforge-repo
@@ -32,10 +43,94 @@ jobs:
run: |
git config user.email "actions@github.com"
git config user.name "GitHub Actions"
- name: Build/Install/Publish to GitHub Packages Apache Maven
- name: Install old maven (3.8.1)
run: |
curl -o apache-maven-3.8.1-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/3.8.1/binaries/apache-maven-3.8.1-bin.tar.gz
tar xf apache-maven-3.8.1-bin.tar.gz
export PATH=$PWD/apache-maven-3.8.1/bin:$PATH
export MAVEN_HOME=$PWD/apache-maven-3.8.1
mvn --version
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Setup android requirements
if: ${{ github.event_name == 'workflow_dispatch' && inputs.release_android }}
run: |
JAVA_HOME=${JAVA_HOME_17_X64} ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT --install "build-tools;35.0.0" "platform-tools" "platforms;android-35"
cd forge-gui-android
echo "${{ secrets.FORGE_KEYSTORE }}" > forge.keystore.asc
gpg -d --passphrase "${{ secrets.FORGE_KEYSTORE_PASSPHRASE }}" --batch forge.keystore.asc > forge.keystore
cd -
mkdir -p ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.2
cd ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.2
curl -L -o android-maven-plugin-4.6.2.jar https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.2/android-maven-plugin-4.6.2.jar
curl -L -o android-maven-plugin-4.6.2.pom https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.2/android-maven-plugin-4.6.2.pom
cd -
mvn install -Dmaven.test.skip=true
mvn dependency:tree
- name: Build/Install/Publish Desktop to GitHub Packages Apache Maven
if: ${{ github.event_name == 'workflow_dispatch' && !inputs.release_android }}
run: |
export DISPLAY=":1"
Xvfb :1 -screen 0 800x600x8 &
mvn -U -B clean -P windows-linux install release:clean release:prepare release:perform -T 1C -Dcardforge-repo.username=${{ secrets.FTP_USERNAME }} -Dcardforge-repo.password=${{ secrets.FTP_PASSWORD }}
export _JAVA_OPTIONS="-Xmx2g"
d=$(date +%m.%d)
# build only desktop and only try to move desktop files
mvn -U -B clean -P windows-linux install -e -T 1C release:clean release:prepare release:perform -DskipTests
mkdir izpack
# move bz2 and jar from work dir to izpack dir
mv /home/runner/work/forge/forge/forge-installer/*/*.{bz2,jar} izpack/
# move desktop build.txt and version.txt to izpack
mv /home/runner/work/forge/forge/forge-gui-desktop/target/classes/*.txt izpack/
cd izpack
ls
echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Build/Install/Publish Desktop+Android to GitHub Packages Apache Maven
if: ${{ github.event_name == 'workflow_dispatch' && inputs.release_android }}
run: |
export DISPLAY=":1"
Xvfb :1 -screen 0 800x600x8 &
export _JAVA_OPTIONS="-Xmx2g"
d=$(date +%m.%d)
# build both desktop and android
mvn -U -B clean -P windows-linux,android-release-build install -e -Dcardforge-repo.username=${{ secrets.FTP_USERNAME }} -Dcardforge-repo.password=${{ secrets.FTP_PASSWORD }} -Dandroid.sdk.path=/usr/local/lib/android/sdk -Dandroid.buildToolsVersion=35.0.0
mkdir izpack
# move bz2 and jar from work dir to izpack dir
mv /home/runner/work/forge/forge/forge-installer/*/*.{bz2,jar} izpack/
# move desktop build.txt and version.txt to izpack
mv /home/runner/work/forge/forge/forge-gui-desktop/target/classes/*.txt izpack/
# move android apk and assets.zip
mv /home/runner/work/forge/forge/forge-gui-android/target/*-signed-aligned.apk izpack/
mv /home/runner/work/forge/forge/forge-gui-android/target/assets.zip izpack/
cd izpack
ls
echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload snapshot to GitHub Prerelease
uses: ncipollo/release-action@v1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ env.GIT_TAG }}
tag: ${{ env.GIT_TAG }}
artifacts: izpack/*
allowUpdates: true
removeArtifacts: true
makeLatest: true
- name: Send failure notification to Discord
if: failure() # This step runs only if the job fails
run: |
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"🔴 Release Build Failed in branch: \`${{ github.ref_name }}\` by \`${{ github.actor }}\`.\nCheck logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \
${{ secrets.DISCORD_AUTOMATION_WEBHOOK }}

View File

@@ -20,10 +20,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: cardforge-repo
@@ -31,20 +31,20 @@ jobs:
server-password: ${{ secrets.FTP_PASSWORD }}
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Install old maven (3.6.3)
- name: Install old maven (3.8.1)
run: |
curl -o apache-maven-3.6.3-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar xf apache-maven-3.6.3-bin.tar.gz
export PATH=$PWD/apache-maven-3.6.3/bin:$PATH
export MAVEN_HOME=$PWD/apache-maven-3.6.3
curl -o apache-maven-3.8.1-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/3.8.1/binaries/apache-maven-3.8.1-bin.tar.gz
tar xf apache-maven-3.8.1-bin.tar.gz
export PATH=$PWD/apache-maven-3.8.1/bin:$PATH
export MAVEN_HOME=$PWD/apache-maven-3.8.1
mvn --version
- name: Install android SDK
uses: maxim-lobanov/setup-android-tools@v1
with:
packages: |
platforms;android-26
build-tools;30.0.3
platforms;android-35
build-tools;35.0.0
- name: Install virtual framebuffer (if not available) to allow running GUI on a headless server
run: |
@@ -71,11 +71,11 @@ jobs:
- name: Install Android maven plugin
run: |
mkdir -p ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.1
cd ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.1
curl -L -o android-maven-plugin-4.6.1.jar https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.1/android-maven-plugin-4.6.1.jar
curl -L -o android-maven-plugin-4.6.1.pom https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.1/android-maven-plugin-4.6.1.pom
#mvn install:install-file -Dfile=android-maven-plugin-4.6.1.jar -DgroupId=com.simpligility.maven.plugins -DartifactId=android-maven-plugin -Dversion=4.6.1 -Dpackaging=jar
mkdir -p ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.2
cd ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.2
curl -L -o android-maven-plugin-4.6.2.jar https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.2/android-maven-plugin-4.6.2.jar
curl -L -o android-maven-plugin-4.6.2.pom https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.2/android-maven-plugin-4.6.2.pom
#mvn install:install-file -Dfile=android-maven-plugin-4.6.2.jar -DgroupId=com.simpligility.maven.plugins -DartifactId=android-maven-plugin -Dversion=4.6.2 -Dpackaging=jar
cd -
mvn install -Dmaven.test.skip=true
mvn dependency:tree
@@ -83,7 +83,7 @@ jobs:
- name: Build/Install/Publish to GitHub Packages Apache Maven
run: |
export _JAVA_OPTIONS="-Xmx2g"
mvn -U -B -P android-release-build,android-release-sign,android-release-upload install -e -Dsign.keystore=forge.keystore -Dsign.alias=Forge -Dsign.storepass=${{ secrets.SIGN_STORE_PASS }} -Dsign.keypass=${{ secrets.SIGN_STORE_PASS }} -Dcardforge-repo.username=${{ secrets.FTP_USERNAME }} -Dcardforge-repo.password=${{ secrets.FTP_PASSWORD }} -Dandroid.sdk.path=/usr/local/lib/android/sdk -Dandroid.buildToolsVersion=30.0.3 -Dmaven.test.skip=true
mvn -U -B -P android-release-build,android-release-upload install -e -Dcardforge-repo.username=${{ secrets.FTP_USERNAME }} -Dcardforge-repo.password=${{ secrets.FTP_PASSWORD }} -Dandroid.sdk.path=/usr/local/lib/android/sdk -Dandroid.buildToolsVersion=35.0.0 -Dmaven.test.skip=true
env:
GITHUB_TOKEN: ${{ github.token }}

View File

@@ -0,0 +1,19 @@
name: Remove stale branches
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # Everday at midnight
jobs:
remove-stale-branches:
if: github.repository_owner == 'Card-Forge'
name: Remove Stale Branches
runs-on: ubuntu-latest
steps:
- uses: fpicalausa/remove-stale-branches@v2.1.0
with:
dry-run: false # Check out the console output before setting this to false
ignore-unknown-authors: true
ignore-branches-with-open-prs: true
default-recipient: tehdiplomat

View File

@@ -0,0 +1,132 @@
name: Create Snapshot Desktop and Android
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '00 18 * * *'
jobs:
build:
if: github.repository_owner == 'Card-Forge'
runs-on: ubuntu-latest
permissions:
contents: write
deployments: write
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: cardforge-repo
server-username: ${{ secrets.FTP_USERNAME }}
server-password: ${{ secrets.FTP_PASSWORD }}
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Install virtual framebuffer (if not available) to allow running GUI on a headless server
run: command -v Xvfb >/dev/null 2>&1 || { sudo apt update && sudo apt install -y xvfb; }
- name: Configure Git User
run: |
git config user.email "actions@github.com"
git config user.name "GitHub Actions"
- name: Install old maven (3.8.1)
run: |
curl -o apache-maven-3.8.1-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/3.8.1/binaries/apache-maven-3.8.1-bin.tar.gz
tar xf apache-maven-3.8.1-bin.tar.gz
export PATH=$PWD/apache-maven-3.8.1/bin:$PATH
export MAVEN_HOME=$PWD/apache-maven-3.8.1
mvn --version
- name: Set Up Android tools
run: |
JAVA_HOME=${JAVA_HOME_17_X64} ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT --install "build-tools;35.0.0" "platform-tools" "platforms;android-35"
- name: Extract Android keystore
run: |
ls
cd forge-gui-android
echo "${{ secrets.FORGE_KEYSTORE }}" > forge.keystore.asc
gpg -d --passphrase "${{ secrets.FORGE_KEYSTORE_PASSPHRASE }}" --batch forge.keystore.asc > forge.keystore
cd -
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Install Android maven plugin
run: |
mkdir -p ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.2
cd ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.2
curl -L -o android-maven-plugin-4.6.2.jar https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.2/android-maven-plugin-4.6.2.jar
curl -L -o android-maven-plugin-4.6.2.pom https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.2/android-maven-plugin-4.6.2.pom
#mvn install:install-file -Dfile=android-maven-plugin-4.6.2.jar -DgroupId=com.simpligility.maven.plugins -DartifactId=android-maven-plugin -Dversion=4.6.2 -Dpackaging=jar
cd -
mvn install -Dmaven.test.skip=true
mvn dependency:tree
- name: Build/Install/Publish to GitHub Packages Apache Maven
run: |
export DISPLAY=":1"
Xvfb :1 -screen 0 800x600x8 &
export _JAVA_OPTIONS="-Xmx2g"
d=$(date +%m.%d)
# build both desktop and android
mvn -U -B clean -P windows-linux,android-release-build install -e -Dcardforge-repo.username=${{ secrets.FTP_USERNAME }} -Dcardforge-repo.password=${{ secrets.FTP_PASSWORD }} -Dandroid.sdk.path=/usr/local/lib/android/sdk -Dandroid.buildToolsVersion=35.0.0
mkdir izpack
# move bz2 and jar from work dir to izpack dir
mv /home/runner/work/forge/forge/forge-installer/*/*.{bz2,jar} izpack/
# move desktop build.txt and version.txt to izpack
mv /home/runner/work/forge/forge/forge-gui-desktop/target/classes/*.txt izpack/
# move android apk and assets.zip
mv /home/runner/work/forge/forge/forge-gui-android/target/*-signed-aligned.apk izpack/
mv /home/runner/work/forge/forge/forge-gui-android/target/assets.zip izpack/
cd izpack
# rename files and append date
for file in *.jar; do
bname="${file%.*}"
echo "file renamed to ${bname}-${d}.jar"
mv "${bname}.jar" "${bname}-${d}.jar"
done
for file in *.bz2; do
# remove .bz2
fname="${file%.*}"
# remove .tar
bname="${fname%.*}"
echo "file renamed to ${bname}-${d}.tar.bz2"
mv "${fname}.bz2" "${bname}-${d}.tar.bz2"
done
ls
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload snapshot to GitHub Prerelease
uses: ncipollo/release-action@v1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Daily Snapshot
tag: daily-snapshots
prerelease: true
artifacts: izpack/*
allowUpdates: true
removeArtifacts: true
- name: Send failure notification to Discord
if: failure() # This step runs only if the job fails
run: |
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"🔴 Snapshot Build Failed in branch: \`${{ github.ref_name }}\` by \`${{ github.actor }}\`.\nCheck logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" \
${{ secrets.DISCORD_AUTOMATION_WEBHOOK }}

View File

@@ -8,10 +8,11 @@ on:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '00 19 * * *'
#upload_package:
# type: boolean
# description: 'Upload the completed Android package'
# required: false
# default: true
jobs:
build:
@@ -24,10 +25,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: cardforge-repo
@@ -35,19 +36,17 @@ jobs:
server-password: ${{ secrets.FTP_PASSWORD }}
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Install old maven (3.6.3)
- name: Install old maven (3.8.1)
run: |
curl -o apache-maven-3.6.3-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar xf apache-maven-3.6.3-bin.tar.gz
export PATH=$PWD/apache-maven-3.6.3/bin:$PATH
export MAVEN_HOME=$PWD/apache-maven-3.6.3
curl -o apache-maven-3.8.1-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/3.8.1/binaries/apache-maven-3.8.1-bin.tar.gz
tar xf apache-maven-3.8.1-bin.tar.gz
export PATH=$PWD/apache-maven-3.8.1/bin:$PATH
export MAVEN_HOME=$PWD/apache-maven-3.8.1
mvn --version
- name: Set Up Android tools
run: |
JAVA_HOME=${JAVA_HOME_11_X64} ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools"
JAVA_HOME=${JAVA_HOME_11_X64} ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT --install "platforms;android-26"
JAVA_HOME=${JAVA_HOME_11_X64} ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT --install "build-tools;30.0.3"
JAVA_HOME=${JAVA_HOME_17_X64} ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT --install "build-tools;35.0.0" "platform-tools" "platforms;android-35"
- name: Install virtual framebuffer (if not available) to allow running GUI on a headless server
run: |
@@ -74,11 +73,11 @@ jobs:
- name: Install Android maven plugin
run: |
mkdir -p ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.1
cd ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.1
curl -L -o android-maven-plugin-4.6.1.jar https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.1/android-maven-plugin-4.6.1.jar
curl -L -o android-maven-plugin-4.6.1.pom https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.1/android-maven-plugin-4.6.1.pom
#mvn install:install-file -Dfile=android-maven-plugin-4.6.1.jar -DgroupId=com.simpligility.maven.plugins -DartifactId=android-maven-plugin -Dversion=4.6.1 -Dpackaging=jar
mkdir -p ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.2
cd ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.2
curl -L -o android-maven-plugin-4.6.2.jar https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.2/android-maven-plugin-4.6.2.jar
curl -L -o android-maven-plugin-4.6.2.pom https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.2/android-maven-plugin-4.6.2.pom
#mvn install:install-file -Dfile=android-maven-plugin-4.6.2.jar -DgroupId=com.simpligility.maven.plugins -DartifactId=android-maven-plugin -Dversion=4.6.2 -Dpackaging=jar
cd -
mvn install -Dmaven.test.skip=true
mvn dependency:tree
@@ -86,40 +85,30 @@ jobs:
- name: Build/Install/Publish to GitHub Packages Apache Maven
run: |
export _JAVA_OPTIONS="-Xmx2g"
d=$(date +%m-%d)
# Replace date in forge-gui-mobile/src/forge/Forge.java
sed -i -e "s/-SNAPSHOT/-SNAPSHOT-${d}/g" forge-gui-mobile/src/forge/Forge.java
mvn -U -B -P android-release-build,android-release-sign install -e -Dsign.keystore=forge.keystore -Dsign.alias=Forge -Dsign.storepass=${{ secrets.SIGN_STORE_PASS }} -Dsign.keypass=${{ secrets.SIGN_STORE_PASS }} -Dcardforge-repo.username=${{ secrets.FTP_USERNAME }} -Dcardforge-repo.password=${{ secrets.FTP_PASSWORD }} -Dandroid.sdk.path=/usr/local/lib/android/sdk -Dandroid.buildToolsVersion=30.0.3 -Dmaven.test.skip=true
mkdir -p forge-gui-android/target/upload
mv forge-gui-android/target/*-signed-aligned.apk forge-gui-android/target/upload/
mv forge-gui-android/target/assets.zip forge-gui-android/target/upload/
cd forge-gui-android/target/upload/
# Get the first APK file in the folder
mvn -U -B -P android-release-build install -e -Dcardforge-repo.username=${{ secrets.FTP_USERNAME }} -Dcardforge-repo.password=${{ secrets.FTP_PASSWORD }} -Dandroid.sdk.path=/usr/local/lib/android/sdk -Dandroid.buildToolsVersion=35.0.0 -Dmaven.test.skip=true
mkdir upload
mv /home/runner/work/forge/forge/forge-gui-android/target/*-signed-aligned.apk upload/
mv /home/runner/work/forge/forge/forge-gui-android/target/assets.zip upload/
mv /home/runner/work/forge/forge/forge-gui-android/target/classes/assets/version.txt upload/
cd upload
ls
apk_file=$(find . -maxdepth 1 -type f -name '*.apk' -print -quit)
if [ -n "$apk_file" ]; then
version=$(echo "$apk_file" | grep -oP 'forge-android-\K\d+\.\d+\.\d+-SNAPSHOT' | sed 's/-signed-aligned.apk//')
echo "APK File: $apk_file"
echo "Version: $version"
mv *.apk "forge-android-$version-$d-signed-aligned.apk"
echo "$version-$d" > version.txt
else
echo "No .apk files found in the specified folder."
fi
cd -
env:
GITHUB_TOKEN: ${{ github.token }}
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
#if: ${{ inputs.upload_package }}
with:
server: ftp.cardforge.org
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: forge-gui-android/target/upload/
local-dir: upload/
server-dir: downloads/dailysnapshots/
state-name: .ftp-deploy-android-sync-state.json
- name: Send failure notification to Discord
if: failure() # This step runs only if the job fails
run: |
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"🔴 Android Snapshot Build Failed in branch: \`${{ github.ref_name }}\` by \`${{ github.actor }}\`.\nCheck logs: ${{ github.run_url }}\"}" \
${{ secrets.DISCORD_AUTOMATION_WEBHOOK }}

View File

@@ -8,9 +8,6 @@ on:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '30 18 * * *'
jobs:
build:
@@ -23,10 +20,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: cardforge-repo
@@ -55,13 +52,27 @@ jobs:
- name: Rename before upload
run: |
mkdir tarball
# If this works just gotta figure out how to append datetime
mv /home/runner/.m2/repository/forge/forge-gui-desktop/*/*.bz2 tarball/
cd tarball
out="$(basename -s .tar.bz2 *)"
d=$(date +%m-%d)
mv "${out}.tar.bz2" "${out}-${d}.tar.bz2"
mkdir izpack
# move bz2 and jar from work dir to izpack dir
mv /home/runner/work/forge/forge/forge-installer/*/*.{bz2,jar} izpack/
# move desktop build.txt to izpack
mv /home/runner/work/forge/forge/forge-gui-desktop/target/classes/build.txt izpack/
cd izpack
d=$(date +%m.%d)
# rename files and append date
for file in *.jar; do
bname="${file%.*}"
echo "file renamed to ${bname}-${d}.jar"
mv "${bname}.jar" "${bname}-${d}.jar"
done
for file in *.bz2; do
# remove .bz2
fname="${file%.*}"
# remove .tar
bname="${fname%.*}"
echo "file renamed to ${bname}-${d}.tar.bz2"
mv "${fname}.bz2" "${bname}-${d}.tar.bz2"
done
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
@@ -69,13 +80,16 @@ jobs:
server: ftp.cardforge.org
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: tarball/
local-dir: izpack/
server-dir: downloads/dailysnapshots/
exclude: |
*.jar
*.pom
*.repositories
*.xml
- name: Send failure notification to Discord
if: failure() # This step runs only if the job fails
run: |
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"🔴 Desktop Snapshot Build Failed in branch: \`${{ github.ref_name }}\` by \`${{ github.actor }}\`.\nCheck logs: ${{ github.run_url }}\"}" \
${{ secrets.DISCORD_AUTOMATION_WEBHOOK }}

View File

@@ -0,0 +1,60 @@
name: Test Android build
on:
push:
paths: [ 'forge-gui-android/**' ]
pull_request:
paths: [ 'forge-gui-android/**' ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
deployments: write
packages: write
strategy:
matrix:
java: [ '17' ]
name: Test with Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Install old maven (3.8.1)
run: |
curl -o apache-maven-3.8.1-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/3.8.1/binaries/apache-maven-3.8.1-bin.tar.gz
tar xf apache-maven-3.8.1-bin.tar.gz
export PATH=$PWD/apache-maven-3.8.1/bin:$PATH
export MAVEN_HOME=$PWD/apache-maven-3.8.1
mvn --version
- name: Set Up Android tools
run: |
JAVA_HOME=${JAVA_HOME_17_X64} ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT --install "build-tools;35.0.0" "platform-tools" "platforms;android-35"
- name: Install Android maven plugin
run: |
mkdir -p ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.2
cd ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.2
curl -L -o android-maven-plugin-4.6.2.jar https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.2/android-maven-plugin-4.6.2.jar
curl -L -o android-maven-plugin-4.6.2.pom https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.2/android-maven-plugin-4.6.2.pom
#mvn install:install-file -Dfile=android-maven-plugin-4.6.2.jar -DgroupId=com.simpligility.maven.plugins -DartifactId=android-maven-plugin -Dversion=4.6.2 -Dpackaging=jar
cd -
mvn install -Dmaven.test.skip=true
mvn dependency:tree
- name: Install virtual framebuffer (if not available) to allow running GUI on a headless server
run: command -v Xvfb >/dev/null 2>&1 || { sudo apt update && sudo apt install -y xvfb; }
- name: Run build in virtual framebuffer
run: |
export DISPLAY=":1"
Xvfb :1 -screen 0 800x600x8 &
mvn -U -B -P android-test-build verify -e -T 1C -Dandroid.sdk.path=$ANDROID_SDK_ROOT -Dandroid.buildToolsVersion=35.0.0 -Dmaven.test.skip=true

View File

@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11' ]
java: [ '17' ]
name: Test with Java ${{ matrix.Java }}
steps:
- uses: actions/checkout@v3
@@ -26,4 +26,4 @@ jobs:
run: |
export DISPLAY=":1"
Xvfb :1 -screen 0 800x600x8 &
mvn -U -B clean -P windows-linux test
mvn -U -B clean test

View File

@@ -14,10 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: cardforge-repo

3
.gitignore vendored
View File

@@ -12,6 +12,7 @@
.settings
.classpath
.project
.checkstyle
# Ignore VS Code config files
@@ -24,6 +25,8 @@
nbactions.xml
# Ignore flattened pom
.flattened-pom.xml
# Ignore binaries, temp files and test output, everywhere

View File

@@ -1,18 +1,6 @@
<!--
Derived from: https://stackoverflow.com/a/67002852
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
<mirrors>
<mirror>
<id>4thline-repo-http-unblocker</id>
<mirrorOf>4thline-repo</mirrorOf>
<name></name>
<url>http://4thline.org/m2</url>
</mirror>
</mirrors>
<servers>
<server>
<id>cardforge-repo</id>

View File

@@ -7,7 +7,7 @@ Dev instructions here: [Getting Started](https://github.com/Card-Forge/forge/wik
## Requirements / Tools
- you favourite Java IDE (IntelliJ, Eclipse, VSCodium, Emacs, Vi...)
- Java JDK 8 or later (some IDEs such as Eclipse require JDK11+, whereas the Android build currently only works with JDK8)
- Java JDK 17 or later
- Git
- Git client (optional)
- Maven
@@ -46,9 +46,9 @@ At this time, Eclipse is not the recommended IDE for Forge development.
- Clone your forked repo to your local machine.
- Make sure the Java SDK is installed -- not just the JRE. Java 8 or newer required. If you execute `java -version` at the shell or command prompt, it should report version 1.8 or later.
- Make sure the Java SDK is installed -- not just the JRE. Java 17 or newer required. If you execute `java -version` at the shell or command prompt, it should report version 17 or later.
- Install Eclipse 2018-12 or later for Java. Launch it.
- Install Eclipse 2021-12 or later for Java. Launch it.
- Create a workspace. Go to the workbench. Right-click inside of Package Explorer > Import... > Maven > Existing Maven Projects > Navigate to root path of the local forge repo and
ensure everything is checked > Finish.
@@ -79,16 +79,15 @@ This is the configuration used for doing mobile development using the Windows /
### Eclipse / Android SDK Integration
Google no longer supports Android SDK releases for Eclipse. That said, it is still possible to build and debug Android platforms.
Google no longer supports Android SDK releases for Eclipse. use IntelliJ.
#### Android SDK
Reference SO for obtaining a specific release: https://stackoverflow.com/questions/27043522/where-can-i-download-an-older-version-of-the-android-sdk
TBD
##### Windows
Download the following archived version of the Android SDK: http://dl-ssl.google.com/android/repository/tools_r25.2.3-windows.zip. Install it somewhere on your machine. This is referenced
in the following instructions as your 'Android SDK Install' path.
TBD
##### Linux / Mac OSX
@@ -96,68 +95,30 @@ TBD
#### Android Plugin for Eclipse
Google's last plugin release does not work completely with target's running Android 7.0 or later. Download the ADT-24.2.0-20160729.zip plugin
from: https://github.com/khaledev/ADT/releases
In Eclipse go to: Help > Install New Software... > Add > Name: ADT Update, Click on the "Archive:" button and navigate to the downloaded ADT-24.2.0-20160729.zip file > Add. Install all "Developer Tools". Eclipse
should restart and prompt you to run the SDK Manager. Launch it and continue to the next steps below.
TBD
#### Android Platform
In Eclipse, if the SDK Manager is not already running, go to Window > Android SDK Manager. Install the following options / versions:
In Intellij, if the SDK Manager is not already running, go to Tools > Android > Android SDK Manager. Install the following options / versions:
- Android SDK Build-tools 26.0.1
- Android 8.0.0 (API 26) SDK Platform
- Google USB Driver (in case your phone is not detected by ADB)
Note that this will populate additional tools in the Android SDK install path extracted above.
- Android SDK Build-tools 35.0.0
- Android 15 (API 35) SDK Platform
#### Proguard update
The Proguard included with the Android SDK Build-tools is outdated and does not work with Java 1.8. Download Proguard 6.0.3 or later (last tested with 7.0.1) from https://github.com/Guardsquare/proguard
- Go to the Android SDK install path. Rename the tools/proguard/ path to tools/proguard-4.7/.
- Extract your Proguard version to the Android SDK install path under tools/. You will need to either rename the dir proguard-<your-version> to proguard/ or, if your filesystem supports it, use a symbolic link (the later is highly recommended), such as `ln -s proguard proguard-<your-version>`.
Standalone Proguard 7.6.0 is included with the project (proguard.jar) under forge-gui-android > tools and supports up to Java 23 (latest android uses Java 17).
#### Android Build
The Eclipse plug-ins do NOT support building things for Android. They do however allow you to use the debugger so you can still set breakpoints and trace
things out. The steps below show how to generate a debug Android build.
1) Create a Maven build for the forge top-level project. Right-click on the forge project. Run as.. > Maven build...
- On the Main tab, set Goals: clean install
2) Run forge Maven build. If everything built, you should see "BUILD SUCCESS" in the Console View.
3) Right-click on the forge-gui-android project. Run as.. > Maven build...
- On the Main tab, set Goals: install, Profiles: android-debug
- On the Environment tab, you may need to define the variable ANDROID_HOME with the value containing the path to your Android SDK installation. For example, Variable: ANDROID_HOME, Value: Your Android SDK install path here.
4) Run the forge-gui-android Maven build. This may take a few minutes. If everything worked, you should see "BUILD SUCCESS" in the Console View.
Assuming you got this far, you should have an Android forge-android-[version].apk in the forge-gui-android/target path.
TBD
#### Android Deploy
You'll need to have the Android SDK install path platform-tools/ path in your command search path to easily deploy builds.
- Open a command prompt. Navigate to the forge-gui-android/target/ path.
- Connect your Android device to your dev machine.
- Ensure the device is visible using `adb devices`
- Remove the old Forge install if present: `adb uninstall forge.app`
- Install the new apk: `adb install forge-android-[version].apk`
TBD
#### Android Debugging
Assuming the apk is installed, launch it from the device.
In Eclipse, launch the DDMS. Window > Perspective > Open Perspective > Other... > DDMS. You should see the forge app in the list. Highlight the app, click on the green debug button and a
green debug button should appear next to the app's name. You can now set breakpoints and step through the source code.
TBD
### Windows / Linux SNAPSHOT build

106
README.md
View File

@@ -1,50 +1,100 @@
# Forge
# ⚔️ Forge: The Magic: The Gathering Rules Engine
Join the [Discord](https://discord.gg/HcPJNyD66a)
Join the **Forge community** on [Discord](https://discord.gg/HcPJNyD66a)!
[![Test build](https://github.com/Card-Forge/forge/actions/workflows/test-build.yaml/badge.svg)](https://github.com/Card-Forge/forge/actions/workflows/test-build.yaml)
## Introduction
---
Forge is a "Rules Engine" for the game Magic: the Gathering.
Forge is not related in any way with Wizards of the Coast.
Forge is open source software released under the GNU Public License.
Forge is developed by a community of programmers who love trading card games.
## ✨ Introduction
Forge is a cross-platform application and can be run on Windows, Mac, Linux and Android. It is written in Java. The engine is written in Java. The engine is designed to be extensible, so any interested programmer can join and help add new features and cards to the game. Any tech savvy user could read out card scripting system to create cards to be used inside Forge.
The engine allows you to play in a handful of different single player environments or online against other players.
**Forge** is a dynamic and open-source **Rules Engine** tailored for **Magic: The Gathering** enthusiasts. Developed by a community of passionate programmers, Forge allows players to explore the rich universe of MTG through a flexible, engaging platform.
**Note:** Forge operates independently and is not affiliated with Wizards of the Coast.
## Installation
---
For a more in depth User Guide, please visit the [User Guide](https://github.com/Card-Forge/forge/wiki/User-Guide)
## 🌟 Key Features
For Desktop users, download the [Latest Releases](https://github.com/Card-Forge/forge/releases/latest) which are typically based around Set releases.
Or download the [Snapshot Build](https://downloads.cardforge.org/dailysnapshots/) the file that starts with "forge-gui-desktop".
This file is tarball, and may need to be extracted twice depending on which program is being used to extract it.
We recommend extracting to a new folder rather than on top of an existing installation.
**For users who have played Forge before all of your user data is stored separately so you don't have to worry about losing it on upgrade.**
- **🌐 Cross-Platform Support:** Play on **Windows, Mac, Linux,** and **Android**.
- **🔧 Extensible Architecture:** Built in **Java**, Forge encourages developers to contribute by adding features and cards.
- **🎮 Versatile Gameplay:** Dive into single-player modes or challenge opponents online!
Java 8 or later is required to run Forge. Please make sure is the right version is installed in your enviroment. Check the user guide for more info.
---
For Android users, download the APK file from [Snapshot Build](https://downloads.cardforge.org/dailysnapshots/) to your device.
On first run, Forge will download all needed data.
## 🛠️ Installation Guide
## Modes of Play
### 📥 Desktop Installation
1. **Latest Releases:** Download the latest version [here](https://github.com/Card-Forge/forge/releases/latest).
2. **Snapshot Build:** For the latest development version, grab the `forge-gui-desktop` tarball from our [Snapshot Build](https://github.com/Card-Forge/forge/releases/tag/daily-snapshots).
- **Tip:** Extract to a new folder to prevent version conflicts.
3. **User Data Management:** Previous players data is preserved during upgrades.
4. **Java Requirement:** Ensure you have **Java 17 or later** installed.
Forge has a variety of ways to play the game. The most popular way is our Adventure mode, which is a single player campaign that allows you to play against a variety of AI opponents.
You walk around an overworld map, and can challenge opponents to games of Magic. As you play, you'll collect more cards and items to improve your abilities.
### 📱 Android Installation
- Download the **APK** from the [Snapshot Build](https://github.com/Card-Forge/forge/releases/tag/daily-snapshots). On the first launch, Forge will automatically download all necessary assets.
Check the [Gameplay Guide](https://github.com/Card-Forge/forge/wiki/Gameplay-Guide) for more info.
---
## 🎮 Modes of Play
Forge offers various exciting gameplay options:
### 🌍 Adventure Mode
Embark on a thrilling single-player journey where you can:
- Explore an overworld map.
- Challenge diverse AI opponents.
- Collect cards and items to boost your abilities.
![Adventure Mode](https://downloads.cardforge.org/images/site/adventure-mode.png "Adventure Mode")
### 🔍 Quest Modes
Engage in focused gameplay without the overworld exploration—perfect for quick sessions!
Forge has several Quest modes, which is similar but without the overworld map.
### 🤖 AI Formats
Test your skills against AI in multiple formats:
- **Sealed**
- **Draft**
- **Commander**
- **Cube**
You can also play against the AI in a variety of formats, such as Sealed, Draft, Commander and Cube.
For comprehensive gameplay instructions, visit our [Gameplay Guide](https://github.com/Card-Forge/forge/wiki/Gameplay-Guide).
## Questions
---
If you have any questions, please join the Discord channel. Read the #rules and the frequently-asked-questions.
If your question is not answered there, feel free to ask in the #help channel.
## 💬 Support & Community
Need help? Join our vibrant Discord community!
- 📜 Read the **#rules** and explore the **FAQ**.
- ❓ Ask your questions in the **#help** channel for assistance.
---
## 🤝 Contributing to Forge
We love community contributions! Interested in helping? Check out our [Contributing Guidelines](CONTRIBUTING.md) for details on how to get started.
---
## About Forge
Forge aims to deliver an immersive and customizable Magic: The Gathering experience for fans around the world.
### 📊 Repository Statistics
| Metric | Count |
|----------------|-------------------------------------------------------------|
| **⭐ Stars:** | [![GitHub stars](https://img.shields.io/github/stars/Card-Forge/forge?style=flat-square)](https://github.com/Card-Forge/forge/stargazers) |
| **🍴 Forks:** | [![GitHub forks](https://img.shields.io/github/forks/Card-Forge/forge?style=flat-square)](https://github.com/Card-Forge/forge/network) |
| **👥 Contributors:** | [![GitHub contributors](https://img.shields.io/github/contributors/Card-Forge/forge?style=flat-square)](https://github.com/Card-Forge/forge/graphs/contributors) |
---
**📄 License:** [GPL-3.0](LICENSE)
<div align="center" style="display: flex; align-items: center; justify-content: center;">
<div style="margin-left: auto;">
<a href="#top">
<img src="https://img.shields.io/badge/Back%20to%20Top-000000?style=for-the-badge&logo=github&logoColor=white" alt="Back to Top">
</a>
</div>
</div>

117
adventure-editor/pom.xml Normal file
View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>adventure-editor</artifactId>
<packaging>jar</packaging>
<name>Adventure Editor</name>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<directory>${project.basedir}</directory>
<includes>
<include>**/gear.gif</include>
</includes>
</resource>
</resources>
<finalName>adventure-editor</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<basedir>${basedir}/${configSourceDirectory}</basedir>
<filesToInclude>adventure-editor.sh, adventure-editor.command, adventure-editor.cmd</filesToInclude>
<outputBasedir>${project.build.directory}</outputBasedir>
<outputDir>.</outputDir>
<regex>false</regex>
<replacements>
<replacement>
<token>$project.build.finalName$</token>
<value>${project.build.finalName}-jar-with-dependencies.jar</value>
</replacement>
</replacements>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<attach>false</attach>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>forge.adventure.Main</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<SplashScreen-Image>splash/gear.gif</SplashScreen-Image>
</manifestEntries>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<!-- this is used for inheritance merges -->
<phase>package</phase>
<!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>forge</groupId>
<artifactId>forge-gui</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>forge</groupId>
<artifactId>forge-gui-mobile</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>26.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
</project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

View File

@@ -0,0 +1,24 @@
@echo off
pushd %~dp0
java -version 1>nul 2>nul || (
echo no java installed
popd
exit /b 2
)
for /f tokens^=2^ delims^=.-_^+^" %%j in ('java -fullversion 2^>^&1') do set "jver=%%j"
if %jver% LEQ 16 (
echo unsupported java
popd
exit /b 2
)
if %jver% GEQ 17 (
java -Xmx4096m -Dfile.encoding=UTF-8 -jar $project.build.finalName$
popd
exit /b 0
)
popd

View File

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

Before

Width:  |  Height:  |  Size: 222 KiB

After

Width:  |  Height:  |  Size: 222 KiB

View File

@@ -16,7 +16,6 @@ public class Main {
public static void main(String[] args) {
GuiBase.setInterface(new GuiMobile(Files.exists(Paths.get("./res"))?"./":"../forge-gui/"));
GuiBase.setDeviceInfo("", "", 0, 0);
Config.instance();
new EditorMainWindow();
new EditorMainWindow(Config.instance());
}
}

View File

@@ -2,7 +2,9 @@ package forge.adventure.editor;
import forge.adventure.data.DialogData;
import javax.swing.*;
import javax.swing.JSpinner;
import javax.swing.JTextField;
import javax.swing.SpinnerNumberModel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@@ -158,9 +160,9 @@ public class ActionEdit extends FormPanel {
advanceQuestFlag.setText(currentData.advanceQuestFlag);
advanceCharacterFlag.setText(currentData.advanceCharacterFlag);
battleWithActorID.setText("" + currentData.battleWithActorID);
activateObjectID.setText("" + currentData.battleWithActorID);
deleteMapObject.setText("" + currentData.deleteMapObject);
battleWithActorID.setText(String.valueOf(currentData.battleWithActorID));
activateObjectID.setText(String.valueOf(currentData.battleWithActorID));
deleteMapObject.setText(String.valueOf(currentData.deleteMapObject));
setColorIdentity.setText(currentData.setColorIdentity);
addLife.getModel().setValue(currentData.addLife);
addReputation.getModel().setValue(currentData.addMapReputation);

View File

@@ -2,20 +2,27 @@ package forge.adventure.editor;
import forge.adventure.data.DialogData;
import javax.swing.*;
import javax.swing.DefaultListCellRenderer;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JToolBar;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ActionListener;
/**
* Editor class to edit configuration, maybe moved or removed
*/
public class ActionEditor extends JComponent{
public class ActionEditor extends JComponent {
DefaultListModel<DialogData.ActionData> model = new DefaultListModel<>();
JList<DialogData.ActionData> list = new JList<>(model);
JToolBar toolBar = new JToolBar("toolbar");
ActionEdit edit=new ActionEdit();
ActionEdit edit = new ActionEdit();
boolean updating;
@@ -25,43 +32,43 @@ public class ActionEditor extends JComponent{
JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if(!(value instanceof DialogData.ActionData))
if (!(value instanceof DialogData.ActionData))
return label;
DialogData.ActionData action=(DialogData.ActionData) value;
/*DialogData.ActionData action=(DialogData.ActionData) value;
StringBuilder builder=new StringBuilder();
// if(action.type==null||action.type.isEmpty())
if(action.type==null||action.type.isEmpty())
builder.append("Action");
// else
// builder.append(action.type);
label.setText(builder.toString());
else
builder.append(action.type);*/
label.setText("Action");
return label;
}
}
public void addButton(String name, ActionListener action)
{
JButton newButton=new JButton(name);
public void addButton(String name, ActionListener action) {
JButton newButton = new JButton(name);
newButton.addActionListener(action);
toolBar.add(newButton);
}
public ActionEditor()
{
public ActionEditor() {
list.setCellRenderer(new RewardDataRenderer());
list.addListSelectionListener(e -> ActionEditor.this.updateEdit());
addButton("add", e -> ActionEditor.this.addAction());
addButton("remove", e -> ActionEditor.this.remove());
addButton("copy", e -> ActionEditor.this.copy());
BorderLayout layout=new BorderLayout();
BorderLayout layout = new BorderLayout();
setLayout(layout);
add(list, BorderLayout.LINE_START);
add(toolBar, BorderLayout.PAGE_START);
add(edit,BorderLayout.CENTER);
add(edit, BorderLayout.CENTER);
edit.addChangeListener(e -> emitChanged());
}
protected void emitChanged() {
if (updating)
return;
@@ -73,63 +80,64 @@ public class ActionEditor extends JComponent{
}
}
}
private void copy() {
int selected=list.getSelectedIndex();
if(selected<0)
int selected = list.getSelectedIndex();
if (selected < 0)
return;
DialogData.ActionData data=new DialogData.ActionData(model.get(selected));
model.add(model.size(),data);
DialogData.ActionData data = new DialogData.ActionData(model.get(selected));
model.add(model.size(), data);
}
private void updateEdit() {
int selected=list.getSelectedIndex();
if(selected<0)
int selected = list.getSelectedIndex();
if (selected < 0)
return;
edit.setCurrentAction(model.get(selected));
}
void addAction()
{
DialogData.ActionData data=new DialogData.ActionData();
model.add(model.size(),data);
void addAction() {
DialogData.ActionData data = new DialogData.ActionData();
model.add(model.size(), data);
}
void remove()
{
int selected=list.getSelectedIndex();
if(selected<0)
void remove() {
int selected = list.getSelectedIndex();
if (selected < 0)
return;
model.remove(selected);
}
public void setAction(DialogData.ActionData[] actions) {
model.clear();
if(actions==null)
if (actions == null)
return;
for (int i=0;i<actions.length;i++) {
if (actions[i].grantRewards.length > 0){
for (int i = 0; i < actions.length; i++) {
if (actions[i].grantRewards.length > 0) {
continue; //handled in separate editor and joined in on save, will get duplicated if it appears here
}
model.add(i,actions[i]);
model.add(i, actions[i]);
}
}
public DialogData.ActionData[] getAction() {
DialogData.ActionData[] action= new DialogData.ActionData[model.getSize()];
for(int i=0;i<model.getSize();i++)
{
action[i]=model.get(i);
DialogData.ActionData[] action = new DialogData.ActionData[model.getSize()];
for (int i = 0; i < model.getSize(); i++) {
action[i] = model.get(i);
}
return action;
}
public void clear(){
public void clear() {
updating = true;
model.clear();
updating = false;
}
public void addChangeListener(ChangeListener listener) {
listenerList.add(ChangeListener.class, listener);
}

View File

@@ -45,17 +45,16 @@ public class BiomeStructureDataMappingEditor extends JComponent {
JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if(!(value instanceof BiomeStructureData.BiomeStructureDataMapping))
if(!(value instanceof BiomeStructureData.BiomeStructureDataMapping biomeData))
return label;
BiomeStructureData.BiomeStructureDataMapping data=(BiomeStructureData.BiomeStructureDataMapping) value;
// Get the renderer component from parent class
label.setText(data.name);
label.setText(biomeData.name);
if(editor.data!=null)
{
SwingAtlas itemAtlas=new SwingAtlas(Config.instance().getFile(editor.data.structureAtlasPath));
if(itemAtlas.has(data.name))
label.setIcon(itemAtlas.get(data.name));
if(itemAtlas.has(biomeData.name))
label.setIcon(itemAtlas.get(biomeData.name));
else
{
ImageIcon img=itemAtlas.getAny();

View File

@@ -25,9 +25,8 @@ public class DialogOptionEditor extends JComponent{
JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if(!(value instanceof DialogData))
if(!(value instanceof DialogData dialog))
return label;
DialogData dialog=(DialogData) value;
StringBuilder builder=new StringBuilder();
if(dialog.name==null||dialog.name.isEmpty())
builder.append("[[Blank Option]]");

View File

@@ -0,0 +1,97 @@
package forge.adventure.editor;
import forge.adventure.util.Config;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JTabbedPane;
import javax.swing.JToolBar;
import javax.swing.UIManager;
import java.awt.BorderLayout;
import java.awt.Desktop;
import java.awt.EventQueue;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
import java.security.CodeSource;
import java.util.ArrayList;
import java.util.List;
/**
* Editor class to edit configuration, maybe moved or removed
*/
public class EditorMainWindow extends JFrame {
public final static WorldEditor worldEditor = new WorldEditor();
JTabbedPane tabs = new JTabbedPane();
public EditorMainWindow(Config config) {
UIManager.LookAndFeelInfo[] var1 = UIManager.getInstalledLookAndFeels();
for (UIManager.LookAndFeelInfo info : var1) {
if ("Nimbus".equals(info.getName())) {
try {
UIManager.setLookAndFeel(info.getClassName());
} catch (Throwable ignored) {
}
break;
}
}
this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
this.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
setVisible(false);
System.exit(0);
}
});
BorderLayout layout = new BorderLayout();
JToolBar toolBar = new JToolBar("toolbar");
JButton newButton = new JButton("GDX Particle Editor Tool");
newButton.addActionListener(e -> EventQueue.invokeLater(() -> {
newButton.setEnabled(false);
try {
CodeSource codeSource = EditorMainWindow.class.getProtectionDomain().getCodeSource();
File jarFile = new File(codeSource.getLocation().toURI().getPath());
String jarDir = jarFile.getParentFile().getPath();
Desktop.getDesktop().open(new File(jarDir + "/gdx-particle-editor.jar"));
} catch (Exception ex) {
new ErrorDialog("Error", ex.getMessage());
newButton.setEnabled(true);
}
}));
JButton quit = new JButton("Quit");
quit.addActionListener(e -> System.exit(0));
toolBar.add(newButton);
toolBar.add(quit);
setLayout(layout);
toolBar.setFloatable(false);
add(toolBar, BorderLayout.NORTH);
add(tabs, BorderLayout.CENTER);
tabs.addTab("World", worldEditor);
tabs.addTab("POI", new PointOfInterestEditor());
tabs.addTab("Items", new ItemsEditor());
tabs.addTab("Enemies", new EnemyEditor());
tabs.addTab("Quests", new QuestEditor());
setSize(config.getSettingData().width, config.getSettingData().height);
setLocationRelativeTo(null);
setVisible(true);
}
static class ErrorDialog {
public ErrorDialog(String title, String message) {
List<Object> options = new ArrayList<>();
JButton ok = new JButton("OK");
options.add(ok);
JOptionPane pane = new JOptionPane(message, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION, null, options.toArray());
JDialog dlg = pane.createDialog(JOptionPane.getRootFrame(), title);
ok.addActionListener(e -> {
dlg.setVisible(false);
System.exit(0);
});
dlg.setResizable(false);
dlg.setVisible(true);
}
}
}

View File

@@ -27,17 +27,16 @@ public class ItemsEditor extends JComponent {
JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if(!(value instanceof ItemData))
if(!(value instanceof ItemData item))
return label;
ItemData Item=(ItemData) value;
// Get the renderer component from parent class
label.setText(Item.name);
label.setText(item.name);
if(itemAtlas==null)
itemAtlas=new SwingAtlas(Config.instance().getFile(Paths.ITEMS_ATLAS));
if(itemAtlas.has(Item.iconName))
label.setIcon(itemAtlas.get(Item.iconName));
if(itemAtlas.has(item.iconName))
label.setIcon(itemAtlas.get(item.iconName));
else
{
ImageIcon img=itemAtlas.getAny();

View File

@@ -2,10 +2,23 @@ package forge.adventure.editor;
import forge.adventure.data.AdventureQuestData;
import javax.swing.*;
import javax.swing.AbstractAction;
import javax.swing.BoxLayout;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.KeyStroke;
import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.Enumeration;
@@ -285,7 +298,7 @@ public class QuestEdit extends FormPanel {
}
setVisible(true);
updating=true;
id.setText(currentData.getID() + "");
id.setText(String.valueOf(currentData.getID()));
name.setText(currentData.name);
description.setText(currentData.description);
synopsis.setText(currentData.synopsis);

View File

@@ -26,9 +26,8 @@ public class QuestEditor extends JComponent {
JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if(!(value instanceof AdventureQuestData))
if(!(value instanceof AdventureQuestData quest))
return label;
AdventureQuestData quest=(AdventureQuestData) value;
// Get the renderer component from parent class
label.setText(quest.name);

View File

@@ -26,9 +26,8 @@ public class QuestStageEditor extends JComponent{
JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if(!(value instanceof AdventureQuestStage))
if(!(value instanceof AdventureQuestStage stageData))
return label;
AdventureQuestStage stageData=(AdventureQuestStage) value;
label.setText(stageData.name);
//label.setIcon(new ImageIcon(Config.instance().getFilePath(stageData.sourcePath))); //Type icon eventually?
return label;

View File

@@ -25,10 +25,10 @@ public class RewardEdit extends FormPanel {
TextListEdit colors =new TextListEdit(new String[] { "White", "Blue", "Black", "Red", "Green" });
TextListEdit rarity =new TextListEdit(new String[] { "Basic Land", "Common", "Uncommon", "Rare", "Mythic Rare" });
TextListEdit subTypes =new TextListEdit();
TextListEdit cardTypes =new TextListEdit(Arrays.asList(CardType.CoreType.values()).stream().map(CardType.CoreType::toString).toArray(String[]::new));
TextListEdit superTypes =new TextListEdit(Arrays.asList(CardType.Supertype.values()).stream().map(CardType.Supertype::toString).toArray(String[]::new));
TextListEdit cardTypes =new TextListEdit(Arrays.stream(CardType.CoreType.values()).map(CardType.CoreType::toString).toArray(String[]::new));
TextListEdit superTypes =new TextListEdit(Arrays.stream(CardType.Supertype.values()).map(CardType.Supertype::toString).toArray(String[]::new));
TextListEdit manaCosts =new TextListEdit();
TextListEdit keyWords =new TextListEdit(Arrays.asList(Keyword.values()).stream().map(Keyword::toString).toArray(String[]::new));
TextListEdit keyWords =new TextListEdit(Arrays.stream(Keyword.values()).map(Keyword::toString).toArray(String[]::new));
JComboBox colorType =new JComboBox(new String[] { "Any", "Colorless", "MultiColor", "MonoColor"});
JTextField cardText =new JTextField();
private boolean updating=false;

View File

@@ -5,7 +5,7 @@ import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.utils.Array;
import javax.imageio.ImageIO;
import javax.swing.*;
import javax.swing.ImageIcon;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.ArrayList;
@@ -65,7 +65,7 @@ public class SwingAtlas {
return new ImageIcon(img.getSubimage(sprite.left,sprite.top, sprite.width, sprite.height).getScaledInstance((int) (imageSize*(sprite.width/(float)sprite.height)),imageSize,SCALE_FAST));
}
catch (IOException e)
catch (Exception e)
{
return null;
}

View File

@@ -3,10 +3,17 @@ package forge.adventure.editor;
import forge.adventure.data.BiomeData;
import forge.adventure.data.BiomeTerrainData;
import javax.swing.*;
import javax.swing.DefaultListCellRenderer;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JToolBar;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ActionListener;
/**
@@ -29,11 +36,11 @@ public class TerrainsEditor extends JComponent{
if(!(value instanceof BiomeTerrainData))
return label;
BiomeTerrainData terrainData=(BiomeTerrainData) value;
StringBuilder builder=new StringBuilder();
/*StringBuilder builder=new StringBuilder();
builder.append("Terrain");
builder.append(" ");
builder.append(terrainData.spriteName);
label.setText(builder.toString());
builder.append(terrainData.spriteName);*/
label.setText("Terrain " + terrainData.spriteName);
return label;
}
}

View File

@@ -43,9 +43,8 @@ public class WorldEditor extends JComponent {
JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if(!(value instanceof BiomeData))
if(!(value instanceof BiomeData biome))
return label;
BiomeData biome=(BiomeData) value;
// Get the renderer component from parent class
label.setText(biome.name);

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

View File

@@ -1,309 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.64-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>forge-adventure</artifactId>
<packaging>jar</packaging>
<name>Forge Adventure</name>
<repositories>
<repository>
<id>4thline-repo</id>
<url>http://4thline.org/m2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<directory>${project.basedir}</directory>
<includes>
<include>**/*.vert</include>
<include>**/*.frag</include>
<include>**/title_bg_lq.png</include>
<include>**/title_bg_lq_portrait.png</include>
<include>**/transition.png</include>
<include>**/adv_bg_texture.jpg</include>
<include>**/adv_bg_splash.png</include>
<include>**/bg_splash.png</include>
<include>**/bg_texture.jpg</include>
<include>**/font1.ttf</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>1.7.25</version>
<executions>
<execution>
<id>l4j-adv</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<outfile>${project.build.directory}/forge-adventure-editor-java8.exe</outfile>
<jar>${project.build.finalName}-jar-with-dependencies.jar</jar>
<dontWrapJar>true</dontWrapJar>
<errTitle>forge</errTitle>
<icon>src/main/config/forge-adventure-editor.ico</icon>
<classPath>
<mainClass>forge.adventure.Main</mainClass>
<addDependencies>false</addDependencies>
<preCp>anything</preCp>
</classPath>
<jre>
<minVersion>1.8.0</minVersion>
<maxHeapSize>4096</maxHeapSize>
<opts>
<opt>-Dfile.encoding=UTF-8</opt>
</opts>
</jre>
<versionInfo>
<fileVersion>
1.0.0.0
</fileVersion>
<txtFileVersion>
1.0.0.0
</txtFileVersion>
<fileDescription>Forge</fileDescription>
<copyright>Forge</copyright>
<productVersion>
1.0.0.0
</productVersion>
<txtProductVersion>
1.0.0.0
</txtProductVersion>
<productName>forge-adventure-editor</productName>
<internalName>forge-adventure-editor</internalName>
<originalFilename>forge-adventure-editor-java8.exe</originalFilename>
</versionInfo>
</configuration>
</execution>
<!--extra-->
<execution>
<id>l4j-adv2</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<outfile>${project.build.directory}/forge-adventure-editor.exe</outfile>
<jar>${project.build.finalName}-jar-with-dependencies.jar</jar>
<dontWrapJar>true</dontWrapJar>
<errTitle>forge</errTitle>
<downloadUrl>https://www.oracle.com/java/technologies/downloads/</downloadUrl>
<icon>src/main/config/forge-adventure-editor.ico</icon>
<classPath>
<mainClass>forge.adventure.Main</mainClass>
<addDependencies>false</addDependencies>
<preCp>anything</preCp>
</classPath>
<jre>
<minVersion>11.0.1</minVersion>
<jdkPreference>jdkOnly</jdkPreference>
<maxHeapSize>4096</maxHeapSize>
<opts>
<opt>-Dfile.encoding=UTF-8</opt>
<opt>--add-opens java.base/java.lang=ALL-UNNAMED</opt>
<opt>--add-opens java.base/java.math=ALL-UNNAMED</opt>
<opt>--add-opens java.base/jdk.internal.misc=ALL-UNNAMED</opt>
<opt>--add-opens java.base/java.nio=ALL-UNNAMED</opt>
<opt>--add-opens=java.base/sun.nio.ch=ALL-UNNAMED</opt>
<opt>--add-opens java.base/java.util=ALL-UNNAMED</opt>
<opt>--add-opens java.base/java.lang.reflect=ALL-UNNAMED</opt>
<opt>--add-opens java.base/java.text=ALL-UNNAMED</opt>
<opt>--add-opens java.desktop/java.awt=ALL-UNNAMED</opt>
<opt>--add-opens java.desktop/java.awt.font=ALL-UNNAMED</opt>
<opt>--add-opens java.desktop/java.awt.image=ALL-UNNAMED</opt>
<opt>--add-opens java.desktop/java.awt.color=ALL-UNNAMED</opt>
<opt>--add-opens java.desktop/sun.awt.image=ALL-UNNAMED</opt>
<opt>--add-opens java.desktop/javax.swing=ALL-UNNAMED</opt>
<opt>--add-opens java.desktop/javax.swing.border=ALL-UNNAMED</opt>
<opt>--add-opens java.desktop/javax.swing.event=ALL-UNNAMED</opt>
<opt>--add-opens java.desktop/sun.swing=ALL-UNNAMED</opt>
<opt>--add-opens java.desktop/java.beans=ALL-UNNAMED</opt>
<opt>--add-opens java.base/java.util.concurrent=ALL-UNNAMED</opt>
<opt>--add-opens java.base/java.net=ALL-UNNAMED</opt>
<opt>-Dio.netty.tryReflectionSetAccessible=true</opt>
</opts>
</jre>
<versionInfo>
<fileVersion>
1.0.0.0
</fileVersion>
<txtFileVersion>
1.0.0.0
</txtFileVersion>
<fileDescription>Forge</fileDescription>
<copyright>Forge</copyright>
<productVersion>
1.0.0.0
</productVersion>
<txtProductVersion>
1.0.0.0
</txtProductVersion>
<productName>forge-adventure-editor</productName>
<internalName>forge-adventure-editor</internalName>
<originalFilename>forge-adventure-editor.exe</originalFilename>
</versionInfo>
</configuration>
</execution>
<!--extra-->
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<basedir>${basedir}/${configSourceDirectory}</basedir>
<filesToInclude>forge-adventure-editor.sh, forge-adventure-editor-mac.sh, forge-adventure-editor.command, forge-adventure-editor.cmd</filesToInclude>
<outputBasedir>${project.build.directory}</outputBasedir>
<outputDir>.</outputDir>
<regex>false</regex>
<replacements>
<replacement>
<token>$project.build.finalName$</token>
<value>${project.build.finalName}-jar-with-dependencies.jar</value>
</replacement>
</replacements>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<attach>false</attach>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>forge.adventure.Main</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<!-- this is used for inheritance merges -->
<phase>package</phase>
<!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx</artifactId>
<version>1.12.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-platform</artifactId>
<version>1.12.1</version>
<classifier>natives-desktop</classifier>
</dependency>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-freetype</artifactId>
<version>1.12.1</version>
</dependency>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-backend-lwjgl</artifactId>
<version>1.12.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-tools</artifactId>
<version>1.12.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-freetype-platform</artifactId>
<version>1.12.1</version>
<classifier>natives-desktop</classifier>
</dependency>
<dependency>
<groupId>forge</groupId>
<artifactId>forge-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>forge</groupId>
<artifactId>forge-gui</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>forge</groupId>
<artifactId>forge-gui-mobile</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>22.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.badlogicgames.gdx-controllers</groupId>
<artifactId>gdx-controllers-desktop</artifactId>
<version>2.2.3</version>
<exclusions>
<exclusion>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
</project>

View File

@@ -1,16 +0,0 @@
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_color;
varying vec2 v_texCoords;
uniform sampler2D u_texture;
uniform float u_grayness;
uniform float u_bias;
void main() {
vec4 c = v_color * texture2D(u_texture, v_texCoords);
float grey = dot( c.rgb, vec3(0.22, 0.707, 0.071) );
vec3 blendedColor = mix(c.rgb, vec3(grey), u_grayness);
gl_FragColor = mix(vec4(0.0, 0.0, 0.0, 1.0), vec4(blendedColor.rgb, c.a), u_bias);
}

View File

@@ -1,14 +0,0 @@
attribute vec4 a_position;
attribute vec4 a_color;
attribute vec2 a_texCoord0;
uniform mat4 u_projTrans;
varying vec4 v_color;
varying vec2 v_texCoords;
void main() {
v_color = a_color;
v_texCoords = a_texCoord0;
gl_Position = u_projTrans * a_position;
}

View File

@@ -1,40 +0,0 @@
#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif
uniform sampler2D u_texture;
uniform vec2 u_viewportInverse;
uniform vec3 u_color;
uniform float u_offset;
uniform float u_step;
varying vec4 v_color;
varying vec2 v_texCoord;
#define ALPHA_VALUE_BORDER 0.5
void main() {
vec2 T = v_texCoord.xy;
float alpha = 0.0;
bool allin = true;
for( float ix = -u_offset; ix < u_offset; ix += u_step )
{
for( float iy = -u_offset; iy < u_offset; iy += u_step )
{
float newAlpha = texture2D(u_texture, T + vec2(ix, iy) * u_viewportInverse).a;
allin = allin && newAlpha > ALPHA_VALUE_BORDER;
if (newAlpha > ALPHA_VALUE_BORDER && newAlpha >= alpha)
{
alpha = newAlpha;
}
}
}
if (allin)
{
alpha = 0.0;
}
gl_FragColor = vec4(u_color,alpha);
}

View File

@@ -1,16 +0,0 @@
uniform mat4 u_projTrans;
attribute vec4 a_position;
attribute vec2 a_texCoord0;
attribute vec4 a_color;
varying vec4 v_color;
varying vec2 v_texCoord;
uniform vec2 u_viewportInverse;
void main() {
gl_Position = u_projTrans * a_position;
v_texCoord = a_texCoord0;
v_color = a_color;
}

View File

@@ -1,26 +0,0 @@
#ifdef GL_ES
#define PRECISION mediump
precision PRECISION float;
precision PRECISION int;
#else
#define PRECISION
#endif
varying vec2 v_texCoords;
uniform sampler2D u_texture;
uniform float u_amount;
uniform float u_speed;
uniform float u_time;
uniform float u_bias;
void main () {
vec2 uv = v_texCoords;
uv.y += (cos((uv.y + (u_time * 0.04 * u_speed)) * 45.0) * 0.0019 * u_amount) + (cos((uv.y + (u_time * 0.1 * u_speed)) * 10.0) * 0.002 * u_amount);
uv.x += (sin((uv.y + (u_time * 0.07 * u_speed)) * 15.0) * 0.0029 * u_amount) + (sin((uv.y + (u_time * 0.1 * u_speed)) * 15.0) * 0.002 * u_amount);
vec4 texColor = texture2D(u_texture, uv);
gl_FragColor = mix(vec4(0.0, 0.0, 0.0, 1.0), texColor, u_bias);
}

View File

@@ -1,57 +0,0 @@
#ifdef GL_ES
precision mediump float;
#endif
varying vec2 v_texCoords;
uniform sampler2D u_texture;
uniform float u_time;
uniform float u_speed;
uniform float u_amount;
uniform vec2 u_viewport;
uniform vec2 u_position;
float random2d(vec2 n) {
return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);
}
float randomRange (in vec2 seed, in float min, in float max) {
return min + random2d(seed) * (max - min);
}
float insideRange(float v, float bottom, float top) {
return step(bottom, v) - step(top, v);
}
void main()
{
float time = floor(u_time * u_speed * 60.0);
vec3 outCol = texture2D(u_texture, v_texCoords).rgb;
float maxOffset = u_amount/2.0;
for (float i = 0.0; i < 2.0; i += 1.0) {
float sliceY = random2d(vec2(time, 2345.0 + float(i)));
float sliceH = random2d(vec2(time, 9035.0 + float(i))) * 0.25;
float hOffset = randomRange(vec2(time, 9625.0 + float(i)), -maxOffset, maxOffset);
vec2 uvOff = v_texCoords;
uvOff.x += hOffset;
if (insideRange(v_texCoords.y, sliceY, fract(sliceY+sliceH)) == 1.0){
outCol = texture2D(u_texture, uvOff).rgb;
}
}
float maxColOffset = u_amount / 6.0;
float rnd = random2d(vec2(time , 9545.0));
vec2 colOffset = vec2(randomRange(vec2(time , 9545.0), -maxColOffset, maxColOffset),
randomRange(vec2(time , 7205.0), -maxColOffset, maxColOffset));
if (rnd < 0.33) {
outCol.r = texture2D(u_texture, v_texCoords + colOffset).r;
} else if (rnd < 0.66) {
outCol.g = texture2D(u_texture, v_texCoords + colOffset).g;
} else {
outCol.b = texture2D(u_texture, v_texCoords + colOffset).b;
}
gl_FragColor = vec4(outCol, 1.0);
}

View File

@@ -1,3 +0,0 @@
#!/bin/sh
cd $(dirname "${0}")
java -XstartOnFirstThread -Xmx4096m -Dfile.encoding=UTF-8 -jar $project.build.finalName$

View File

@@ -1,25 +0,0 @@
@echo off
pushd %~dp0
java -version 1>nul 2>nul || (
echo no java installed
popd
exit /b 2
)
for /f tokens^=2^ delims^=.-_^+^" %%j in ('java -fullversion 2^>^&1') do set "jver=%%j"
if %jver% GEQ 17 (
java --add-opens java.desktop/java.beans=ALL-UNNAMED --add-opens java.desktop/javax.swing.border=ALL-UNNAMED --add-opens java.desktop/javax.swing.event=ALL-UNNAMED --add-opens java.desktop/sun.swing=ALL-UNNAMED --add-opens java.desktop/java.awt.image=ALL-UNNAMED --add-opens java.desktop/java.awt.color=ALL-UNNAMED --add-opens java.desktop/sun.awt.image=ALL-UNNAMED --add-opens java.desktop/javax.swing=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true -Xmx4096m -Dfile.encoding=UTF-8 -jar $project.build.finalName$
popd
exit /b 0
)
if %jver% GEQ 11 (
java --illegal-access=permit -Xmx4096m -Dfile.encoding=UTF-8 -jar $project.build.finalName$
popd
exit /b 0
)
java -Xmx4096m -Dfile.encoding=UTF-8 -jar $project.build.finalName$
popd

View File

@@ -1,62 +0,0 @@
package forge.adventure.editor;
import com.badlogic.gdx.tools.particleeditor.ParticleEditor;
import forge.localinstance.properties.ForgeConstants;
import forge.localinstance.properties.ForgePreferences;
import forge.model.FModel;
import forge.util.Lang;
import forge.util.Localizer;
import javax.swing.*;
import java.awt.*;
/**
* Editor class to edit configuration, maybe moved or removed
*/
public class EditorMainWindow extends JFrame {
public final static WorldEditor worldEditor = new WorldEditor();
JTabbedPane tabs =new JTabbedPane();
public EditorMainWindow()
{
UIManager.LookAndFeelInfo[] var1 = UIManager.getInstalledLookAndFeels();
FModel.initialize(null, preferences -> {
preferences.setPref(ForgePreferences.FPref.LOAD_CARD_SCRIPTS_LAZILY, true);
return null;
});
Lang.createInstance(FModel.getPreferences().getPref(ForgePreferences.FPref.UI_LANGUAGE));
Localizer.getInstance().initialize(FModel.getPreferences().getPref(ForgePreferences.FPref.UI_LANGUAGE), ForgeConstants.LANG_DIR);
int var2 = var1.length;
for (UIManager.LookAndFeelInfo info : var1) {
if ("Nimbus".equals(info.getName())) {
try {
UIManager.setLookAndFeel(info.getClassName());
} catch (Throwable var6) {
}
break;
}
}
BorderLayout layout=new BorderLayout();
JToolBar toolBar = new JToolBar("toolbar");
JButton newButton=new JButton("open ParticleEditor");
newButton.addActionListener(e -> EventQueue.invokeLater(ParticleEditor::new));
toolBar.add(newButton);
setLayout(layout);
toolBar.setFloatable(false);
add(toolBar, BorderLayout.NORTH);
add(tabs, BorderLayout.CENTER);
tabs.addTab("World",worldEditor);
tabs.addTab("POI",new PointOfInterestEditor());
tabs.addTab("Items",new ItemsEditor());
tabs.addTab("Enemies",new EnemyEditor());
tabs.addTab("Quests",new QuestEditor());
setVisible(true);
setSize(800,600);
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow( this );
}
}

View File

@@ -6,7 +6,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.64-SNAPSHOT</version>
<version>${revision}</version>
</parent>
<artifactId>forge-ai</artifactId>

View File

@@ -17,8 +17,6 @@
*/
package forge.ai;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import forge.ai.ability.AnimateAi;
@@ -32,23 +30,28 @@ import forge.game.combat.CombatUtil;
import forge.game.combat.GlobalAttackRestrictions;
import forge.game.cost.Cost;
import forge.game.keyword.Keyword;
import forge.game.keyword.KeywordInterface;
import forge.game.player.Player;
import forge.game.player.PlayerCollection;
import forge.game.spellability.SpellAbility;
import forge.game.spellability.SpellAbilityPredicates;
import forge.game.staticability.StaticAbility;
import forge.game.staticability.StaticAbilityAssignCombatDamageAsUnblocked;
import forge.game.staticability.StaticAbilityMode;
import forge.game.trigger.Trigger;
import forge.game.trigger.TriggerType;
import forge.game.zone.ZoneType;
import forge.util.Aggregates;
import forge.util.Expressions;
import forge.util.MyRandom;
import forge.util.*;
import forge.util.collect.FCollection;
import forge.util.collect.FCollectionView;
import org.apache.commons.lang3.tuple.Pair;
import java.util.*;
import java.util.function.Predicate;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
/**
@@ -73,6 +76,9 @@ public class AiAttackController {
private int aiAggression = 0; // how aggressive the ai is attack will be depending on circumstances
private final boolean nextTurn; // include creature that can only attack/block next turn
private final int timeOut;
private final boolean canUseTimeout;
private List<CompletableFuture<Integer>> futures = new ArrayList<>();
/**
* <p>
@@ -90,6 +96,8 @@ public class AiAttackController {
myList = ai.getCreaturesInPlay();
this.nextTurn = nextTurn;
refreshCombatants(defendingOpponent);
this.timeOut = ai.getGame().getAITimeout();
this.canUseTimeout = ai.getGame().canUseTimeout();
} // overloaded constructor to evaluate attackers that should attack next turn
public AiAttackController(final Player ai, Card attacker) {
@@ -103,11 +111,13 @@ public class AiAttackController {
attackers.add(attacker);
}
this.blockers = getPossibleBlockers(oppList, this.attackers, this.nextTurn);
this.timeOut = ai.getGame().getAITimeout();
this.canUseTimeout = ai.getGame().canUseTimeout();
} // overloaded constructor to evaluate single specified attacker
private void refreshCombatants(GameEntity defender) {
if (defender instanceof Card && ((Card) defender).isBattle()) {
this.oppList = getOpponentCreatures(((Card) defender).getProtectingPlayer());
if (defender instanceof Card card && card.isBattle()) {
this.oppList = getOpponentCreatures(card.getProtectingPlayer());
} else {
this.oppList = getOpponentCreatures(defendingOpponent);
}
@@ -128,7 +138,7 @@ public class AiAttackController {
CardCollection tappedDefenders = new CardCollection();
for (Card c : CardLists.filter(defender.getCardsIn(ZoneType.Battlefield), canAnimate)) {
for (SpellAbility sa : Iterables.filter(c.getSpellAbilities(), SpellAbilityPredicates.isApi(ApiType.Animate))) {
for (SpellAbility sa : IterableUtil.filter(c.getSpellAbilities(), SpellAbilityPredicates.isApi(ApiType.Animate))) {
if (sa.usesTargeting() || !sa.getParamOrDefault("Defined", "Self").equals("Self")) {
continue;
}
@@ -152,7 +162,7 @@ public class AiAttackController {
defenders.removeAll(tappedDefenders);
// Transform (e.g. Incubator tokens)
for (SpellAbility sa : Iterables.filter(c.getSpellAbilities(), SpellAbilityPredicates.isApi(ApiType.SetState))) {
for (SpellAbility sa : IterableUtil.filter(c.getSpellAbilities(), SpellAbilityPredicates.isApi(ApiType.SetState))) {
Card transformedCopy = ComputerUtilCombat.canTransform(c);
if (transformedCopy.isCreature()) {
int saCMC = sa.getPayCosts() != null && sa.getPayCosts().hasManaCost() ?
@@ -168,7 +178,7 @@ public class AiAttackController {
}
public void removeBlocker(Card blocker) {
this.oppList.remove(blocker);
this.oppList.remove(blocker);
this.blockers.remove(blocker);
}
@@ -285,7 +295,7 @@ public class AiAttackController {
}
if ("TRUE".equals(attacker.getSVar("HasAttackEffect"))) {
return true;
return true;
}
// Damage opponent if unblocked
@@ -303,7 +313,8 @@ public class AiAttackController {
}
}
// Poison opponent if unblocked
if (defender instanceof Player && ComputerUtilCombat.poisonIfUnblocked(attacker, (Player) defender) > 0) {
if (defender instanceof Player player
&& ComputerUtilCombat.poisonIfUnblocked(attacker, player) > 0) {
return true;
}
@@ -387,7 +398,7 @@ public class AiAttackController {
// reduce the search space
final List<Card> opponentsAttackers = CardLists.filter(ai.getOpponents().getCreaturesInPlay(), c -> !c.hasSVar("EndOfTurnLeavePlay")
&& (c.toughnessAssignsDamage() || c.getNetCombatDamage() > 0 // performance shortcuts
|| c.getNetCombatDamage() + ComputerUtilCombat.predictPowerBonusOfAttacker(c, null, null, true) > 0)
|| c.getNetCombatDamage() + ComputerUtilCombat.predictPowerBonusOfAttacker(c, null, null, true) > 0)
&& ComputerUtilCombat.canAttackNextTurn(c));
// don't hold back creatures that can't block any of the human creatures
@@ -509,13 +520,9 @@ public class AiAttackController {
return;
}
List<String> bandsWithString = Arrays.asList("Bands with Other Legendary Creatures",
"Bands with Other Creatures named Wolves of the Hunt",
"Bands with Other Dinosaurs");
List<Card> bandingCreatures = null;
if (test == null) {
bandingCreatures = CardLists.filter(myList, card -> card.hasKeyword(Keyword.BANDING) || card.hasAnyKeyword(bandsWithString));
bandingCreatures = CardLists.filter(myList, card -> card.hasKeyword(Keyword.BANDING) || card.hasKeyword(Keyword.BANDSWITH));
// filter out anything that can't legally attack or is already declared as an attacker
bandingCreatures = CardLists.filter(bandingCreatures, card -> !combat.isAttacking(card) && CombatUtil.canAttack(card));
@@ -523,7 +530,7 @@ public class AiAttackController {
bandingCreatures = notNeededAsBlockers(attackers, bandingCreatures);
} else {
// Test a specific creature for Banding
if (test.hasKeyword(Keyword.BANDING) || test.hasAnyKeyword(bandsWithString)) {
if (test.hasKeyword(Keyword.BANDING) || test.hasKeyword(Keyword.BANDSWITH)) {
bandingCreatures = new CardCollection(test);
}
}
@@ -541,7 +548,7 @@ public class AiAttackController {
// TODO: Assign to band with the best attacker for now, but needs better logic.
for (Card c : bandingCreatures) {
Card bestBand;
Card bestBand = null;
if (c.getNetPower() <= 0) {
// Don't band a zero power creature if there's already a banding creature in a band
@@ -549,12 +556,16 @@ public class AiAttackController {
}
Card bestAttacker = ComputerUtilCard.getBestCreatureAI(attackers);
if (c.hasKeyword("Bands with Other Legendary Creatures")) {
bestBand = ComputerUtilCard.getBestCreatureAI(CardLists.getType(attackers, "Legendary"));
} else if (c.hasKeyword("Bands with Other Dinosaurs")) {
bestBand = ComputerUtilCard.getBestCreatureAI(CardLists.getType(attackers, "Dinosaur"));
} else if (c.hasKeyword("Bands with Other Creatures named Wolves of the Hunt")) {
bestBand = ComputerUtilCard.getBestCreatureAI(CardLists.filter(attackers, CardPredicates.nameEquals("Wolves of the Hunt")));
// TODO how should this work with multiple bands with other abilities?
if (c.hasKeyword(Keyword.BANDSWITH)) {
for (KeywordInterface kw : c.getKeywords(Keyword.BANDSWITH)) {
final String o = kw.getOriginal();
String m[] = o.split(":");
CardCollection bandPartner = CardLists.getValidCards(attackers, m[1], c.getController(), c, null);
bestBand = ComputerUtilCard.getBestCreatureAI(bandPartner);
break; // ?
}
} else if (!c.hasAnyKeyword(evasionKeywords) && bestAttacker != null && bestAttacker.hasAnyKeyword(evasionKeywords)) {
bestBand = ComputerUtilCard.getBestCreatureAI(CardLists.filter(attackers, card -> !card.hasAnyKeyword(evasionKeywords)));
} else {
@@ -614,9 +625,9 @@ public class AiAttackController {
// TODO: the AI should ideally predict how many times it can activate
// for now, unless the opponent is tapped out, break at this point
// and do not predict the blocker limit (which is safer)
if (Iterables.any(defendingOpponent.getLandsInPlay(), CardPredicates.Presets.UNTAPPED)) {
if (defendingOpponent.getLandsInPlay().anyMatch(CardPredicates.UNTAPPED)) {
maxBlockersAfterCrew += CardLists.count(CardLists.getNotType(defendingOpponent.getCardsIn(ZoneType.Battlefield), "Creature"),
Predicates.and(CardPredicates.isType("Vehicle"), CardPredicates.Presets.UNTAPPED));
CardPredicates.isType("Vehicle").and(CardPredicates.UNTAPPED));
}
}
@@ -793,6 +804,7 @@ public class AiAttackController {
if (bAssault) {
return prefDefender;
}
// 2. attack planeswalkers
List<Card> pwDefending = c.getDefendingPlaneswalkers();
if (!pwDefending.isEmpty()) {
@@ -800,7 +812,7 @@ public class AiAttackController {
return pwNearUlti != null ? pwNearUlti : ComputerUtilCard.getBestPlaneswalkerAI(pwDefending);
}
// Get the preferred battle (prefer own battles, then ally battles)
// 3. Get the preferred battle (prefer own battles, then ally battles)
final CardCollection defBattles = c.getDefendingBattles();
List<Card> ownBattleDefending = CardLists.filter(defBattles, CardPredicates.isController(ai));
List<Card> allyBattleDefending = CardLists.filter(defBattles, CardPredicates.isControlledByAnyOf(ai.getAllies()));
@@ -839,10 +851,9 @@ public class AiAttackController {
// decided to attack another defender so related lists need to be updated
// (though usually rather try to avoid this situation for performance reasons)
if (defender != defendingOpponent) {
if (defender instanceof Player) {
defendingOpponent = (Player) defender;
} else if (defender instanceof Card) {
Card defCard = (Card) defender;
if (defender instanceof Player p) {
defendingOpponent = p;
} else if (defender instanceof Card defCard) {
if (defCard.isBattle()) {
defendingOpponent = defCard.getProtectingPlayer();
} else {
@@ -882,7 +893,7 @@ public class AiAttackController {
// TODO: detect Season of the Witch by presence of a card with a specific trigger
final boolean seasonOfTheWitch = ai.getGame().isCardInPlay("Season of the Witch");
List<Card> attackersLeft = new ArrayList<>(this.attackers);
final Queue<Card> attackersLeft = new ConcurrentLinkedQueue<>(this.attackers);
// TODO probably use AttackConstraints instead of only GlobalAttackRestrictions?
GlobalAttackRestrictions restrict = GlobalAttackRestrictions.getGlobalRestrictions(ai, combat.getDefenders());
@@ -898,63 +909,76 @@ public class AiAttackController {
}
// Attackers that don't really have a choice
int numForcedAttackers = 0;
final AtomicInteger numForcedAttackers = new AtomicInteger(0);
// nextTurn is now only used by effect from Oracle en-Vec, which can skip check must attack,
// because creatures not chosen can't attack.
if (!nextTurn) {
for (final Card attacker : this.attackers) {
GameEntity mustAttackDef = null;
if (attacker.getSVar("MustAttack").equals("True")) {
mustAttackDef = defender;
} else if (attacker.hasSVar("EndOfTurnLeavePlay")
&& isEffectiveAttacker(ai, attacker, combat, defender)) {
mustAttackDef = defender;
} else if (seasonOfTheWitch) {
//TODO: if there are other ways to tap this creature (like mana creature), then don't need to attack
mustAttackDef = defender;
} else {
if (combat.getAttackConstraints().getRequirements().get(attacker) == null) continue;
// check defenders in order of maximum requirements
List<Pair<GameEntity, Integer>> reqs = combat.getAttackConstraints().getRequirements().get(attacker).getSortedRequirements();
final GameEntity def = defender;
reqs.sort((r1, r2) -> {
if (r1.getValue() == r2.getValue()) {
// try to attack the designated defender
if (r1.getKey().equals(def) && !r2.getKey().equals(def)) {
return -1;
final GameEntity finalDefender = defender;
futures.add(CompletableFuture.supplyAsync(()-> {
GameEntity mustAttackDef = null;
if (attacker.getSVar("MustAttack").equals("True")) {
mustAttackDef = finalDefender;
} else if (attacker.hasSVar("EndOfTurnLeavePlay")
&& isEffectiveAttacker(ai, attacker, combat, finalDefender)) {
mustAttackDef = finalDefender;
} else if (seasonOfTheWitch) {
//TODO: if there are other ways to tap this creature (like mana creature), then don't need to attack
mustAttackDef = finalDefender;
} else {
if (combat.getAttackConstraints().getRequirements().get(attacker) == null) return 0;
// check defenders in order of maximum requirements
List<Pair<GameEntity, Integer>> reqs = combat.getAttackConstraints().getRequirements().get(attacker).getSortedRequirements();
final GameEntity def = finalDefender;
reqs.sort((r1, r2) -> {
if (r1.getValue() == r2.getValue()) {
// try to attack the designated defender
if (r1.getKey().equals(def) && !r2.getKey().equals(def)) {
return -1;
}
if (r2.getKey().equals(def) && !r1.getKey().equals(def)) {
return 1;
}
// otherwise PW
if (r1.getKey() instanceof Card && r2.getKey() instanceof Player) {
return -1;
}
if (r2.getKey() instanceof Card && r1.getKey() instanceof Player) {
return 1;
}
// or weakest player
if (r1.getKey() instanceof Player p1 && r2.getKey() instanceof Player p2) {
return p1.getLife() - p2.getLife();
}
}
if (r2.getKey().equals(def) && !r1.getKey().equals(def)) {
return 1;
return r2.getValue() - r1.getValue();
});
for (Pair<GameEntity, Integer> e : reqs) {
if (e.getRight() == 0) continue;
GameEntity mustAttackDefMaybe = e.getLeft();
if (canAttackWrapper(attacker, mustAttackDefMaybe) && CombatUtil.getAttackCost(ai.getGame(), attacker, mustAttackDefMaybe) == null) {
mustAttackDef = mustAttackDefMaybe;
break;
}
// otherwise PW
if (r1.getKey() instanceof Card && r2.getKey() instanceof Player) {
return -1;
}
if (r2.getKey() instanceof Card && r1.getKey() instanceof Player) {
return 1;
}
// or weakest player
if (r1.getKey() instanceof Player && r2.getKey() instanceof Player) {
return ((Player) r1.getKey()).getLife() - ((Player) r2.getKey()).getLife();
}
}
return r2.getValue() - r1.getValue();
});
for (Pair<GameEntity, Integer> e : reqs) {
if (e.getRight() == 0) continue;
GameEntity mustAttackDefMaybe = e.getLeft();
if (canAttackWrapper(attacker, mustAttackDefMaybe) && CombatUtil.getAttackCost(ai.getGame(), attacker, mustAttackDefMaybe) == null) {
mustAttackDef = mustAttackDefMaybe;
break;
}
}
}
if (mustAttackDef != null) {
combat.addAttacker(attacker, mustAttackDef);
attackersLeft.remove(attacker);
numForcedAttackers++;
}
if (mustAttackDef != null) {
combat.addAttacker(attacker, mustAttackDef);
attackersLeft.remove(attacker);
numForcedAttackers.incrementAndGet();
}
return 0;
}).exceptionally(ex -> {
ex.printStackTrace();
return 0;
}));
}
CompletableFuture<?>[] futuresArray = futures.toArray(new CompletableFuture<?>[0]);
if (canUseTimeout)
CompletableFuture.allOf(futuresArray).completeOnTimeout(null, timeOut, TimeUnit.SECONDS).join();
else
CompletableFuture.allOf(futuresArray).join();
futures.clear();
if (attackersLeft.isEmpty()) {
return aiAggression;
}
@@ -962,18 +986,19 @@ public class AiAttackController {
// Lightmine Field: make sure the AI doesn't wipe out its own creatures
if (lightmineField) {
doLightmineFieldAttackLogic(attackersLeft, numForcedAttackers, playAggro);
doLightmineFieldAttackLogic(attackersLeft, numForcedAttackers.get(), playAggro);
}
// Revenge of Ravens: make sure the AI doesn't kill itself and doesn't damage itself unnecessarily
if (!doRevengeOfRavensAttackLogic(defender, attackersLeft, numForcedAttackers, attackMax)) {
if (!doRevengeOfRavensAttackLogic(defender, attackersLeft, numForcedAttackers.get(), attackMax)) {
return aiAggression;
}
if (bAssault && defender == defendingOpponent) { // in case we are forced to attack someone else
if (LOG_AI_ATTACKS)
System.out.println("Assault");
CardLists.sortByPowerDesc(attackersLeft);
for (Card attacker : attackersLeft) {
List<Card> left = new ArrayList<>(attackersLeft);
CardLists.sortByPowerDesc(left);
for (Card attacker : left) {
// reached max, breakup
if (attackMax != -1 && combat.getAttackers().size() >= attackMax)
return aiAggression;
@@ -1167,10 +1192,8 @@ public class AiAttackController {
attritionalAttackers.remove(attritionalAttackers.size() - 1);
}
}
attackRounds += 1;
if (humanLife <= 0) {
doAttritionalAttack = true;
}
attackRounds++;
doAttritionalAttack = humanLife <= 0;
}
// *********************
// end attritional attack calculation
@@ -1227,7 +1250,7 @@ public class AiAttackController {
if (ratioDiff > 0 && doAttritionalAttack) {
aiAggression = 5; // attack at all costs
} else if ((ratioDiff >= 1 && this.attackers.size() > 1 && (humanLifeToDamageRatio < 2 || outNumber > 0))
|| (playAggro && MyRandom.percentTrue(chanceToAttackToTrade) && humanLifeToDamageRatio > 1)) {
|| (playAggro && MyRandom.percentTrue(chanceToAttackToTrade) && humanLifeToDamageRatio > 1)) {
aiAggression = 4; // attack expecting to trade or damage player.
} else if (MyRandom.percentTrue(chanceToAttackToTrade) && humanLifeToDamageRatio > 1
&& defendingOpponent != null
@@ -1237,7 +1260,7 @@ public class AiAttackController {
&& (ComputerUtilMana.getAvailableManaEstimate(ai) > 0) || tradeIfTappedOut
&& (ComputerUtilMana.getAvailableManaEstimate(defendingOpponent) == 0) || MyRandom.percentTrue(extraChanceIfOppHasMana)
&& (!tradeIfLowerLifePressure || (ai.getLifeLostLastTurn() + ai.getLifeLostThisTurn() <
defendingOpponent.getLifeLostThisTurn() + defendingOpponent.getLifeLostThisTurn()))) {
defendingOpponent.getLifeLostThisTurn() + defendingOpponent.getLifeLostThisTurn()))) {
aiAggression = 4; // random (chance-based) attack expecting to trade or damage player.
} else if (ratioDiff >= 0 && this.attackers.size() > 1) {
aiAggression = 3; // attack expecting to make good trades or damage player.
@@ -1265,19 +1288,20 @@ public class AiAttackController {
if ( LOG_AI_ATTACKS )
System.out.println("Normal attack");
attackersLeft = notNeededAsBlockers(combat.getAttackers(), attackersLeft);
attackersLeft = sortAttackers(attackersLeft);
List<Card> left = new ArrayList<>(attackersLeft);
left = notNeededAsBlockers(combat.getAttackers(), left);
left = sortAttackers(left);
if ( LOG_AI_ATTACKS )
System.out.println("attackersLeft = " + attackersLeft);
System.out.println("attackersLeft = " + left);
FCollection<GameEntity> possibleDefenders = new FCollection<>(defendingOpponent);
possibleDefenders.addAll(defendingOpponent.getPlaneswalkersInPlay());
while (!attackersLeft.isEmpty()) {
while (!left.isEmpty()) {
CardCollection attackersAssigned = new CardCollection();
for (int i = 0; i < attackersLeft.size(); i++) {
final Card attacker = attackersLeft.get(i);
for (int i = 0; i < left.size(); i++) {
final Card attacker = left.get(i);
if (aiAggression < 5 && !attacker.hasFirstStrike() && !attacker.hasDoubleStrike()
&& ComputerUtilCombat.getTotalFirstStrikeBlockPower(attacker, defendingOpponent)
>= ComputerUtilCombat.getDamageToKill(attacker, false)) {
@@ -1291,7 +1315,7 @@ public class AiAttackController {
attackersAssigned.add(attacker);
// check if attackers are enough to finish the attacked planeswalker
if (i < attackersLeft.size() - 1 && defender instanceof Card) {
if (i < left.size() - 1 && defender instanceof Card card) {
final int blockNum = this.blockers.size();
int attackNum = 0;
int damage = 0;
@@ -1305,19 +1329,19 @@ public class AiAttackController {
}
}
// if enough damage: switch to next planeswalker
if (damage >= ComputerUtilCombat.getDamageToKill((Card) defender, true)) {
if (damage >= ComputerUtilCombat.getDamageToKill(card, true)) {
break;
}
}
}
}
attackersLeft.removeAll(attackersAssigned);
left.removeAll(attackersAssigned);
possibleDefenders.remove(defender);
if (attackersLeft.isEmpty() || possibleDefenders.isEmpty()) {
if (left.isEmpty() || possibleDefenders.isEmpty()) {
break;
}
CardCollection pwDefending = new CardCollection(Iterables.filter(possibleDefenders, Card.class));
CardCollection pwDefending = new CardCollection(IterableUtil.filter(possibleDefenders, Card.class));
if (pwDefending.isEmpty()) {
// TODO for now only looks at same player as we'd have to check the others from start too
//defender = new PlayerCollection(Iterables.filter(possibleDefenders, Player.class)).min(PlayerPredicates.compareByLife());
@@ -1331,6 +1355,113 @@ public class AiAttackController {
return aiAggression;
}
private class SpellAbilityFactors {
Card attacker = null;
boolean canBeKilled = false; // indicates if the attacker can be killed
boolean canBeKilledByOne = false; // indicates if the attacker can be killed by a single blocker
boolean canKillAll = true; // indicates if the attacker can kill all single blockers
boolean canKillAllDangerous = true; // indicates if the attacker can kill all single blockers with wither or infect
boolean isWorthLessThanAllKillers = true;
boolean hasAttackEffect = false;
boolean hasCombatEffect = false;
boolean dangerousBlockersPresent = false;
boolean canTrampleOverDefenders = false;
int numberOfPossibleBlockers = 0;
int defPower = 0;
SpellAbilityFactors(Card c) {
attacker = c;
}
private boolean canBeBlocked() {
return numberOfPossibleBlockers > 2
|| (numberOfPossibleBlockers >= 1 && CombatUtil.canAttackerBeBlockedWithAmount(attacker, 1, defendingOpponent))
|| (numberOfPossibleBlockers == 2 && CombatUtil.canAttackerBeBlockedWithAmount(attacker, 2, defendingOpponent));
}
private void calculate(final List<Card> defenders, final Combat combat) {
hasAttackEffect = attacker.getSVar("HasAttackEffect").equals("TRUE") || attacker.hasKeyword(Keyword.ANNIHILATOR);
// is there a gain in attacking even when the blocker is not killed (Lifelink, Wither,...)
hasCombatEffect = attacker.getSVar("HasCombatEffect").equals("TRUE") || "Blocked".equals(attacker.getSVar("HasAttackEffect"))
|| attacker.isWitherDamage() || attacker.hasKeyword(Keyword.LIFELINK) || attacker.hasKeyword(Keyword.AFFLICT);
// contains only the defender's blockers that can actually block the attacker
CardCollection validBlockers = CardLists.filter(defenders, defender1 -> CombatUtil.canBlock(attacker, defender1));
canTrampleOverDefenders = attacker.hasKeyword(Keyword.TRAMPLE) && attacker.getNetCombatDamage() > Aggregates.sum(validBlockers, Card::getNetToughness);
// used to check that CanKillAllDangerous check makes sense in context where creatures with dangerous abilities are present
dangerousBlockersPresent = validBlockers.anyMatch(
CardPredicates.hasKeyword(Keyword.LIFELINK)
.or(Card::isWitherDamage)
);
// total power of the defending creatures, used in predicting whether a gang block can kill the attacker
defPower = CardLists.getTotalPower(validBlockers, null);
// look at the attacker in relation to the blockers to establish a
// number of factors about the attacking context that will be relevant
// to the attackers decision according to the selected strategy
for (final Card blocker : validBlockers) {
// if both isWorthLessThanAllKillers and canKillAllDangerous are false there's nothing more to check
if (isWorthLessThanAllKillers || canKillAllDangerous || numberOfPossibleBlockers < 2) {
numberOfPossibleBlockers += 1;
if (isWorthLessThanAllKillers && ComputerUtilCombat.canDestroyAttacker(ai, attacker, blocker, combat, false)
&& !(attacker.hasKeyword(Keyword.UNDYING) && attacker.getCounters(CounterEnumType.P1P1) == 0)) {
canBeKilledByOne = true; // there is a single creature on the battlefield that can kill the creature
// see if the defending creature is of higher or lower
// value. We don't want to attack only to lose value
if (isWorthLessThanAllKillers && !attacker.hasSVar("SacMe")
&& ComputerUtilCard.evaluateCreature(blocker) <= ComputerUtilCard.evaluateCreature(attacker)) {
isWorthLessThanAllKillers = false;
}
}
// see if this attacking creature can destroy this defender, if
// not record that it can't kill everything
if (canKillAllDangerous && !ComputerUtilCombat.canDestroyBlocker(ai, blocker, attacker, combat, false)) {
canKillAll = false;
if (blocker.getSVar("HasCombatEffect").equals("TRUE") || blocker.getSVar("HasBlockEffect").equals("TRUE")
|| blocker.isWitherDamage() || blocker.hasKeyword(Keyword.LIFELINK)) {
canKillAllDangerous = false;
// there is a creature that can survive an attack from this creature
// and combat will have negative effects
}
// Check if maybe we are too reckless in adding this attacker
if (canKillAllDangerous) {
boolean avoidAttackingIntoBlock = ai.getController().isAI()
&& ((PlayerControllerAi) ai.getController()).getAi().getBooleanProperty(AiProps.TRY_TO_AVOID_ATTACKING_INTO_CERTAIN_BLOCK);
boolean attackerWillDie = defPower >= attacker.getNetToughness();
boolean uselessAttack = !hasCombatEffect && !hasAttackEffect;
boolean noContributionToAttack = attackers.size() <= defenders.size() || attacker.getNetPower() <= 0;
// We are attacking too recklessly if we can't kill a single blocker and:
// - our creature will die for sure (chump attack)
// - our attack will not do anything special (no attack/combat effect to proc)
// - we can't deal damage to our opponent with sheer number of attackers and/or our attacker's power is 0 or less
if (attackerWillDie || (avoidAttackingIntoBlock && uselessAttack && noContributionToAttack)) {
canKillAllDangerous = false;
}
}
}
}
}
// performance-wise it doesn't seem worth it to check attackVigilance() instead (only includes a single niche card)
if (!attacker.hasKeyword(Keyword.VIGILANCE) && ComputerUtilCard.canBeKilledByRoyalAssassin(ai, attacker)) {
canKillAllDangerous = false;
canBeKilled = true;
canBeKilledByOne = true;
isWorthLessThanAllKillers = false;
hasCombatEffect = false;
} else if ((canKillAllDangerous || !canBeKilled) && ComputerUtilCard.canBeBlockedProfitably(defendingOpponent, attacker, true)) {
canKillAllDangerous = false;
canBeKilled = true;
}
}
}
/**
* <p>
* shouldAttack.
@@ -1345,14 +1476,6 @@ public class AiAttackController {
* @return a boolean.
*/
public final boolean shouldAttack(final Card attacker, final List<Card> defenders, final Combat combat, final GameEntity defender) {
boolean canBeKilled = false; // indicates if the attacker can be killed
boolean canBeKilledByOne = false; // indicates if the attacker can be killed by a single blocker
boolean canKillAll = true; // indicates if the attacker can kill all single blockers
boolean canKillAllDangerous = true; // indicates if the attacker can kill all single blockers with wither or infect
boolean isWorthLessThanAllKillers = true;
boolean canBeBlocked = false;
int numberOfPossibleBlockers = 0;
// Is it a creature that has a more valuable ability with a tap cost than what it can do by attacking?
if (attacker.hasSVar("NonCombatPriority") && !attacker.hasKeyword(Keyword.VIGILANCE)) {
// For each level of priority, enemy has to have life as much as the creature's power
@@ -1363,7 +1486,7 @@ public class AiAttackController {
// Check if the card actually has an ability the AI can and wants to play, if not, attacking is fine!
for (SpellAbility sa : attacker.getSpellAbilities()) {
// Do not attack if we can afford using the ability.
if (sa.isActivatedAbility()) {
if (sa.isActivatedAbility() && sa.getPayCosts().hasTapCost()) {
if (ComputerUtilCost.canPayCost(sa, ai, false)) {
return false;
}
@@ -1377,156 +1500,72 @@ public class AiAttackController {
if (!isEffectiveAttacker(ai, attacker, combat, defender)) {
return false;
}
boolean hasAttackEffect = attacker.getSVar("HasAttackEffect").equals("TRUE") || attacker.hasKeyword(Keyword.ANNIHILATOR);
// is there a gain in attacking even when the blocker is not killed (Lifelink, Wither,...)
boolean hasCombatEffect = attacker.getSVar("HasCombatEffect").equals("TRUE") || "Blocked".equals(attacker.getSVar("HasAttackEffect"));
if (!hasCombatEffect) {
if (attacker.isWitherDamage() || attacker.hasKeyword(Keyword.LIFELINK) || attacker.hasKeyword(Keyword.AFFLICT)) {
hasCombatEffect = true;
}
}
// contains only the defender's blockers that can actually block the attacker
CardCollection validBlockers = CardLists.filter(defenders, defender1 -> CombatUtil.canBlock(attacker, defender1));
boolean canTrampleOverDefenders = attacker.hasKeyword(Keyword.TRAMPLE) && attacker.getNetCombatDamage() > Aggregates.sum(validBlockers, Card::getNetToughness);
// used to check that CanKillAllDangerous check makes sense in context where creatures with dangerous abilities are present
boolean dangerousBlockersPresent = Iterables.any(validBlockers, Predicates.or(
CardPredicates.hasKeyword(Keyword.WITHER), CardPredicates.hasKeyword(Keyword.INFECT),
CardPredicates.hasKeyword(Keyword.LIFELINK)));
// total power of the defending creatures, used in predicting whether a gang block can kill the attacker
int defPower = CardLists.getTotalPower(validBlockers, true, false);
// look at the attacker in relation to the blockers to establish a
// number of factors about the attacking context that will be relevant
// to the attackers decision according to the selected strategy
for (final Card blocker : validBlockers) {
// if both isWorthLessThanAllKillers and canKillAllDangerous are false there's nothing more to check
if (isWorthLessThanAllKillers || canKillAllDangerous || numberOfPossibleBlockers < 2) {
numberOfPossibleBlockers += 1;
if (isWorthLessThanAllKillers && ComputerUtilCombat.canDestroyAttacker(ai, attacker, blocker, combat, false)
&& !(attacker.hasKeyword(Keyword.UNDYING) && attacker.getCounters(CounterEnumType.P1P1) == 0)) {
canBeKilledByOne = true; // there is a single creature on the battlefield that can kill the creature
// see if the defending creature is of higher or lower
// value. We don't want to attack only to lose value
if (isWorthLessThanAllKillers && !attacker.hasSVar("SacMe")
&& ComputerUtilCard.evaluateCreature(blocker) <= ComputerUtilCard.evaluateCreature(attacker)) {
isWorthLessThanAllKillers = false;
}
}
// see if this attacking creature can destroy this defender, if
// not record that it can't kill everything
if (canKillAllDangerous && !ComputerUtilCombat.canDestroyBlocker(ai, blocker, attacker, combat, false)) {
canKillAll = false;
if (blocker.getSVar("HasCombatEffect").equals("TRUE") || blocker.getSVar("HasBlockEffect").equals("TRUE")) {
canKillAllDangerous = false;
} else {
if (blocker.hasKeyword(Keyword.WITHER) || blocker.hasKeyword(Keyword.INFECT)
|| blocker.hasKeyword(Keyword.LIFELINK)) {
canKillAllDangerous = false;
// there is a creature that can survive an attack from this creature
// and combat will have negative effects
}
// Check if maybe we are too reckless in adding this attacker
if (canKillAllDangerous) {
boolean avoidAttackingIntoBlock = ai.getController().isAI()
&& ((PlayerControllerAi) ai.getController()).getAi().getBooleanProperty(AiProps.TRY_TO_AVOID_ATTACKING_INTO_CERTAIN_BLOCK);
boolean attackerWillDie = defPower >= attacker.getNetToughness();
boolean uselessAttack = !hasCombatEffect && !hasAttackEffect;
boolean noContributionToAttack = this.attackers.size() <= defenders.size() || attacker.getNetPower() <= 0;
// We are attacking too recklessly if we can't kill a single blocker and:
// - our creature will die for sure (chump attack)
// - our attack will not do anything special (no attack/combat effect to proc)
// - we can't deal damage to our opponent with sheer number of attackers and/or our attacker's power is 0 or less
if (attackerWillDie || (avoidAttackingIntoBlock && uselessAttack && noContributionToAttack)) {
canKillAllDangerous = false;
}
}
}
}
}
}
if (!attacker.hasKeyword(Keyword.VIGILANCE) && ComputerUtilCard.canBeKilledByRoyalAssassin(ai, attacker)) {
canKillAllDangerous = false;
canBeKilled = true;
canBeKilledByOne = true;
isWorthLessThanAllKillers = false;
hasCombatEffect = false;
} else if ((canKillAllDangerous || !canBeKilled) && ComputerUtilCard.canBeBlockedProfitably(defendingOpponent, attacker, true)) {
canKillAllDangerous = false;
canBeKilled = true;
SpellAbilityFactors saf = new SpellAbilityFactors(attacker);
if (aiAggression != 5) {
saf.calculate(defenders, combat);
}
// if the creature cannot block and can kill all opponents they might as
// well attack, they do nothing staying back
if (canKillAll && isWorthLessThanAllKillers && !CombatUtil.canBlock(attacker)) {
if (saf.canKillAll && saf.isWorthLessThanAllKillers && !CombatUtil.canBlock(attacker)) {
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = attacking because they can't block, expecting to kill or damage player");
return true;
} else if (!canBeKilled && !dangerousBlockersPresent && canTrampleOverDefenders) {
}
if (!saf.canBeKilled && !saf.dangerousBlockersPresent && saf.canTrampleOverDefenders) {
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = expecting to survive and get some Trample damage through");
return true;
}
if (numberOfPossibleBlockers > 2
|| (numberOfPossibleBlockers >= 1 && CombatUtil.canAttackerBeBlockedWithAmount(attacker, 1, defendingOpponent))
|| (numberOfPossibleBlockers == 2 && CombatUtil.canAttackerBeBlockedWithAmount(attacker, 2, defendingOpponent))) {
canBeBlocked = true;
}
// decide if the creature should attack based on the prevailing strategy choice in aiAggression
switch (aiAggression) {
case 6: // Exalted: expecting to at least kill a creature of equal value or not be blocked
if ((canKillAll && isWorthLessThanAllKillers) || !canBeBlocked) {
case 6: // Exalted: expecting to at least kill a creature of equal value or not be blocked
if ((saf.canKillAll && saf.isWorthLessThanAllKillers) || !saf.canBeBlocked()) {
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = attacking expecting to kill creature, or is unblockable");
return true;
}
break;
case 5: // all out attacking
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = attacking expecting to kill creature, or is unblockable");
System.out.println(attacker.getName() + " = all out attacking");
return true;
}
break;
case 5: // all out attacking
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = all out attacking");
return true;
case 4: // expecting to at least trade with something, or can attack "for free", expecting no counterattack
if (canKillAll || (dangerousBlockersPresent && canKillAllDangerous && !canBeKilledByOne) || !canBeBlocked
|| (defPower == 0 && !ComputerUtilCombat.lifeInDanger(ai, combat))) {
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = attacking expecting to at least trade with something");
return true;
}
break;
case 3: // expecting to at least kill a creature of equal value or not be blocked
if ((canKillAll && isWorthLessThanAllKillers)
|| (((dangerousBlockersPresent && canKillAllDangerous) || hasAttackEffect || hasCombatEffect) && !canBeKilledByOne)
|| !canBeBlocked) {
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = attacking expecting to kill creature or cause damage, or is unblockable");
return true;
}
break;
case 2: // attack expecting to attract a group block or destroying a single blocker and surviving
if (!canBeBlocked || ((canKillAll || hasAttackEffect || hasCombatEffect) && !canBeKilledByOne &&
((dangerousBlockersPresent && canKillAllDangerous) || !canBeKilled))) {
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = attacking expecting to survive or attract group block");
return true;
}
break;
case 1: // unblockable creatures only
if (!canBeBlocked || (numberOfPossibleBlockers == 1 && canKillAll && !canBeKilledByOne)) {
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = attacking expecting not to be blocked");
return true;
}
break;
default:
break;
case 4: // expecting to at least trade with something, or can attack "for free", expecting no counterattack
if (saf.canKillAll || (saf.dangerousBlockersPresent && saf.canKillAllDangerous && !saf.canBeKilledByOne) || !saf.canBeBlocked()
|| saf.defPower == 0) {
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = attacking expecting to at least trade with something");
return true;
}
break;
case 3: // expecting to at least kill a creature of equal value or not be blocked
if ((saf.canKillAll && saf.isWorthLessThanAllKillers)
|| (((saf.dangerousBlockersPresent && saf.canKillAllDangerous) || saf.hasAttackEffect || saf.hasCombatEffect) && !saf.canBeKilledByOne)
|| !saf.canBeBlocked()) {
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = attacking expecting to kill creature or cause damage, or is unblockable");
return true;
}
break;
case 2: // attack expecting to attract a group block or destroying a single blocker and surviving
if (!saf.canBeBlocked() || ((saf.canKillAll || saf.hasAttackEffect || saf.hasCombatEffect) && !saf.canBeKilledByOne &&
((saf.dangerousBlockersPresent && saf.canKillAllDangerous) || !saf.canBeKilled))) {
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = attacking expecting to survive or attract group block");
return true;
}
break;
case 1: // unblockable creatures only
if (!saf.canBeBlocked() || (saf.numberOfPossibleBlockers == 1 && saf.canKillAll && !saf.canBeKilledByOne)) {
if (LOG_AI_ATTACKS)
System.out.println(attacker.getName() + " = attacking expecting not to be blocked");
return true;
}
break;
default:
break;
}
return false; // don't attack
}
@@ -1549,7 +1588,7 @@ public class AiAttackController {
// but there are no creatures it can target, no need to exert with it
boolean missTarget = false;
for (StaticAbility st : c.getStaticAbilities()) {
if (!"OptionalAttackCost".equals(st.getParam("Mode"))) {
if (!st.checkMode(StaticAbilityMode.OptionalAttackCost)) {
continue;
}
SpellAbility sa = st.getPayingTrigSA();
@@ -1571,12 +1610,12 @@ public class AiAttackController {
break;
}
if (sa.usesTargeting()) {
sa.setActivatingPlayer(c.getController(), true);
sa.setActivatingPlayer(c.getController());
List<Card> validTargets = CardUtil.getValidCardsToTarget(sa);
if (validTargets.isEmpty()) {
missTarget = true;
break;
} else if (sa.isCurse() && !Iterables.any(validTargets,
} else if (sa.isCurse() && validTargets.stream().noneMatch(
CardPredicates.isControlledByAnyOf(c.getController().getOpponents()))) {
// e.g. Ahn-Crop Crasher - the effect is only good when aimed at opponent's creatures
missTarget = true;
@@ -1643,31 +1682,31 @@ public class AiAttackController {
}
if (color != null) {
switch (color) {
case "black":
if (!c.isBlack()) {
color = null;
}
break;
case "blue":
if (!c.isBlue()) {
color = null;
}
break;
case "green":
if (!c.isGreen()) {
color = null;
}
break;
case "red":
if (!c.isRed()) {
color = null;
}
break;
case "white":
if (!c.isWhite()) {
color = null;
}
break;
case "black":
if (!c.isBlack()) {
color = null;
}
break;
case "blue":
if (!c.isBlue()) {
color = null;
}
break;
case "green":
if (!c.isGreen()) {
color = null;
}
break;
case "red":
if (!c.isRed()) {
color = null;
}
break;
case "white":
if (!c.isWhite()) {
color = null;
}
break;
}
}
if (color == null && artifact == null) { //nothing can make the attacker unblockable
@@ -1683,7 +1722,7 @@ public class AiAttackController {
return null; //should never get here
}
private void doLightmineFieldAttackLogic(final List<Card> attackersLeft, int numForcedAttackers, boolean playAggro) {
private void doLightmineFieldAttackLogic(final Queue<Card> attackersLeft, int numForcedAttackers, boolean playAggro) {
CardCollection attSorted = new CardCollection(attackersLeft);
CardCollection attUnsafe = new CardCollection();
CardLists.sortByToughnessDesc(attSorted);
@@ -1713,13 +1752,15 @@ public class AiAttackController {
attackersLeft.removeAll(attUnsafe);
}
private boolean doRevengeOfRavensAttackLogic(final GameEntity defender, final List<Card> attackersLeft, int numForcedAttackers, int maxAttack) {
private boolean doRevengeOfRavensAttackLogic(final GameEntity defender, final Queue<Card> attackersLeft, int numForcedAttackers, int maxAttack) {
// TODO: detect Revenge of Ravens by the trigger instead of by name
boolean revengeOfRavens = false;
if (defender instanceof Player) {
revengeOfRavens = !CardLists.filter(((Player)defender).getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals("Revenge of Ravens")).isEmpty();
} else if (defender instanceof Card) {
revengeOfRavens = !CardLists.filter(((Card)defender).getController().getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals("Revenge of Ravens")).isEmpty();
if (defender instanceof Player player) {
revengeOfRavens = !CardLists.filter(player.getCardsIn(ZoneType.Battlefield),
CardPredicates.nameEquals("Revenge of Ravens")).isEmpty();
} else if (defender instanceof Card card) {
revengeOfRavens = !CardLists.filter(card.getController().getCardsIn(ZoneType.Battlefield),
CardPredicates.nameEquals("Revenge of Ravens")).isEmpty();
}
if (!revengeOfRavens) {

View File

@@ -18,9 +18,7 @@
package forge.ai;
import java.util.*;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import java.util.function.Predicate;
import forge.card.CardStateName;
import forge.game.GameEntity;
@@ -163,12 +161,12 @@ public class AiBlockController {
// defend battles with fewer defense counters before battles with more defense counters,
// if planeswalker/battle will be too difficult to defend don't even bother
for (GameEntity defender : defenders) {
if ((defender instanceof Card && ((Card) defender).getController().equals(ai))
|| (defender instanceof Card && ((Card) defender).isBattle() && ((Card) defender).getProtectingPlayer().equals(ai))) {
final CardCollection attackers = combat.getAttackersOf(defender);
if ((defender instanceof Card card1 && card1.getController().equals(ai))
|| (defender instanceof Card card2 && card2.isBattle() && card2.getProtectingPlayer().equals(ai))) {
final CardCollection ccAttackers = combat.getAttackersOf(defender);
// Begin with the attackers that pose the biggest threat
CardLists.sortByPowerDesc(attackers);
sortedAttackers.addAll(attackers);
CardLists.sortByPowerDesc(ccAttackers);
sortedAttackers.addAll(ccAttackers);
} else if (defender instanceof Player && defender.equals(ai)) {
firstAttacker = combat.getAttackersOf(defender);
CardLists.sortByPowerDesc(firstAttacker);
@@ -327,7 +325,7 @@ public class AiBlockController {
}
private Predicate<Card> rampagesOrNeedsManyToBlock(final Combat combat) {
return Predicates.or(CardPredicates.hasKeyword(Keyword.RAMPAGE), input -> {
return CardPredicates.hasKeyword(Keyword.RAMPAGE).or(input -> {
// select creature that has a max blocker
return StaticAbilityCantAttackBlock.getMinMaxBlocker(input, combat.getDefenderPlayerByAttacker(input)).getRight() < Integer.MAX_VALUE;
});
@@ -368,7 +366,7 @@ public class AiBlockController {
* @param combat a {@link forge.game.combat.Combat} object.
*/
private void makeGangBlocks(final Combat combat) {
List<Card> currentAttackers = CardLists.filter(attackersLeft, Predicates.not(rampagesOrNeedsManyToBlock(combat)));
List<Card> currentAttackers = CardLists.filter(attackersLeft, rampagesOrNeedsManyToBlock(combat).negate());
List<Card> blockers;
// Try to block an attacker without first strike with a gang of first strikers
@@ -740,11 +738,11 @@ public class AiBlockController {
List<Card> chumpBlockers;
List<Card> tramplingAttackers = CardLists.getKeyword(attackers, Keyword.TRAMPLE);
tramplingAttackers = CardLists.filter(tramplingAttackers, Predicates.not(rampagesOrNeedsManyToBlock(combat)));
tramplingAttackers = CardLists.filter(tramplingAttackers, rampagesOrNeedsManyToBlock(combat).negate());
// TODO - Instead of filtering out rampage-like and similar triggers, make the AI properly count P/T and
// reinforce when actually possible without losing material.
tramplingAttackers = CardLists.filter(tramplingAttackers, Predicates.not(changesPTWhenBlocked(true)));
tramplingAttackers = CardLists.filter(tramplingAttackers, changesPTWhenBlocked(true).negate());
for (final Card attacker : tramplingAttackers) {
if (CombatUtil.getMinNumBlockersForAttacker(attacker, combat.getDefenderPlayerByAttacker(attacker)) > combat.getBlockers(attacker).size()) {
@@ -753,10 +751,6 @@ public class AiBlockController {
boolean needsMoreChumpBlockers = true;
// See if it's possible to tank up the damage with Banding
List<String> bandsWithString = Arrays.asList("Bands with Other Legendary Creatures",
"Bands with Other Creatures named Wolves of the Hunt",
"Bands with Other Dinosaurs");
if (AttackingBand.isValidBand(combat.getBlockers(attacker), true)) {
continue;
}
@@ -766,7 +760,7 @@ public class AiBlockController {
// See if there's a Banding blocker that can tank the damage
for (final Card blocker : chumpBlockers) {
if (blocker.hasKeyword(Keyword.BANDING) || blocker.hasAnyKeyword(bandsWithString)) {
if (blocker.hasKeyword(Keyword.BANDING) || blocker.hasKeyword(Keyword.BANDSWITH)) {
if (ComputerUtilCombat.getAttack(attacker) > ComputerUtilCombat.totalShieldDamage(attacker, combat.getBlockers(attacker))
&& ComputerUtilCombat.shieldDamage(attacker, blocker) > 0
&& CombatUtil.canBlock(attacker, blocker, combat) && ComputerUtilCombat.lifeInDanger(ai, combat)) {
@@ -799,11 +793,11 @@ public class AiBlockController {
private void reinforceBlockersToKill(final Combat combat) {
List<Card> safeBlockers;
List<Card> blockers;
List<Card> targetAttackers = CardLists.filter(blockedButUnkilled, Predicates.not(rampagesOrNeedsManyToBlock(combat)));
List<Card> targetAttackers = CardLists.filter(blockedButUnkilled, rampagesOrNeedsManyToBlock(combat).negate());
// TODO - Instead of filtering out rampage-like and similar triggers, make the AI properly count P/T and
// reinforce when actually possible without losing material.
targetAttackers = CardLists.filter(targetAttackers, Predicates.not(changesPTWhenBlocked(false)));
targetAttackers = CardLists.filter(targetAttackers, changesPTWhenBlocked(false).negate());
for (final Card attacker : targetAttackers) {
blockers = getPossibleBlockers(combat, attacker, blockersLeft, false);
@@ -878,9 +872,9 @@ public class AiBlockController {
CardCollection threatenedPWs = new CardCollection();
for (final Card attacker : attackers) {
GameEntity def = combat.getDefenderByAttacker(attacker);
if (def instanceof Card) {
if (def instanceof Card card) {
if (!onlyIfLethal) {
threatenedPWs.add((Card) def);
threatenedPWs.add(card);
} else {
int damageToPW = 0;
for (final Card pwatkr : combat.getAttackersOf(def)) {
@@ -912,12 +906,12 @@ public class AiBlockController {
continue;
}
GameEntity def = combat.getDefenderByAttacker(attacker);
if (def instanceof Card && threatenedPWs.contains(def)) {
if (def instanceof Card card && threatenedPWs.contains(def)) {
Card blockerDecided = null;
for (final Card blocker : chumpPWDefenders) {
if (CombatUtil.canBlock(attacker, blocker, combat)) {
combat.addBlocker(attacker, blocker);
pwsWithChumpBlocks.add((Card) def);
pwsWithChumpBlocks.add(card);
chosenChumpBlockers.add(blocker);
blockerDecided = blocker;
blockersLeft.remove(blocker);
@@ -1349,11 +1343,11 @@ public class AiBlockController {
boolean creatureParityOrAllowedDiff = aiCreatureCount
+ (randomTradeIfBehindOnBoard ? maxCreatDiff : 0) >= oppCreatureCount;
boolean wantToTradeWithCreatInHand = !checkingOther && randomTradeIfCreatInHand
&& ai.getZone(ZoneType.Hand).contains(CardPredicates.Presets.CREATURES)
&& ai.getZone(ZoneType.Hand).contains(CardPredicates.CREATURES)
&& aiCreatureCount + maxCreatDiffWithRepl >= oppCreatureCount;
boolean wantToSavePlaneswalker = MyRandom.percentTrue(chanceToSavePW)
&& combat.getDefenderByAttacker(attacker) instanceof Card
&& ((Card) combat.getDefenderByAttacker(attacker)).isPlaneswalker();
&& combat.getDefenderByAttacker(attacker) instanceof Card card
&& card.isPlaneswalker();
boolean wantToTradeDownToSavePW = chanceToTradeDownToSaveWalker > 0;
return ((evalBlk <= evalAtk + 1) || (wantToSavePlaneswalker && wantToTradeDownToSavePW)) // "1" accounts for tapped.

View File

@@ -18,12 +18,17 @@
package forge.ai;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import forge.game.card.Card;
import forge.game.player.Player;
/**
* <p>
* AiCardMemory class.
@@ -62,75 +67,13 @@ public class AiCardMemory {
REVEALED_CARDS // These cards were recently revealed to the AI by a call to PlayerControllerAi.reveal
}
private final Set<Card> memMandatoryAttackers;
private final Set<Card> memTrickAttackers;
private final Set<Card> memHeldManaSources;
private final Set<Card> memHeldManaSourcesForCombat;
private final Set<Card> memHeldManaSourcesForEnemyCombat;
private final Set<Card> memHeldManaSourcesForNextSpell;
private final Set<Card> memAttachedThisTurn;
private final Set<Card> memAnimatedThisTurn;
private final Set<Card> memBouncedThisTurn;
private final Set<Card> memActivatedThisTurn;
private final Set<Card> memChosenFogEffect;
private final Set<Card> memMarkedToAvoidReentry;
private final Set<Card> memPaysTapCost;
private final Set<Card> memPaysSacCost;
private final Set<Card> memRevealedCards;
private final Supplier<Map<MemorySet, Set<Card>>> memoryMap = Suppliers.memoize(Maps::newConcurrentMap);
public AiCardMemory() {
this.memMandatoryAttackers = new HashSet<>();
this.memHeldManaSources = new HashSet<>();
this.memHeldManaSourcesForCombat = new HashSet<>();
this.memHeldManaSourcesForEnemyCombat = new HashSet<>();
this.memAttachedThisTurn = new HashSet<>();
this.memAnimatedThisTurn = new HashSet<>();
this.memBouncedThisTurn = new HashSet<>();
this.memActivatedThisTurn = new HashSet<>();
this.memTrickAttackers = new HashSet<>();
this.memChosenFogEffect = new HashSet<>();
this.memMarkedToAvoidReentry = new HashSet<>();
this.memHeldManaSourcesForNextSpell = new HashSet<>();
this.memPaysTapCost = new HashSet<>();
this.memPaysSacCost = new HashSet<>();
this.memRevealedCards = new HashSet<>();
}
private Set<Card> getMemorySet(MemorySet set) {
switch (set) {
case MANDATORY_ATTACKERS:
return memMandatoryAttackers;
case TRICK_ATTACKERS:
return memTrickAttackers;
case HELD_MANA_SOURCES_FOR_MAIN2:
return memHeldManaSources;
case HELD_MANA_SOURCES_FOR_DECLBLK:
return memHeldManaSourcesForCombat;
case HELD_MANA_SOURCES_FOR_ENEMY_DECLBLK:
return memHeldManaSourcesForEnemyCombat;
case HELD_MANA_SOURCES_FOR_NEXT_SPELL:
return memHeldManaSourcesForNextSpell;
case ATTACHED_THIS_TURN:
return memAttachedThisTurn;
case ANIMATED_THIS_TURN:
return memAnimatedThisTurn;
case BOUNCED_THIS_TURN:
return memBouncedThisTurn;
case ACTIVATED_THIS_TURN:
return memActivatedThisTurn;
case CHOSEN_FOG_EFFECT:
return memChosenFogEffect;
case MARKED_TO_AVOID_REENTRY:
return memMarkedToAvoidReentry;
case PAYS_TAP_COST:
return memPaysTapCost;
case PAYS_SAC_COST:
return memPaysSacCost;
case REVEALED_CARDS:
return memRevealedCards;
default:
return null;
}
return memoryMap.get().computeIfAbsent(set, value -> Sets.newConcurrentHashSet());
}
/**
@@ -145,10 +88,7 @@ public class AiCardMemory {
if (c == null) {
return false;
}
Set<Card> memorySet = getMemorySet(set);
return memorySet != null && memorySet.contains(c);
return getMemorySet(set).contains(c);
}
/**
@@ -160,17 +100,7 @@ public class AiCardMemory {
* @return true, if at least one card with the given name is remembered in the given memory set
*/
public boolean isRememberedCardByName(String cardName, MemorySet set) {
Set<Card> memorySet = getMemorySet(set);
if (memorySet != null) {
for (Card c : memorySet) {
if (c.getName().equals(cardName)) {
return true;
}
}
}
return false;
return getMemorySet(set).stream().anyMatch(c -> c.getName().equals(cardName));
}
/**
@@ -184,17 +114,7 @@ public class AiCardMemory {
* @return true, if at least one card with the given name is remembered in the given memory set
*/
public boolean isRememberedCardByName(String cardName, MemorySet set, Player owner) {
Set<Card> memorySet = getMemorySet(set);
if (memorySet != null) {
for (Card c : memorySet) {
if (c.getName().equals(cardName) && c.getOwner().equals(owner)) {
return true;
}
}
}
return false;
return getMemorySet(set).stream().anyMatch(c -> c.getName().equals(cardName) && c.getOwner().equals(owner));
}
/**
@@ -207,14 +127,7 @@ public class AiCardMemory {
public boolean rememberCard(Card c, MemorySet set) {
if (c == null)
return false;
Set<Card> memorySet = getMemorySet(set);
if (memorySet != null) {
memorySet.add(c);
}
return true;
return getMemorySet(set).add(c);
}
/**
@@ -231,14 +144,7 @@ public class AiCardMemory {
if (!isRememberedCard(c, set)) {
return false;
}
Set<Card> memorySet = getMemorySet(set);
if (memorySet != null) {
memorySet.remove(c);
}
return true;
return getMemorySet(set).remove(c);
}
/**
@@ -249,16 +155,11 @@ public class AiCardMemory {
* @return true, if at least one card with the given name was previously remembered in the given memory set and was successfully forgotten
*/
public boolean forgetAnyCardWithName(String cardName, MemorySet set) {
Set<Card> memorySet = getMemorySet(set);
if (memorySet != null) {
for (Card c : memorySet) {
if (c.getName().equals(cardName)) {
return forgetCard(c, set);
}
for (Card c : getMemorySet(set)) {
if (c.getName().equals(cardName)) {
return forgetCard(c, set);
}
}
return false;
}
@@ -271,16 +172,11 @@ public class AiCardMemory {
* @return true, if at least one card with the given name was previously remembered in the given memory set and was successfully forgotten
*/
public boolean forgetAnyCardWithName(String cardName, MemorySet set, Player owner) {
Set<Card> memorySet = getMemorySet(set);
if (memorySet != null) {
for (Card c : memorySet) {
if (c.getName().equals(cardName) && c.getOwner().equals(owner)) {
return forgetCard(c, set);
}
for (Card c : getMemorySet(set)) {
if (c.getName().equals(cardName) && c.getOwner().equals(owner)) {
return forgetCard(c, set);
}
}
return false;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,8 @@
package forge.ai;
import com.google.common.base.Predicates;
import com.google.common.collect.Lists;
import forge.ai.AiCardMemory.MemorySet;
import forge.card.CardType;
import forge.card.MagicColor;
import forge.game.Game;
@@ -32,6 +33,10 @@ public class AiCostDecision extends CostDecisionMakerBase {
discarded = new CardCollection();
tapped = new CardCollection();
Set<Card> tappedForMana = AiCardMemory.getMemorySet(ai0, MemorySet.PAYS_TAP_COST);
if (tappedForMana != null) {
tapped.addAll(tappedForMana);
}
}
@Override
@@ -41,6 +46,14 @@ public class AiCostDecision extends CostDecisionMakerBase {
return PaymentDecision.number(c);
}
@Override
public PaymentDecision visit(CostBehold cost) {
final String type = cost.getType();
CardCollectionView hand = player.getCardsIn(cost.getRevealFrom());
hand = CardLists.getValidCards(hand, type.split(";"), player, source, ability);
return hand.isEmpty() ? null : PaymentDecision.card(getBestCreatureAI(hand));
}
@Override
public PaymentDecision visit(CostChooseColor cost) {
int c = cost.getAbilityAmount(ability);
@@ -51,8 +64,7 @@ public class AiCostDecision extends CostDecisionMakerBase {
@Override
public PaymentDecision visit(CostChooseCreatureType cost) {
String choice = player.getController().chooseSomeType("Creature", ability, CardType.getAllCreatureTypes(),
Lists.newArrayList());
String choice = player.getController().chooseSomeType("Creature", ability, CardType.getAllCreatureTypes());
return PaymentDecision.type(choice);
}
@@ -105,13 +117,13 @@ public class AiCostDecision extends CostDecisionMakerBase {
Card chosen;
if (!discardMe.isEmpty()) {
chosen = Aggregates.random(discardMe);
discardMe = CardLists.filter(discardMe, Predicates.not(CardPredicates.sharesNameWith(chosen)));
discardMe = CardLists.filter(discardMe, CardPredicates.sharesNameWith(chosen).negate());
} else {
final Card worst = ComputerUtilCard.getWorstAI(hand);
chosen = worst != null ? worst : Aggregates.random(hand);
}
differentNames.add(chosen);
hand = CardLists.filter(hand, Predicates.not(CardPredicates.sharesNameWith(chosen)));
hand = CardLists.filter(hand, CardPredicates.sharesNameWith(chosen).negate());
c--;
}
return PaymentDecision.card(differentNames);
@@ -440,21 +452,6 @@ public class AiCostDecision extends CostDecisionMakerBase {
return null;
}
if ("DontPayTapCostWithManaSources".equals(source.getSVar("AIPaymentPreference"))) {
CardCollectionView toExclude =
CardLists.getValidCards(player.getCardsIn(ZoneType.Battlefield), type.split(";"),
ability.getActivatingPlayer(), ability.getHostCard(), ability);
toExclude = CardLists.filter(toExclude, card -> {
for (final SpellAbility sa : card.getSpellAbilities()) {
if (sa.isManaAbility() && sa.getPayCosts().hasTapCost()) {
return true;
}
}
return false;
});
exclude.addAll(toExclude);
}
String totalP = "";
CardCollectionView totap;
if (isVehicle) {
@@ -651,7 +648,7 @@ public class AiCostDecision extends CostDecisionMakerBase {
// TODO sort negatives to remove from best Cards first?
for (final Card crd : negatives) {
for (Map.Entry<CounterType, Integer> e : table.filterToRemove(crd).entrySet()) {
if (ComputerUtil.isNegativeCounter(e.getKey(), crd)) {
if (ComputerUtil.isNegativeCounter(e.getKey(), crd) && crd.canRemoveCounters(e.getKey())) {
int over = Math.min(e.getValue(), c - toRemove);
if (over > 0) {
toRemove += over;
@@ -762,7 +759,7 @@ public class AiCostDecision extends CostDecisionMakerBase {
}
}
// if table is empty, than no counter was removed
// if table is empty, then no counter was removed
return table.isEmpty() ? null : PaymentDecision.counters(table);
}
@@ -838,12 +835,12 @@ public class AiCostDecision extends CostDecisionMakerBase {
@Override
public PaymentDecision visit(CostUnattach cost) {
final Card cardToUnattach = cost.findCardToUnattach(source, player, ability);
if (cardToUnattach == null) {
final CardCollection cardToUnattach = cost.findCardToUnattach(source, player, ability);
if (cardToUnattach.isEmpty()) {
// We really shouldn't be able to get here if there's nothing to unattach
return null;
}
return PaymentDecision.card(cardToUnattach);
return PaymentDecision.card(cardToUnattach.getFirst());
}
@Override

View File

@@ -13,7 +13,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class AIDeckStatistics {
public class AiDeckStatistics {
public float averageCMC = 0;
// TODO implement this. Use a numerically stable algorithm from
@@ -24,9 +24,9 @@ public class AIDeckStatistics {
// in WUBRGC order from ManaCost.getColorShardCounts()
public int[] maxPips = null;
// public int[] numSources = new int[6];
// public int[] numSources = new int[6];
public int numLands = 0;
public AIDeckStatistics(float averageCMC, float stddevCMC, int maxCost, int maxColoredCost, int[] maxPips, int numLands) {
public AiDeckStatistics(float averageCMC, float stddevCMC, int maxCost, int maxColoredCost, int[] maxPips, int numLands) {
this.averageCMC = averageCMC;
this.stddevCMC = stddevCMC;
this.maxCost = maxCost;
@@ -35,7 +35,7 @@ public class AIDeckStatistics {
this.numLands = numLands;
}
public static AIDeckStatistics fromCards(List<Card> cards) {
public static AiDeckStatistics fromCards(List<Card> cards) {
int totalCMC = 0;
int totalCount = 0;
int numLands = 0;
@@ -75,7 +75,7 @@ public class AIDeckStatistics {
}
return new AIDeckStatistics(totalCount == 0 ? 0 : totalCMC / (float)totalCount,
return new AiDeckStatistics(totalCount == 0 ? 0 : totalCMC / (float)totalCount,
0, // TODO use https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
maxCost,
maxColoredCost,
@@ -85,7 +85,7 @@ public class AIDeckStatistics {
}
public static AIDeckStatistics fromDeck(Deck deck, Player player) {
public static AiDeckStatistics fromDeck(Deck deck, Player player) {
List<Card> cardlist = new ArrayList<>();
for (final Map.Entry<DeckSection, CardPool> deckEntry : deck) {
switch (deckEntry.getKey()) {
@@ -104,7 +104,7 @@ public class AIDeckStatistics {
return fromCards(cardlist);
}
public static AIDeckStatistics fromPlayer(Player player) {
public static AiDeckStatistics fromPlayer(Player player) {
Deck deck = player.getRegisteredPlayer().getDeck();
if (deck.isEmpty()) {
// we're in a test or some weird match, search through the hand and library and build the decklist
@@ -120,7 +120,6 @@ public class AIDeckStatistics {
}
return fromDeck(deck, player);
}
}

View File

@@ -17,19 +17,18 @@
*/
package forge.ai;
import forge.LobbyPlayer;
import forge.util.Aggregates;
import forge.util.FileUtil;
import forge.util.TextUtil;
import org.apache.commons.lang3.ArrayUtils;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.ArrayUtils;
import forge.LobbyPlayer;
import forge.util.Aggregates;
import forge.util.FileUtil;
import forge.util.TextUtil;
/**
* Holds default AI personality profile values in an enum.
* Loads profile from the given text file when setProfile is called.

View File

@@ -17,16 +17,7 @@
*/
package forge.ai;
import java.util.*;
import com.google.common.collect.*;
import forge.game.card.*;
import forge.game.cost.*;
import org.apache.commons.lang3.StringUtils;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import forge.ai.AiCardMemory.MemorySet;
import forge.ai.ability.ProtectAi;
import forge.ai.ability.TokenAi;
@@ -35,23 +26,19 @@ import forge.card.CardType;
import forge.card.ColorSet;
import forge.card.MagicColor;
import forge.card.mana.ManaAtom;
import forge.game.CardTraitPredicates;
import forge.game.Game;
import forge.game.GameActionUtil;
import forge.game.GameEntity;
import forge.game.GameEntityCounterTable;
import forge.game.GameObject;
import forge.game.GameType;
import forge.game.*;
import forge.game.ability.AbilityKey;
import forge.game.ability.AbilityUtils;
import forge.game.ability.ApiType;
import forge.game.ability.effects.CharmEffect;
import forge.game.card.CardPredicates.Presets;
import forge.game.card.*;
import forge.game.combat.Combat;
import forge.game.combat.CombatUtil;
import forge.game.cost.*;
import forge.game.keyword.Keyword;
import forge.game.phase.PhaseHandler;
import forge.game.phase.PhaseType;
import forge.game.player.GameLossReason;
import forge.game.player.Player;
import forge.game.replacement.ReplacementEffect;
import forge.game.replacement.ReplacementLayer;
@@ -61,6 +48,7 @@ import forge.game.spellability.SpellAbility;
import forge.game.spellability.SpellAbilityStackInstance;
import forge.game.spellability.TargetRestrictions;
import forge.game.staticability.StaticAbility;
import forge.game.staticability.StaticAbilityMode;
import forge.game.trigger.Trigger;
import forge.game.trigger.TriggerType;
import forge.game.trigger.WrappedAbility;
@@ -68,8 +56,13 @@ import forge.game.zone.Zone;
import forge.game.zone.ZoneType;
import forge.util.Aggregates;
import forge.util.MyRandom;
import forge.util.StreamUtil;
import forge.util.TextUtil;
import forge.util.collect.FCollection;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
import java.util.function.Predicate;
/**
@@ -86,6 +79,8 @@ public class ComputerUtil {
}
public static boolean handlePlayingSpellAbility(final Player ai, SpellAbility sa, final Game game, Runnable chooseTargets) {
final Card source = sa.getHostCard();
final Card host = sa.getHostCard();
final Zone hz = host.isCopiedSpell() ? null : host.getZone();
source.setSplitStateToPlayAbility(sa);
if (sa.isSpell() && !source.isCopiedSpell()) {
@@ -124,29 +119,25 @@ public class ComputerUtil {
// Spell Permanents inherit their cost from Mana Cost
final Cost cost = sa.getPayCosts();
// Remember the now-forgotten kicker cost? Why is this needed?
sa.getHostCard().setKickerMagnitude(source.getKickerMagnitude());
game.getStack().freezeStack(sa);
// TODO: update mana color conversion for Daxos of Meletis
if (cost == null) {
// Is this fork even used for anything anymore?
if (ComputerUtilMana.payManaCost(ai, sa, false)) {
game.getStack().addAndUnfreeze(sa);
return true;
final CostPayment pay = new CostPayment(cost, sa);
if (pay.payComputerCosts(new AiCostDecision(ai, sa, false))) {
game.getStack().addAndUnfreeze(sa);
if (sa.getSplicedCards() != null && !sa.getSplicedCards().isEmpty()) {
game.getAction().reveal(sa.getSplicedCards(), ai, true, "Computer reveals spliced cards from ");
}
} else {
final CostPayment pay = new CostPayment(cost, sa);
if (pay.payComputerCosts(new AiCostDecision(ai, sa, false))) {
game.getStack().addAndUnfreeze(sa);
if (sa.getSplicedCards() != null && !sa.getSplicedCards().isEmpty()) {
game.getAction().reveal(sa.getSplicedCards(), ai, true, "Computer reveals spliced cards from ");
}
return true;
return true;
}
// FIXME: Should not arrive here, though the card seems to be stucked on stack zone and invalidated and nowhere to be found, try to put back to original zone and maybe try to cast again if possible at later time?
System.out.println("[" + sa.getActivatingPlayer() + "] AI failed to play " + sa.getHostCard() + " [" + sa.getHostCard().getZone() + "]");
sa.setSkip(true);
if (host != null && hz != null && hz.is(ZoneType.Stack)) {
Card c = game.getAction().moveTo(hz.getZoneType(), host, null, null);
for (SpellAbility csa : c.getSpellAbilities()) {
csa.setSkip(true);
}
}
//Should not arrive here
System.out.println("AI failed to play " + sa.getHostCard());
return false;
}
@@ -166,7 +157,6 @@ public class ComputerUtil {
}
public static int counterSpellRestriction(final Player ai, final SpellAbility sa) {
// Move this to AF?
// Restriction Level is Based off a handful of factors
int restrict = 0;
@@ -224,9 +214,8 @@ public class ComputerUtil {
return restrict;
}
// this is used for AI's counterspells
public static final boolean playStack(SpellAbility sa, final Player ai, final Game game) {
sa.setActivatingPlayer(ai, true);
sa.setActivatingPlayer(ai);
if (!ComputerUtilCost.canPayCost(sa, ai, false))
return false;
@@ -240,10 +229,9 @@ public class ComputerUtil {
if (sa.isSpell() && !source.isCopiedSpell()) {
sa.setHostCard(game.getAction().moveToStack(source, sa));
sa = GameActionUtil.addExtraKeywordCost(sa);
}
sa = GameActionUtil.addExtraKeywordCost(sa);
final Cost cost = sa.getPayCosts();
final CostPayment pay = new CostPayment(cost, sa);
@@ -253,94 +241,34 @@ public class ComputerUtil {
return false;
}
if (cost == null) {
ComputerUtilMana.payManaCost(ai, sa, false);
if (pay.payComputerCosts(new AiCostDecision(ai, sa, false))) {
game.getStack().add(sa);
} else {
if (pay.payComputerCosts(new AiCostDecision(ai, sa, false))) {
game.getStack().add(sa);
}
return true;
}
return true;
}
public static final void playSpellAbilityForFree(final Player ai, final SpellAbility sa) {
final Game game = ai.getGame();
sa.setActivatingPlayer(ai, true);
final Card source = sa.getHostCard();
if (sa.isSpell() && !source.isCopiedSpell()) {
sa.setHostCard(game.getAction().moveToStack(source, sa));
}
game.getStack().add(sa);
}
public static final boolean playSpellAbilityWithoutPayingManaCost(final Player ai, final SpellAbility sa, final Game game) {
SpellAbility newSA = sa.copyWithNoManaCost();
newSA.setActivatingPlayer(ai, true);
if (!CostPayment.canPayAdditionalCosts(newSA.getPayCosts(), newSA, false) || !ComputerUtilMana.canPayManaCost(newSA, ai, 0, false)) {
return false;
}
newSA = GameActionUtil.addExtraKeywordCost(newSA);
final Card source = newSA.getHostCard();
Zone fromZone = game.getZoneOf(source);
int zonePosition = 0;
if (fromZone != null) {
zonePosition = fromZone.getCards().indexOf(source);
}
if (newSA.isSpell() && !source.isCopiedSpell()) {
newSA.setHostCard(game.getAction().moveToStack(source, newSA));
if (newSA.getApi() == ApiType.Charm && !CharmEffect.makeChoices(newSA)) {
// 603.3c If no mode is chosen, the ability is removed from the stack.
return false;
}
}
final CostPayment pay = new CostPayment(newSA.getPayCosts(), newSA);
// do this after card got added to stack
if (!newSA.checkRestrictions(ai)) {
GameActionUtil.rollbackAbility(newSA, fromZone, zonePosition, pay, source);
return false;
}
pay.payComputerCosts(new AiCostDecision(ai, newSA, false));
game.getStack().add(newSA);
return true;
return false;
}
public static final boolean playNoStack(final Player ai, SpellAbility sa, final Game game, final boolean effect) {
sa.setActivatingPlayer(ai, true);
sa.setActivatingPlayer(ai);
// TODO: We should really restrict what doesn't use the Stack
if (!ComputerUtilCost.canPayCost(sa, ai, effect)) {
return false;
}
final Card source = sa.getHostCard();
if (sa.isSpell() && !source.isCopiedSpell()) {
if (!effect && sa.isSpell() && !source.isCopiedSpell()) {
sa.setHostCard(game.getAction().moveToStack(source, sa));
sa = GameActionUtil.addExtraKeywordCost(sa);
}
sa = GameActionUtil.addExtraKeywordCost(sa);
final Cost cost = sa.getPayCosts();
if (cost == null) {
ComputerUtilMana.payManaCost(ai, sa, effect);
} else {
final CostPayment pay = new CostPayment(cost, sa);
pay.payComputerCosts(new AiCostDecision(ai, sa, effect));
final CostPayment pay = new CostPayment(cost, sa);
if (pay.payComputerCosts(new AiCostDecision(ai, sa, effect))) {
AbilityUtils.resolve(sa);
return true;
}
AbilityUtils.resolve(sa);
return true;
return false;
}
public static Card getCardPreference(final Player ai, final Card activate, final String pref, final CardCollection typeList) {
@@ -531,7 +459,7 @@ public class ComputerUtil {
// Discard lands
final CardCollection landsInHand = CardLists.getType(typeList, "Land");
if (!landsInHand.isEmpty()) {
final int numLandsInPlay = CardLists.count(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.LANDS_PRODUCING_MANA);
final int numLandsInPlay = CardLists.count(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.LANDS_PRODUCING_MANA);
final CardCollection nonLandsInHand = CardLists.getNotType(ai.getCardsIn(ZoneType.Hand), "Land");
final int highestCMC = Math.max(6, Aggregates.max(nonLandsInHand, Card::getCMC));
if (numLandsInPlay >= highestCMC
@@ -642,7 +570,7 @@ public class ComputerUtil {
// if the source has "Casualty", don't sacrifice cards that may have granted the effect
// TODO: is there a surefire way to determine which card added Casualty?
if (source.hasKeyword(Keyword.CASUALTY)) {
typeList = CardLists.filter(typeList, Predicates.not(CardPredicates.hasSVar("AIDontSacToCasualty")));
typeList = CardLists.filter(typeList, CardPredicates.hasSVar("AIDontSacToCasualty").negate());
}
if (typeList.size() < amount) {
@@ -676,14 +604,13 @@ public class ComputerUtil {
CardLists.sortByCmcDesc(typeList);
Collections.reverse(typeList);
// TODO AI needs some improvements here
// Whats the best way to choose evidence to collect?
// Probably want to filter out cards that have graveyard abilities/castable from graveyard
// Ideally we remove as few cards as possible "Don't overspend"
final CardCollection exileList = new CardCollection();
while(amount > 0) {
while (amount > 0) {
Card c = typeList.remove(0);
amount -= c.getCMC();
@@ -772,7 +699,7 @@ public class ComputerUtil {
all.removeAll(exclude);
CardCollection typeList = CardLists.getValidCards(all, type.split(";"), activate.getController(), activate, sa);
typeList = CardLists.filter(typeList, Presets.CAN_TAP);
typeList = CardLists.filter(typeList, CardPredicates.CAN_TAP);
if (tap) {
typeList.remove(activate);
@@ -783,6 +710,7 @@ public class ComputerUtil {
}
CardLists.sortByPowerAsc(typeList);
// TODO prefer noncreatures without tap abilities
final CardCollection tapList = new CardCollection();
@@ -802,7 +730,7 @@ public class ComputerUtil {
all.removeAll(exclude);
CardCollection typeList = CardLists.getValidCards(all, type.split(";"), activate.getController(), activate, sa);
typeList = CardLists.filter(typeList, sa.isCrew() ? Presets.CAN_CREW : Presets.CAN_TAP);
typeList = CardLists.filter(typeList, sa.isCrew() ? CardPredicates.CAN_CREW : CardPredicates.CAN_TAP);
if (tap) {
typeList.remove(activate);
@@ -824,7 +752,7 @@ public class ComputerUtil {
tapList.clear();
}
tapList.add(next);
totalPower = CardLists.getTotalPower(tapList, true, sa.isCrew());
totalPower = CardLists.getTotalPower(tapList, sa);
if (totalPower >= amount) {
break;
}
@@ -837,10 +765,9 @@ public class ComputerUtil {
}
public static CardCollection chooseUntapType(final Player ai, final String type, final Card activate, final boolean untap, final int amount, SpellAbility sa) {
CardCollection typeList =
CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), type.split(";"), activate.getController(), activate, sa);
CardCollection typeList = CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), type.split(";"), activate.getController(), activate, sa);
typeList = CardLists.filter(typeList, Presets.TAPPED);
typeList = CardLists.filter(typeList, CardPredicates.TAPPED, c -> c.getCounters(CounterEnumType.STUN) == 0 || c.canRemoveCounters(CounterType.get(CounterEnumType.STUN)));
if (untap) {
typeList.remove(activate);
@@ -852,12 +779,7 @@ public class ComputerUtil {
CardLists.sortByPowerDesc(typeList);
final CardCollection untapList = new CardCollection();
for (int i = 0; i < amount; i++) {
untapList.add(typeList.get(i));
}
return untapList;
return typeList.subList(0, amount);
}
public static CardCollection chooseReturnType(final Player ai, final String type, final Card activate, final Card target, final int amount, SpellAbility sa) {
@@ -922,7 +844,7 @@ public class ComputerUtil {
}
} else if (isOptional && source.getActivatingPlayer().isOpponentOf(ai)) {
if ("Pillar Tombs of Aku".equals(host.getName())) {
if (!ai.canLoseLife() || ai.cantLose()) {
if (!ai.canLoseLife() || ai.cantLoseForZeroOrLessLife()) {
return sacrificed; // sacrifice none
}
} else {
@@ -942,7 +864,7 @@ public class ComputerUtil {
// Run non-mandatory trigger.
// These checks only work if the Executing SpellAbility is an Ability_Sub.
if ((exSA instanceof AbilitySub) && !SpellApiToAi.Converter.get(exSA.getApi()).doTriggerAI(ai, exSA, false)) {
if ((exSA instanceof AbilitySub) && !SpellApiToAi.Converter.get(exSA).doTriggerAI(ai, exSA, false)) {
// AI would not run this trigger if given the chance
return sacrificed;
}
@@ -1038,7 +960,7 @@ public class ComputerUtil {
c = ComputerUtilCard.getWorstCreatureAI(remaining);
}
else if (CardLists.getNotType(remaining, "Land").isEmpty()) {
c = ComputerUtilCard.getWorstLand(CardLists.filter(remaining, CardPredicates.Presets.LANDS));
c = ComputerUtilCard.getWorstLand(CardLists.filter(remaining, CardPredicates.LANDS));
}
else {
c = ComputerUtilCard.getWorstPermanentAI(remaining, false, false, false, false);
@@ -1074,7 +996,7 @@ public class ComputerUtil {
if (!sa.isActivatedAbility() || sa.getApi() != ApiType.Regenerate) {
continue; // Not a Regenerate ability
}
sa.setActivatingPlayer(controller, true);
sa.setActivatingPlayer(controller);
if (!(sa.canPlay() && ComputerUtilCost.canPayCost(sa, controller, false))) {
continue; // Can't play ability
}
@@ -1178,6 +1100,11 @@ public class ComputerUtil {
}
}
// if AI has no speed, play start your engines on Main1
if (ai.noSpeed() && cardState.hasKeyword(Keyword.START_YOUR_ENGINES)) {
return true;
}
// cast Blitz in main 1 if the creature attacks
if (sa.isBlitz() && ComputerUtilCard.doesSpecifiedCreatureAttackAI(ai, card)) {
return true;
@@ -1347,8 +1274,8 @@ public class ComputerUtil {
}
final Game game = ai.getGame();
final CardCollection landsInPlay = CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.LANDS_PRODUCING_MANA);
final CardCollection landsInHand = CardLists.filter(ai.getCardsIn(ZoneType.Hand), CardPredicates.Presets.LANDS);
final CardCollection landsInPlay = CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.LANDS_PRODUCING_MANA);
final CardCollection landsInHand = CardLists.filter(ai.getCardsIn(ZoneType.Hand), CardPredicates.LANDS);
final CardCollection nonLandsInHand = CardLists.getNotType(ai.getCardsIn(ZoneType.Hand), "Land");
final int highestCMC = Math.max(6, Aggregates.max(nonLandsInHand, Card::getCMC));
final int discardCMC = discard.getCMC();
@@ -1487,9 +1414,7 @@ public class ComputerUtil {
}
}
for (final CostPart part : abCost.getCostParts()) {
if (part instanceof CostSacrifice) {
final CostSacrifice sac = (CostSacrifice) part;
if (part instanceof CostSacrifice sac) {
final String type = sac.getType();
if (type.equals("CARDNAME")) {
@@ -1534,15 +1459,14 @@ public class ComputerUtil {
// check for Continuous abilities that grant Haste
for (final Card c : all) {
for (StaticAbility stAb : c.getStaticAbilities()) {
Map<String, String> params = stAb.getMapParams();
if ("Continuous".equals(params.get("Mode")) && params.containsKey("AddKeyword")
&& params.get("AddKeyword").contains("Haste")) {
if (stAb.checkMode(StaticAbilityMode.Continuous) && stAb.hasParam("AddKeyword")
&& stAb.getParam("AddKeyword").contains("Haste")) {
if (c.isEquipment() && c.getEquipping() == null) {
return true;
}
final String affected = params.get("Affected");
final String affected = stAb.getParam("Affected");
if (affected.contains("Creature.YouCtrl")
|| affected.contains("Other+YouCtrl")) {
return true;
@@ -1595,11 +1519,10 @@ public class ComputerUtil {
for (final Card c : opp) {
for (StaticAbility stAb : c.getStaticAbilities()) {
Map<String, String> params = stAb.getMapParams();
if ("Continuous".equals(params.get("Mode")) && params.containsKey("AddKeyword")
&& params.get("AddKeyword").contains("Haste")) {
if (stAb.checkMode(StaticAbilityMode.Continuous) && stAb.hasParam("AddKeyword")
&& stAb.getParam("AddKeyword").contains("Haste")) {
final ArrayList<String> affected = Lists.newArrayList(params.get("Affected").split(","));
final ArrayList<String> affected = Lists.newArrayList(stAb.getParam("Affected").split(","));
if (affected.contains("Creature")) {
return true;
}
@@ -1633,7 +1556,7 @@ public class ComputerUtil {
for (final Card c : all) {
// check if card is at least available to be played
// further improvements might consider if AI has options to steal the spell by making it playable first
if (c.getZone().getPlayer() != null && c.getZone().getPlayer() != defender && c.mayPlay(defender).isEmpty()) {
if (c.getZone() != null && c.getZone().getPlayer() != null && c.getZone().getPlayer() != defender && c.mayPlay(defender).isEmpty()) {
continue;
}
for (final SpellAbility sa : c.getSpellAbilities()) {
@@ -1667,7 +1590,7 @@ public class ComputerUtil {
int damage = 0;
final CardCollection all = new CardCollection(ai.getCardsIn(ZoneType.Battlefield));
all.addAll(ai.getCardsActivatableInExternalZones(true));
all.addAll(CardLists.filter(ai.getCardsIn(ZoneType.Hand), Predicates.not(Presets.PERMANENTS)));
all.addAll(CardLists.filter(ai.getCardsIn(ZoneType.Hand), CardPredicates.PERMANENTS.negate()));
for (final Card c : all) {
if (c.getZone().getPlayer() != null && c.getZone().getPlayer() != ai && c.mayPlay(ai).isEmpty()) {
@@ -1677,7 +1600,7 @@ public class ComputerUtil {
if (sa.getApi() != ApiType.DealDamage) {
continue;
}
sa.setActivatingPlayer(ai, true);
sa.setActivatingPlayer(ai);
final String numDam = sa.getParam("NumDmg");
int dmg = AbilityUtils.calculateAmount(sa.getHostCard(), numDam, sa);
if (dmg <= damage) {
@@ -1757,7 +1680,7 @@ public class ComputerUtil {
sub = sub.getSubAbility();
}
if (sa == null || (sa != spell && sa != sub)) {
Iterables.addAll(objects, predictThreatenedObjects(ai, sa, spell));
predictThreatenedObjects(ai, sa, spell).forEach(objects::add);
}
if (top) {
break; // only evaluate top-stack
@@ -1855,9 +1778,7 @@ public class ComputerUtil {
noRegen = true;
}
for (final Object o : objects) {
if (o instanceof Card) {
final Card c = (Card) o;
if (o instanceof Card c) {
// indestructible
if (c.hasKeyword(Keyword.INDESTRUCTIBLE)) {
continue;
@@ -1921,9 +1842,7 @@ public class ComputerUtil {
if (ComputerUtilCombat.predictDamageTo(c, dmg, source, false) >= ComputerUtilCombat.getDamageToKill(c, false)) {
threatened.add(c);
}
} else if (o instanceof Player) {
final Player p = (Player) o;
} else if (o instanceof Player p) {
if (source.hasKeyword(Keyword.INFECT)) {
if (p.canReceiveCounters(CounterEnumType.POISON) && ComputerUtilCombat.predictDamageTo(p, dmg, source, false) >= 10 - p.getPoisonCounters()) {
threatened.add(p);
@@ -1941,8 +1860,7 @@ public class ComputerUtil {
|| saviourApi == null)) {
final int dmg = -AbilityUtils.calculateAmount(source, topStack.getParam("NumDef"), topStack);
for (final Object o : objects) {
if (o instanceof Card) {
final Card c = (Card) o;
if (o instanceof Card c) {
final boolean canRemove = (c.getNetToughness() <= dmg)
|| (!c.hasKeyword(Keyword.INDESTRUCTIBLE) && c.getShieldCount() == 0 && dmg >= ComputerUtilCombat.getDamageToKill(c, false));
if (!canRemove) {
@@ -1988,9 +1906,7 @@ public class ComputerUtil {
|| saviourApi == ApiType.Protection || saviourApi == null
|| saviorWithSubsApi == ApiType.Pump || saviorWithSubsApi == ApiType.PumpAll)) {
for (final Object o : objects) {
if (o instanceof Card) {
final Card c = (Card) o;
// indestructible
if (o instanceof Card c) {
if (c.hasKeyword(Keyword.INDESTRUCTIBLE)) {
continue;
}
@@ -2039,8 +1955,7 @@ public class ComputerUtil {
&& topStack.hasParam("Destination")
&& topStack.getParam("Destination").equals("Exile")) {
for (final Object o : objects) {
if (o instanceof Card) {
final Card c = (Card) o;
if (o instanceof Card c) {
// give Shroud to targeted creatures
if ((saviourApi == ApiType.Pump || saviourApi == ApiType.PumpAll) && (!topStack.usesTargeting() || !grantShroud)) {
continue;
@@ -2067,8 +1982,7 @@ public class ComputerUtil {
&& (saviourApi == ApiType.ChangeZone || saviourApi == ApiType.Pump || saviourApi == ApiType.PumpAll
|| saviourApi == ApiType.Protection || saviourApi == null)) {
for (final Object o : objects) {
if (o instanceof Card) {
final Card c = (Card) o;
if (o instanceof Card c) {
// give Shroud to targeted creatures
if ((saviourApi == ApiType.Pump || saviourApi == ApiType.PumpAll) && (!topStack.usesTargeting() || !grantShroud)) {
continue;
@@ -2090,8 +2004,7 @@ public class ComputerUtil {
boolean enableCurseAuraRemoval = aic != null ? aic.getBooleanProperty(AiProps.ACTIVELY_DESTROY_IMMEDIATELY_UNBLOCKABLE) : false;
if (enableCurseAuraRemoval) {
for (final Object o : objects) {
if (o instanceof Card) {
final Card c = (Card) o;
if (o instanceof Card c) {
// give Shroud to targeted creatures
if ((saviourApi == ApiType.Pump || saviourApi == ApiType.PumpAll) && (!topStack.usesTargeting() || !grantShroud)) {
continue;
@@ -2107,7 +2020,7 @@ public class ComputerUtil {
}
}
Iterables.addAll(threatened, predictThreatenedObjects(aiPlayer, saviour, topStack.getSubAbility()));
predictThreatenedObjects(aiPlayer, saviour, topStack.getSubAbility()).forEach(threatened::add);
return threatened;
}
@@ -2221,7 +2134,7 @@ public class ComputerUtil {
}
CardCollectionView library = ai.getCardsIn(ZoneType.Library);
int landsInDeck = CardLists.count(library, CardPredicates.isType("Land"));
int landsInDeck = CardLists.count(library, CardPredicates.LANDS);
// no land deck, can't do anything better
if (landsInDeck == 0) {
@@ -2366,14 +2279,14 @@ public class ComputerUtil {
CardCollectionView cardsInHand = player.getCardsIn(ZoneType.Hand);
CardCollectionView cardsOTB = player.getCardsIn(ZoneType.Battlefield);
CardCollection landsOTB = CardLists.filter(cardsOTB, CardPredicates.Presets.LANDS_PRODUCING_MANA);
CardCollection landsOTB = CardLists.filter(cardsOTB, CardPredicates.LANDS_PRODUCING_MANA);
CardCollection thisLandOTB = CardLists.filter(cardsOTB, CardPredicates.nameEquals(c.getName()));
CardCollection landsInHand = CardLists.filter(cardsInHand, CardPredicates.Presets.LANDS_PRODUCING_MANA);
CardCollection landsInHand = CardLists.filter(cardsInHand, CardPredicates.LANDS_PRODUCING_MANA);
// valuable mana-producing artifacts that may be equated to a land
List<String> manaArts = Arrays.asList("Mox Pearl", "Mox Sapphire", "Mox Jet", "Mox Ruby", "Mox Emerald");
// evaluate creatures available in deck
CardCollectionView allCreatures = CardLists.filter(allCards, CardPredicates.Presets.CREATURES, CardPredicates.isOwner(player));
CardCollectionView allCreatures = CardLists.filter(allCards, CardPredicates.CREATURES, CardPredicates.isOwner(player));
int numCards = allCreatures.size();
if (landsOTB.size() < maxLandsToScryLandsToTop && landsInHand.isEmpty()) {
@@ -2402,7 +2315,7 @@ public class ComputerUtil {
}
}
} else if (c.isCreature()) {
CardCollection creaturesOTB = CardLists.filter(cardsOTB, CardPredicates.Presets.CREATURES);
CardCollection creaturesOTB = CardLists.filter(cardsOTB, CardPredicates.CREATURES);
int avgCreatureValue = numCards != 0 ? ComputerUtilCard.evaluateCreatureList(allCreatures) / numCards : 0;
int maxControlledCMC = Aggregates.max(creaturesOTB, Card::getCMC);
@@ -2453,7 +2366,10 @@ public class ComputerUtil {
// not enough good choices, need to fill the rest
int minDiff = min - goodChoices.size();
if (minDiff > 0) {
goodChoices.addAll(Aggregates.random(CardLists.filter(validCards, Predicates.not(Predicates.in(goodChoices))), minDiff));
List<Card> choices = validCards.stream()
.filter(Predicate.not(goodChoices::contains))
.collect(StreamUtil.random(minDiff));
goodChoices.addAll(choices);
return goodChoices;
}
@@ -2473,12 +2389,9 @@ public class ComputerUtil {
return getCardsToDiscardFromOpponent(aiChooser, p, sa, validCards, min, max);
}
public static String chooseSomeType(Player ai, String kindOfType, SpellAbility sa, Collection<String> validTypes, List<String> invalidTypes) {
public static String chooseSomeType(Player ai, String kindOfType, SpellAbility sa, Collection<String> validTypes) {
final String logic = sa.getParam("AILogic");
if (invalidTypes == null) {
invalidTypes = ImmutableList.of();
}
if (validTypes == null) {
validTypes = ImmutableList.of();
}
@@ -2491,14 +2404,12 @@ public class ComputerUtil {
// otherwise, lib search for most common type left then, reveal chosenType to Human
if (game.getPhaseHandler().is(PhaseType.UNTAP) && logic == null) { // Storage Matrix
double amount = 0;
for (String type : CardType.getAllCardTypes()) {
if (!invalidTypes.contains(type)) {
CardCollection list = CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.isType(type), Presets.TAPPED);
double i = type.equals("Creature") ? list.size() * 1.5 : list.size();
if (i > amount) {
amount = i;
chosen = type;
}
for (String type : validTypes) {
CardCollection list = CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.isType(type), CardPredicates.TAPPED);
double i = type.equals("Creature") ? list.size() * 1.5 : list.size();
if (i > amount) {
amount = i;
chosen = type;
}
}
} else if ("ProtectionFromType".equals(logic)) {
@@ -2513,12 +2424,11 @@ public class ComputerUtil {
if (StringUtils.isEmpty(chosen)) {
chosen = "Creature"; // if in doubt, choose Creature, I guess
}
}
else {
} else {
// Are we picking a type to reduce costs for that type?
boolean reducingCost = false;
for (StaticAbility s : sa.getHostCard().getStaticAbilities()) {
if ("ReduceCost".equals(s.getParam("Mode")) && "Card.ChosenType".equals(s.getParam("ValidCard"))) {
if (s.checkMode(StaticAbilityMode.ReduceCost) && "Card.ChosenType".equals(s.getParam("ValidCard"))) {
reducingCost = true;
break;
}
@@ -2526,7 +2436,6 @@ public class ComputerUtil {
if (reducingCost) {
List<String> valid = Lists.newArrayList(validTypes);
valid.removeAll(invalidTypes);
valid.remove("Land"); // Lands don't have costs to reduce
chosen = ComputerUtilCard.getMostProminentCardType(ai.getAllCards(), valid);
}
@@ -2536,50 +2445,42 @@ public class ComputerUtil {
}
} else if (kindOfType.equals("Creature")) {
if (logic != null) {
List <String> valid = Lists.newArrayList(CardType.getAllCreatureTypes());
valid.removeAll(invalidTypes);
if (logic.equals("MostProminentOnBattlefield")) {
chosen = ComputerUtilCard.getMostProminentType(game.getCardsIn(ZoneType.Battlefield), valid);
}
else if (logic.equals("MostProminentComputerControls")) {
chosen = ComputerUtilCard.getMostProminentType(ai.getCardsIn(ZoneType.Battlefield), valid);
}
else if (logic.equals("MostProminentComputerControlsOrOwns")) {
chosen = ComputerUtilCard.getMostProminentType(game.getCardsIn(ZoneType.Battlefield), validTypes);
} else if (logic.equals("MostProminentComputerControls")) {
chosen = ComputerUtilCard.getMostProminentType(ai.getCardsIn(ZoneType.Battlefield), validTypes);
} else if (logic.equals("MostProminentComputerControlsOrOwns")) {
CardCollectionView list = ai.getCardsIn(Arrays.asList(ZoneType.Battlefield, ZoneType.Hand));
if (list.isEmpty()) {
list = ai.getCardsIn(Arrays.asList(ZoneType.Library));
}
chosen = ComputerUtilCard.getMostProminentType(list, valid);
}
else if (logic.equals("MostProminentOppControls")) {
chosen = ComputerUtilCard.getMostProminentType(list, validTypes);
} else if (logic.equals("MostProminentOppControls")) {
CardCollection list = ai.getOpponents().getCardsIn(ZoneType.Battlefield);
chosen = ComputerUtilCard.getMostProminentType(list, valid);
if (!CardType.isACreatureType(chosen) || invalidTypes.contains(chosen)) {
chosen = ComputerUtilCard.getMostProminentType(list, validTypes);
if (!CardType.isACreatureType(chosen)) {
list = CardLists.filterControlledBy(game.getCardsInGame(), ai.getOpponents());
chosen = ComputerUtilCard.getMostProminentType(list, valid);
chosen = ComputerUtilCard.getMostProminentType(list, validTypes);
}
}
else if (logic.startsWith("MostProminentInComputerDeck")) {
} else if (logic.startsWith("MostProminentInComputerDeck")) {
boolean includeTokens = !logic.endsWith("NonToken");
chosen = ComputerUtilCard.getMostProminentType(ai.getAllCards(), valid, includeTokens);
}
else if (logic.equals("MostProminentInComputerGraveyard")) {
chosen = ComputerUtilCard.getMostProminentType(ai.getCardsIn(ZoneType.Graveyard), valid);
chosen = ComputerUtilCard.getMostProminentType(ai.getAllCards(), validTypes, includeTokens);
} else if (logic.equals("MostProminentInComputerGraveyard")) {
chosen = ComputerUtilCard.getMostProminentType(ai.getCardsIn(ZoneType.Graveyard), validTypes);
}
}
if (!CardType.isACreatureType(chosen) || invalidTypes.contains(chosen)) {
chosen = "Sliver";
if (!CardType.isACreatureType(chosen)) {
chosen = validTypes.size() == 1 ? (String) validTypes.toArray()[0] :
ComputerUtilCard.getMostProminentType(ai.getAllCards(), validTypes, false);
//chosen = "Sliver";
}
} else if (kindOfType.equals("Basic Land")) {
if (logic != null) {
if (logic.equals("MostProminentOppControls")) {
CardCollection list = ai.getOpponents().getCardsIn(ZoneType.Battlefield);
List<String> valid = Lists.newArrayList(CardType.getBasicTypes());
valid.removeAll(invalidTypes);
chosen = ComputerUtilCard.getMostProminentType(list, valid);
chosen = ComputerUtilCard.getMostProminentType(list, validTypes);
} else if (logic.equals("MostNeededType")) {
// Choose a type that is in the deck, but not in hand or on the battlefield
final List<String> basics = new ArrayList<>(CardType.Constant.BASIC_TYPES);
@@ -2587,13 +2488,13 @@ public class ComputerUtil {
CardCollectionView possibleCards = ai.getAllCards();
for (String b : basics) {
if (!Iterables.any(presentCards, CardPredicates.isType(b)) && Iterables.any(possibleCards, CardPredicates.isType(b))) {
if (!presentCards.anyMatch(CardPredicates.isType(b)) && possibleCards.anyMatch(CardPredicates.isType(b))) {
chosen = b;
}
}
if (chosen.isEmpty()) {
for (String b : basics) {
if (Iterables.any(possibleCards, CardPredicates.isType(b))) {
if (possibleCards.anyMatch(CardPredicates.isType(b))) {
chosen = b;
}
}
@@ -2602,7 +2503,7 @@ public class ComputerUtil {
else if (logic.equals("ChosenLandwalk")) {
for (Card c : AiAttackController.choosePreferredDefenderPlayer(ai).getLandsInPlay()) {
for (String t : c.getType()) {
if (!invalidTypes.contains(t) && CardType.isABasicLandType(t)) {
if (CardType.isABasicLandType(t)) {
chosen = t;
break;
}
@@ -2611,7 +2512,7 @@ public class ComputerUtil {
}
}
if (!CardType.isABasicLandType(chosen) || invalidTypes.contains(chosen)) {
if (!CardType.isABasicLandType(chosen) || !validTypes.contains(chosen)) {
chosen = "Island";
}
}
@@ -2620,7 +2521,7 @@ public class ComputerUtil {
if (logic.equals("ChosenLandwalk")) {
for (Card c : AiAttackController.choosePreferredDefenderPlayer(ai).getLandsInPlay()) {
for (String t : c.getType().getLandTypes()) {
if (!invalidTypes.contains(t)) {
if (validTypes.contains(t)) {
chosen = t;
break;
}
@@ -2690,7 +2591,7 @@ public class ComputerUtil {
return Iterables.getFirst(votes.keySet(), null);
case "FeatherOrQuill":
// try to mill opponent with Quill vote
if (opponent && !controller.cantLose()) {
if (opponent && !controller.cantLoseCheck(GameLossReason.Milled)) {
int numQuill = votes.get("Quill").size();
if (numQuill + 1 >= controller.getCardsIn(ZoneType.Library).size()) {
return controller.isCardInPlay("Laboratory Maniac") ? "Feather" : "Quill";
@@ -2804,8 +2705,7 @@ public class ComputerUtil {
}
// has cards with SacMe or Token
if (CardLists.count(aiCreatures,
Predicates.or(CardPredicates.hasSVar("SacMe"), CardPredicates.Presets.TOKEN)) >= numDeath) {
if (CardLists.count(aiCreatures, CardPredicates.hasSVar("SacMe").or(CardPredicates.TOKEN)) >= numDeath) {
return "Death";
}
@@ -2888,16 +2788,12 @@ public class ComputerUtil {
if (!trigger.requirementsCheck(game)) {
continue;
}
if (trigger.hasParam("ValidCard")) {
if (!card.isValid(trigger.getParam("ValidCard").split(","), source.getController(), source, sa)) {
continue;
}
}
if (trigger.hasParam("ValidActivatingPlayer")) {
if (!player.isValid(trigger.getParam("ValidActivatingPlayer"), source.getController(), source, sa)) {
continue;
}
if (!trigger.matchesValidParam("ValidCard", card)) {
continue;
}
if (!trigger.matchesValidParam("ValidActivatingPlayer", player)) {
continue;
}
// fall back for OverridingAbility
@@ -2955,10 +2851,8 @@ public class ComputerUtil {
&& AbilityUtils.getDefinedCards(permanent, source.getSVar(trigger.getParam("CheckOnTriggeredCard").split(" ")[0]), null).isEmpty()) {
continue;
}
if (trigger.hasParam("ValidCard")) {
if (!permanent.isValid(trigger.getParam("ValidCard"), source.getController(), source, null)) {
continue;
}
if (!trigger.matchesValidParam("ValidCard", permanent)) {
continue;
}
// fall back for OverridingAbility
SpellAbility trigSa = trigger.ensureAbility();
@@ -2996,7 +2890,7 @@ public class ComputerUtil {
// Iceberg does use Ice as Storage
|| (type.is(CounterEnumType.ICE) && !"Iceberg".equals(c.getName()))
// some lands does use Depletion as Storage Counter
|| (type.is(CounterEnumType.DEPLETION) && c.hasKeyword("CARDNAME doesn't untap during your untap step."))
|| (type.is(CounterEnumType.DEPLETION) && c.getReplacementEffects().anyMatch(r -> r.getMode().equals(ReplacementType.Untap) && r.getLayer().equals(ReplacementLayer.CantHappen)))
// treat Time Counters on suspended Cards as Bad,
// and also on Chronozoa
|| (type.is(CounterEnumType.TIME) && (!c.isInPlay() || "Chronozoa".equals(c.getName())))
@@ -3088,11 +2982,11 @@ public class ComputerUtil {
repParams,
ReplacementLayer.Other);
if (Iterables.any(list, CardTraitPredicates.hasParam("AILogic", "NoLife"))) {
if (list.stream().anyMatch(CardTraitPredicates.hasParam("AILogic", "NoLife"))) {
return false;
} else if (Iterables.any(list, CardTraitPredicates.hasParam("AILogic", "LoseLife"))) {
} else if (list.stream().anyMatch(CardTraitPredicates.hasParam("AILogic", "LoseLife"))) {
return false;
} else if (Iterables.any(list, CardTraitPredicates.hasParam("AILogic", "LichDraw"))) {
} else if (list.stream().anyMatch(CardTraitPredicates.hasParam("AILogic", "LichDraw"))) {
return false;
}
return true;
@@ -3117,13 +3011,13 @@ public class ComputerUtil {
ReplacementLayer.Other
);
if (Iterables.any(list, CardTraitPredicates.hasParam("AILogic", "NoLife"))) {
if (list.stream().anyMatch(CardTraitPredicates.hasParam("AILogic", "NoLife"))) {
// no life gain is not negative
return false;
} else if (Iterables.any(list, CardTraitPredicates.hasParam("AILogic", "LoseLife"))) {
} else if (list.stream().anyMatch(CardTraitPredicates.hasParam("AILogic", "LoseLife"))) {
// lose life is only negative is the player can lose life
return player.canLoseLife();
} else if (Iterables.any(list, CardTraitPredicates.hasParam("AILogic", "LichDraw"))) {
} else if (list.stream().anyMatch(CardTraitPredicates.hasParam("AILogic", "LichDraw"))) {
// if it would draw more cards than player has, then its negative
return player.getCardsIn(ZoneType.Library).size() <= n;
}
@@ -3154,7 +3048,7 @@ public class ComputerUtil {
}
SpellAbility abTest = withoutPayingManaCost ? ab.copyWithNoManaCost() : ab.copy();
// at this point, we're assuming that card will be castable from whichever zone it's in by the AI player.
abTest.setActivatingPlayer(ai, true);
abTest.setActivatingPlayer(ai);
abTest.getRestrictions().setZone(c.getZone().getZoneType());
if (AiPlayDecision.WillPlay == aic.canPlaySa(abTest) && ComputerUtilCost.canPayCost(abTest, ai, false)) {
targets.add(c);
@@ -3254,7 +3148,7 @@ public class ComputerUtil {
// performance shortcut
// TODO if checking upcoming turn it should be a permanent effect
if (ai.cantLose()) {
if (ai.cantLoseForZeroOrLessLife()) {
return remainingLife;
}
@@ -3313,8 +3207,7 @@ public class ComputerUtil {
repParams.put(AbilityKey.EffectOnly, true);
repParams.put(AbilityKey.CounterTable, table);
repParams.put(AbilityKey.CounterMap, table.column(c));
List<ReplacementEffect> list = c.getGame().getReplacementHandler().getReplacementList(ReplacementType.Moved, repParams, ReplacementLayer.CantHappen);
return !list.isEmpty();
return c.getGame().getReplacementHandler().cantHappenCheck(ReplacementType.Moved, repParams);
}
public static boolean shouldSacrificeThreatenedCard(Player ai, Card c, SpellAbility sa) {

View File

@@ -14,7 +14,6 @@ import forge.game.card.Card;
import forge.game.card.CardCollection;
import forge.game.card.CardCollectionView;
import forge.game.card.CardLists;
import forge.game.card.CardPredicates.Presets;
import forge.game.cost.CostPart;
import forge.game.cost.CostPayEnergy;
import forge.game.cost.CostPutCounter;
@@ -22,6 +21,7 @@ import forge.game.cost.CostRemoveCounter;
import forge.game.keyword.Keyword;
import forge.game.phase.PhaseType;
import forge.game.player.Player;
import forge.game.spellability.OptionalCost;
import forge.game.spellability.OptionalCostValue;
import forge.game.spellability.SpellAbility;
import forge.game.spellability.SpellAbilityStackInstance;
@@ -32,20 +32,14 @@ public class ComputerUtilAbility {
if (!game.getStack().isEmpty() || !game.getPhaseHandler().getPhase().isMain()) {
return null;
}
final CardCollection hand = new CardCollection(player.getCardsIn(ZoneType.Hand));
hand.addAll(player.getCardsIn(ZoneType.Exile));
CardCollection landList = CardLists.filter(hand, Presets.LANDS);
CardCollection landList = new CardCollection(player.getCardsIn(ZoneType.Hand));
//filter out cards that can't be played
landList = CardLists.filter(landList, c -> {
if (!c.getSVar("NeedsToPlay").isEmpty()) {
final String needsToPlay = c.getSVar("NeedsToPlay");
CardCollection list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), needsToPlay, c.getController(), c, null);
if (list.isEmpty()) {
return false;
}
if (!c.hasPlayableLandFace()) {
return false;
}
return player.canPlayLand(c);
return player.canPlayLand(c, false, c.getFirstSpellAbility());
});
final CardCollection landsNotInHand = new CardCollection(player.getCardsIn(ZoneType.Graveyard));
@@ -54,7 +48,7 @@ public class ComputerUtilAbility {
landsNotInHand.add(player.getCardsIn(ZoneType.Library).get(0));
}
for (final Card crd : landsNotInHand) {
if (!(crd.isLand() || (crd.isFaceDown() && crd.getState(CardStateName.Original).getType().isLand()))) {
if (!(crd.hasPlayableLandFace() || (crd.isFaceDown() && crd.getState(CardStateName.Original).getType().isLand()))) {
continue;
}
if (!crd.mayPlay(player).isEmpty()) {
@@ -96,7 +90,7 @@ public class ComputerUtilAbility {
List<SpellAbility> originListWithAddCosts = Lists.newArrayList();
for (SpellAbility sa : originList) {
// If this spell has alternative additional costs, add them instead of the unmodified SA itself
sa.setActivatingPlayer(player, true);
sa.setActivatingPlayer(player);
originListWithAddCosts.addAll(GameActionUtil.getAdditionalCostSpell(sa));
}
@@ -123,12 +117,16 @@ public class ComputerUtilAbility {
final List<SpellAbility> result = Lists.newArrayList();
for (SpellAbility sa : newAbilities) {
sa.setActivatingPlayer(player, true);
sa.setActivatingPlayer(player);
// Optional cost selection through the AI controller
boolean choseOptCost = false;
List<OptionalCostValue> list = GameActionUtil.getOptionalCostValues(sa);
if (!list.isEmpty()) {
// still add base spell in case of Promise Gift
if (list.stream().anyMatch(ocv -> ocv.getType().equals(OptionalCost.PromiseGift))) {
result.add(sa);
}
list = player.getController().chooseOptionalCosts(sa, list);
if (!list.isEmpty()) {
choseOptCost = true;
@@ -360,7 +358,7 @@ public class ComputerUtilAbility {
}
// 1. increase chance of using Surge effects
// 2. non-surged versions are usually inefficient
if (source.getOracleText().contains("surge cost") && !sa.isSurged()) {
if (source.hasKeyword(Keyword.SURGE) && !sa.isSurged()) {
p -= 9;
}
// move snap-casted spells to front
@@ -393,8 +391,10 @@ public class ComputerUtilAbility {
}
if (ApiType.DestroyAll == sa.getApi()) {
// check boardwipe earlier
p += 4;
} else if (ApiType.Mana == sa.getApi()) {
// keep mana abilities for paying
p -= 9;
}
@@ -405,7 +405,7 @@ public class ComputerUtilAbility {
return p;
}
};
}
public static List<SpellAbility> sortCreatureSpells(final List<SpellAbility> all) {
// try to smoothen power creep by making CMC less of a factor

View File

@@ -2,21 +2,24 @@ package forge.ai;
import java.util.*;
import java.util.Map.Entry;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Stream;
import com.google.common.base.Function;
import forge.StaticData;
import forge.ai.simulation.GameStateEvaluator;
import forge.card.mana.ManaCost;
import forge.game.card.*;
import forge.util.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.MutablePair;
import org.apache.commons.lang3.tuple.Pair;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import forge.card.CardRules;
import forge.card.CardStateName;
import forge.card.CardType;
import forge.card.ColorSet;
@@ -45,14 +48,11 @@ import forge.game.replacement.ReplacementEffect;
import forge.game.replacement.ReplacementLayer;
import forge.game.spellability.SpellAbility;
import forge.game.staticability.StaticAbility;
import forge.game.staticability.StaticAbilityMode;
import forge.game.trigger.Trigger;
import forge.game.zone.MagicStack;
import forge.game.zone.ZoneType;
import forge.item.PaperCard;
import forge.util.Aggregates;
import forge.util.Expressions;
import forge.util.MyRandom;
import forge.util.TextUtil;
public class ComputerUtilCard {
public static Card getMostExpensivePermanentAI(final CardCollectionView list, final SpellAbility spell, final boolean targeted) {
@@ -86,12 +86,11 @@ public class ComputerUtilCard {
* @return a {@link forge.game.card.Card} object.
*/
public static Card getBestArtifactAI(final List<Card> list) {
List<Card> all = CardLists.filter(list, CardPredicates.Presets.ARTIFACTS);
if (all.size() == 0) {
return null;
}
// get biggest Artifact
return Aggregates.itemWithMax(all, Card::getCMC);
return list.stream()
.filter(CardPredicates.ARTIFACTS)
.max(Comparator.comparing(Card::getCMC))
.orElse(null);
}
/**
@@ -101,12 +100,11 @@ public class ComputerUtilCard {
* @return best Planeswalker
*/
public static Card getBestPlaneswalkerAI(final List<Card> list) {
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANESWALKERS);
if (all.isEmpty()) {
return null;
}
// no AI logic, just return most expensive
return Aggregates.itemWithMax(all, Card::getCMC);
return list.stream()
.filter(CardPredicates.PLANESWALKERS)
.max(Comparator.comparing(Card::getCMC))
.orElse(null);
}
/**
@@ -116,12 +114,11 @@ public class ComputerUtilCard {
* @return best Planeswalker
*/
public static Card getWorstPlaneswalkerAI(final List<Card> list) {
List<Card> all = CardLists.filter(list, CardPredicates.Presets.PLANESWALKERS);
if (all.isEmpty()) {
return null;
}
// no AI logic, just return least expensive
return Aggregates.itemWithMin(all, Card::getCMC);
return list.stream()
.filter(CardPredicates.PLANESWALKERS)
.min(Comparator.comparing(Card::getCMC))
.orElse(null);
}
public static Card getBestPlaneswalkerToDamage(final List<Card> pws) {
@@ -187,13 +184,13 @@ public class ComputerUtilCard {
* @return a {@link forge.game.card.Card} object.
*/
public static Card getBestEnchantmentAI(final List<Card> list, final SpellAbility spell, final boolean targeted) {
List<Card> all = CardLists.filter(list, CardPredicates.Presets.ENCHANTMENTS);
Stream<Card> cardStream = list.stream().filter(CardPredicates.ENCHANTMENTS);
if (targeted) {
all = CardLists.filter(all, c -> c.canBeTargetedBy(spell));
cardStream = cardStream.filter(c -> c.canBeTargetedBy(spell));
}
// get biggest Enchantment
return Aggregates.itemWithMax(all, Card::getCMC);
return cardStream.max(Comparator.comparing(Card::getCMC)).orElse(null);
}
/**
@@ -205,30 +202,30 @@ public class ComputerUtilCard {
* @return a {@link forge.game.card.Card} object.
*/
public static Card getBestLandAI(final Iterable<Card> list) {
final List<Card> land = CardLists.filter(list, CardPredicates.Presets.LANDS);
final List<Card> land = CardLists.filter(list, CardPredicates.LANDS);
if (land.isEmpty()) {
return null;
}
// prefer to target non basic lands
final List<Card> nbLand = CardLists.filter(land, Predicates.not(CardPredicates.Presets.BASIC_LANDS));
final List<Card> nbLand = CardLists.filter(land, CardPredicates.NONBASIC_LANDS);
if (!nbLand.isEmpty()) {
// TODO - Improve ranking various non-basic lands depending on context
// Urza's Mine/Tower/Power Plant
final CardCollectionView aiAvailable = nbLand.get(0).getController().getCardsIn(Arrays.asList(ZoneType.Battlefield, ZoneType.Hand));
if (Iterables.any(list, CardPredicates.nameEquals("Urza's Mine"))) {
if (IterableUtil.any(list, CardPredicates.nameEquals("Urza's Mine"))) {
if (CardLists.filter(aiAvailable, CardPredicates.nameEquals("Urza's Mine")).isEmpty()) {
return CardLists.filter(nbLand, CardPredicates.nameEquals("Urza's Mine")).getFirst();
}
}
if (Iterables.any(list, CardPredicates.nameEquals("Urza's Tower"))) {
if (IterableUtil.any(list, CardPredicates.nameEquals("Urza's Tower"))) {
if (CardLists.filter(aiAvailable, CardPredicates.nameEquals("Urza's Tower")).isEmpty()) {
return CardLists.filter(nbLand, CardPredicates.nameEquals("Urza's Tower")).getFirst();
}
}
if (Iterables.any(list, CardPredicates.nameEquals("Urza's Power Plant"))) {
if (IterableUtil.any(list, CardPredicates.nameEquals("Urza's Power Plant"))) {
if (CardLists.filter(aiAvailable, CardPredicates.nameEquals("Urza's Power Plant")).isEmpty()) {
return CardLists.filter(nbLand, CardPredicates.nameEquals("Urza's Power Plant")).getFirst();
}
@@ -250,17 +247,16 @@ public class ComputerUtilCard {
}
if (iminBL == Integer.MAX_VALUE) {
// All basic lands have no basic land type. Just return something
return Iterables.find(land, CardPredicates.Presets.UNTAPPED, land.get(0));
return land.stream().filter(CardPredicates.UNTAPPED).findFirst().orElse(land.get(0));
}
final List<Card> bLand = CardLists.getType(land, sminBL);
for (Card ut : Iterables.filter(bLand, CardPredicates.Presets.UNTAPPED)) {
return ut;
}
// TODO potentially risky if simulation mode currently able to reach this from triggers
return Aggregates.random(bLand); // random tapped land of least represented type
return bLand.stream()
.filter(CardPredicates.UNTAPPED)
.findFirst()
// TODO potentially risky if simulation mode currently able to reach this from triggers
.orElseGet(() -> Aggregates.random(bLand)); // random tapped land of least represented type
}
/**
@@ -362,10 +358,10 @@ public class ComputerUtilCard {
*/
public static Card getBestAI(final Iterable<Card> list) {
// Get Best will filter by appropriate getBest list if ALL of the list is of that type
if (Iterables.all(list, CardPredicates.Presets.CREATURES)) {
if (IterableUtil.all(list, CardPredicates.CREATURES)) {
return getBestCreatureAI(list);
}
if (Iterables.all(list, CardPredicates.Presets.LANDS)) {
if (IterableUtil.all(list, CardPredicates.LANDS)) {
return getBestLandAI(list);
}
// TODO - Once we get an EvaluatePermanent this should call getBestPermanent()
@@ -382,7 +378,7 @@ public class ComputerUtilCard {
if (Iterables.size(list) == 1) {
return Iterables.get(list, 0);
}
return Aggregates.itemWithMax(Iterables.filter(list, CardPredicates.Presets.CREATURES), ComputerUtilCard.creatureEvaluator);
return Aggregates.itemWithMax(IterableUtil.filter(list, CardPredicates.CREATURES), ComputerUtilCard.creatureEvaluator);
}
/**
@@ -395,7 +391,7 @@ public class ComputerUtilCard {
if (Iterables.size(list) == 1) {
return Iterables.get(list, 0);
}
return Aggregates.itemWithMax(Iterables.filter(list, CardPredicates.Presets.LANDS), ComputerUtilCard.landEvaluator);
return Aggregates.itemWithMax(IterableUtil.filter(list, Card::hasPlayableLandFace), ComputerUtilCard.landEvaluator);
}
/**
@@ -410,7 +406,7 @@ public class ComputerUtilCard {
if (Iterables.size(list) == 1) {
return Iterables.get(list, 0);
}
return Aggregates.itemWithMin(Iterables.filter(list, CardPredicates.Presets.CREATURES), ComputerUtilCard.creatureEvaluator);
return Aggregates.itemWithMin(IterableUtil.filter(list, CardPredicates.CREATURES), ComputerUtilCard.creatureEvaluator);
}
// This selection rates tokens higher
@@ -431,7 +427,7 @@ public class ComputerUtilCard {
Card biggest = null;
int biggestvalue = -1;
for (Card card : CardLists.filter(list, CardPredicates.Presets.CREATURES)) {
for (Card card : CardLists.filter(list, CardPredicates.CREATURES)) {
int newvalue = evaluateCreature(card);
newvalue += card.isToken() ? tokenBonus : 0; // raise the value of tokens
@@ -484,40 +480,40 @@ public class ComputerUtilCard {
return null;
}
final boolean hasEnchantmants = Iterables.any(list, CardPredicates.Presets.ENCHANTMENTS);
final boolean hasEnchantmants = IterableUtil.any(list, CardPredicates.ENCHANTMENTS);
if (biasEnch && hasEnchantmants) {
return getCheapestPermanentAI(CardLists.filter(list, CardPredicates.Presets.ENCHANTMENTS), null, false);
return getCheapestPermanentAI(CardLists.filter(list, CardPredicates.ENCHANTMENTS), null, false);
}
final boolean hasArtifacts = Iterables.any(list, CardPredicates.Presets.ARTIFACTS);
final boolean hasArtifacts = IterableUtil.any(list, CardPredicates.ARTIFACTS);
if (biasArt && hasArtifacts) {
return getCheapestPermanentAI(CardLists.filter(list, CardPredicates.Presets.ARTIFACTS), null, false);
return getCheapestPermanentAI(CardLists.filter(list, CardPredicates.ARTIFACTS), null, false);
}
if (biasLand && Iterables.any(list, CardPredicates.Presets.LANDS)) {
return getWorstLand(CardLists.filter(list, CardPredicates.Presets.LANDS));
if (biasLand && IterableUtil.any(list, CardPredicates.LANDS)) {
return getWorstLand(CardLists.filter(list, CardPredicates.LANDS));
}
final boolean hasCreatures = Iterables.any(list, CardPredicates.Presets.CREATURES);
final boolean hasCreatures = IterableUtil.any(list, CardPredicates.CREATURES);
if (biasCreature && hasCreatures) {
return getWorstCreatureAI(CardLists.filter(list, CardPredicates.Presets.CREATURES));
return getWorstCreatureAI(CardLists.filter(list, CardPredicates.CREATURES));
}
List<Card> lands = CardLists.filter(list, CardPredicates.Presets.LANDS);
List<Card> lands = CardLists.filter(list, CardPredicates.LANDS);
if (lands.size() > 6) {
return getWorstLand(lands);
}
if (hasEnchantmants || hasArtifacts) {
final List<Card> ae = CardLists.filter(list, Predicates.and(
Predicates.or(CardPredicates.Presets.ARTIFACTS, CardPredicates.Presets.ENCHANTMENTS),
card -> !card.hasSVar("DoNotDiscardIfAble")
));
final List<Card> ae = CardLists.filter(list,
(CardPredicates.ARTIFACTS.or(CardPredicates.ENCHANTMENTS))
.and(card -> !card.hasSVar("DoNotDiscardIfAble"))
);
return getCheapestPermanentAI(ae, null, false);
}
if (hasCreatures) {
return getWorstCreatureAI(CardLists.filter(list, CardPredicates.Presets.CREATURES));
return getWorstCreatureAI(CardLists.filter(list, CardPredicates.CREATURES));
}
// Planeswalkers fall through to here, lands will fall through if there aren't very many
@@ -526,8 +522,7 @@ public class ComputerUtilCard {
public static final Card getCheapestSpellAI(final Iterable<Card> list) {
if (!Iterables.isEmpty(list)) {
CardCollection cc = CardLists.filter(list,
Predicates.or(CardPredicates.isType("Instant"), CardPredicates.isType("Sorcery")));
CardCollection cc = CardLists.filter(list, CardPredicates.INSTANTS_AND_SORCERIES);
if (cc.isEmpty()) {
return null;
@@ -697,6 +692,8 @@ public class ComputerUtilCard {
public static boolean canBeBlockedProfitably(final Player ai, Card attacker, boolean checkingOther) {
AiBlockController aiBlk = new AiBlockController(ai, checkingOther);
Combat combat = new Combat(ai);
// avoid removing original attacker
attacker.setCombatLKI(null);
combat.addAttacker(attacker, ai);
final List<Card> attackers = Lists.newArrayList(attacker);
aiBlk.assignBlockersGivenAttackers(combat, attackers);
@@ -714,7 +711,7 @@ public class ComputerUtilCard {
if (!ComputerUtilCost.canPayCost(sa, opp, sa.isTrigger())) {
continue;
}
sa.setActivatingPlayer(opp, true);
sa.setActivatingPlayer(opp);
if (sa.canTarget(card)) {
continue;
}
@@ -791,9 +788,8 @@ public class ComputerUtilCard {
public static String getMostProminentType(final CardCollectionView list, final Collection<String> valid) {
return getMostProminentType(list, valid, true);
}
public static String getMostProminentType(final CardCollectionView list, final Collection<String> valid, boolean includeTokens) {
if (list.size() == 0) {
if (list.isEmpty()) {
return "";
}
@@ -834,51 +830,35 @@ public class ComputerUtilCard {
//also take into account abilities that generate tokens
if (includeTokens) {
for (SpellAbility sa : c.getAllSpellAbilities()) {
if (sa.getApi() != ApiType.Token) {
continue;
}
if (sa.hasParam("TokenTypes")) {
for (String var : sa.getParam("TokenTypes").split(",")) {
if (!CardType.isACreatureType(var)) {
continue;
}
Integer count = typesInDeck.getOrDefault(var, 0);
typesInDeck.put(var, count + weight);
}
}
}
// same for Trigger that does make Tokens
for (Trigger t : c.getTriggers()) {
SpellAbility sa = t.ensureAbility();
if (sa != null) {
if (sa.getApi() != ApiType.Token || !sa.hasParam("TokenTypes")) {
if (c.getRules() != null) {
for (String token : c.getRules().getTokens()) {
CardRules tokenCR = StaticData.instance().getAllTokens().getToken(token).getRules();
if (tokenCR == null)
continue;
}
for (String var : sa.getParam("TokenTypes").split(",")) {
if (!CardType.isACreatureType(var)) {
continue;
}
Integer count = typesInDeck.getOrDefault(var, 0);
typesInDeck.put(var, count + weight);
for (String type : tokenCR.getType().getCreatureTypes()) {
Integer count = typesInDeck.getOrDefault(type, 0);
typesInDeck.put(type, count + 1);
}
}
}
// special rule for Fabricate and Servo
if (c.hasKeyword(Keyword.FABRICATE)) {
Integer count = typesInDeck.getOrDefault("Servo", 0);
typesInDeck.put("Servo", count + weight);
}
}
} // for
}
int max = 0;
String maxType = "";
// Iterate through typesInDeck and consider only valid types
for (final Entry<String, Integer> entry : typesInDeck.entrySet()) {
final String type = entry.getKey();
if (max < entry.getValue()) {
// consider the types that are in the valid list
if ((valid.isEmpty() || valid.contains(type)) && max < entry.getValue()) {
max = entry.getValue();
maxType = type;
}
@@ -1007,7 +987,7 @@ public class ComputerUtilCard {
} else if (logic.equals("MostProminentHumanCreatures")) {
CardCollectionView list = opp.getCreaturesInPlay();
if (list.isEmpty()) {
list = CardLists.filter(CardLists.filterControlledBy(game.getCardsInGame(), opp), CardPredicates.Presets.CREATURES);
list = CardLists.filter(CardLists.filterControlledBy(game.getCardsInGame(), opp), CardPredicates.CREATURES);
}
chosen.add(getMostProminentColor(list, colorChoices));
} else if (logic.equals("MostProminentComputerControls")) {
@@ -1062,7 +1042,7 @@ public class ComputerUtilCard {
String devotionCode = "Count$Devotion." + MagicColor.toLongString(c);
int devotion = AbilityUtils.calculateAmount(sa.getHostCard(), devotionCode, sa);
if (devotion > curDevotion && Iterables.any(hand, CardPredicates.isColor(c))) {
if (devotion > curDevotion && hand.anyMatch(CardPredicates.isColor(c))) {
curDevotion = devotion;
chosenColor = MagicColor.toLongString(c);
}
@@ -1234,8 +1214,7 @@ public class ComputerUtilCard {
// if this thing is both owned and controlled by an opponent and it has a continuous ability,
// assume it either benefits the player or disrupts the opponent
for (final StaticAbility stAb : c.getStaticAbilities()) {
final Map<String, String> params = stAb.getMapParams();
if (params.get("Mode").equals("Continuous") && stAb.isIntrinsic()) {
if (stAb.checkMode(StaticAbilityMode.Continuous) && stAb.isIntrinsic()) {
priority = true;
break;
}
@@ -1266,17 +1245,16 @@ public class ComputerUtilCard {
}
} else {
for (final StaticAbility stAb : c.getStaticAbilities()) {
final Map<String, String> params = stAb.getMapParams();
//continuous buffs
if (params.get("Mode").equals("Continuous") && "Creature.YouCtrl".equals(params.get("Affected"))) {
if (stAb.checkMode(StaticAbilityMode.Continuous) && "Creature.YouCtrl".equals(stAb.getParam("Affected"))) {
int bonusPT = 0;
if (params.containsKey("AddPower")) {
bonusPT += AbilityUtils.calculateAmount(c, params.get("AddPower"), stAb);
if (stAb.hasParam("AddPower")) {
bonusPT += AbilityUtils.calculateAmount(c, stAb.getParam("AddPower"), stAb);
}
if (params.containsKey("AddToughness")) {
bonusPT += AbilityUtils.calculateAmount(c, params.get("AddPower"), stAb);
if (stAb.hasParam("AddToughness")) {
bonusPT += AbilityUtils.calculateAmount(c, stAb.getParam("AddPower"), stAb);
}
String kws = params.get("AddKeyword");
String kws = stAb.getParam("AddKeyword");
if (kws != null) {
bonusPT += 4 * (1 + StringUtils.countMatches(kws, "&")); //treat each added keyword as a +2/+2 for now
}
@@ -1427,7 +1405,7 @@ public class ComputerUtilCard {
//1. become attacker for whatever reason
if (!doesCreatureAttackAI(ai, c) && doesSpecifiedCreatureAttackAI(ai, pumped)) {
float threat = 1.0f * ComputerUtilCombat.damageIfUnblocked(pumped, opp, combat, true) / opp.getLife();
if (!Iterables.any(oppCreatures, CardPredicates.possibleBlockers(pumped))) {
if (oppCreatures.stream().noneMatch(CardPredicates.possibleBlockers(pumped))) {
threat *= 2;
}
if (c.getNetPower() == 0 && c == sa.getHostCard() && power > 0) {
@@ -1479,8 +1457,8 @@ public class ComputerUtilCard {
}
//3. grant evasive
if (Iterables.any(oppCreatures, CardPredicates.possibleBlockers(c))) {
if (!Iterables.any(oppCreatures, CardPredicates.possibleBlockers(pumped))
if (oppCreatures.stream().anyMatch(CardPredicates.possibleBlockers(c))) {
if (oppCreatures.stream().noneMatch(CardPredicates.possibleBlockers(pumped))
&& doesSpecifiedCreatureAttackAI(ai, pumped)) {
chance += 0.5f * ComputerUtilCombat.damageIfUnblocked(pumped, opp, combat, true) / opp.getLife();
}
@@ -1759,7 +1737,7 @@ public class ComputerUtilCard {
pumped.addPTBoost(power + berserkPower, toughness, timestamp, 0);
if (!kws.isEmpty()) {
pumped.addChangedCardKeywords(kws, null, false, timestamp, 0, false);
pumped.addChangedCardKeywords(kws, null, false, timestamp, null, false);
}
if (!hiddenKws.isEmpty()) {
pumped.addHiddenExtrinsicKeywords(timestamp, 0, hiddenKws);
@@ -1780,7 +1758,7 @@ public class ComputerUtilCard {
}
}
final long timestamp2 = c.getGame().getNextTimestamp(); //is this necessary or can the timestamp be re-used?
pumped.addChangedCardKeywordsInternal(toCopy, null, false, timestamp2, 0, false);
pumped.addChangedCardKeywordsInternal(toCopy, null, false, timestamp2, null, false);
pumped.updateKeywordsCache(pumped.getCurrentState());
applyStaticContPT(ai.getGame(), pumped, new CardCollection(c));
return pumped;
@@ -1807,7 +1785,7 @@ public class ComputerUtilCard {
// remove old boost that might be copied
for (final StaticAbility stAb : c.getStaticAbilities()) {
vCard.removePTBoost(c.getLayerTimestamp(), stAb.getId());
if (!stAb.checkMode("Continuous")) {
if (!stAb.checkMode(StaticAbilityMode.Continuous)) {
continue;
}
if (!stAb.hasParam("Affected")) {
@@ -1885,7 +1863,7 @@ public class ComputerUtilCard {
if (!c.isCreature()) {
return false;
}
if (c.hasKeyword("CARDNAME can't attack or block.") || (c.hasKeyword("CARDNAME doesn't untap during your untap step.") && c.isTapped()) || (c.getOwner() == ai && ai.getOpponents().contains(c.getController()))) {
if (c.hasKeyword("CARDNAME can't attack or block.") || (c.isTapped() && !c.canUntap(ai, true)) || (c.getOwner() == ai && ai.getOpponents().contains(c.getController()))) {
return true;
}
return false;
@@ -1949,7 +1927,7 @@ public class ComputerUtilCard {
CardCollection aiCreats = ai.getCreaturesInPlay();
if (temporary) {
// Pump effects that add "CARDNAME can't attack" and similar things. Only do it if something is untapped.
oppCards = CardLists.filter(oppCards, CardPredicates.Presets.UNTAPPED);
oppCards = CardLists.filter(oppCards, CardPredicates.UNTAPPED);
}
CardCollection priorityCards = new CardCollection();
@@ -2102,6 +2080,7 @@ public class ComputerUtilCard {
return false;
}
// use this function to skip expensive calculations on identical cards
public static CardCollection dedupeCards(CardCollection cc) {
if (cc.size() <= 1) {
return cc;
@@ -2109,7 +2088,7 @@ public class ComputerUtilCard {
CardCollection deduped = new CardCollection();
for (Card c : cc) {
boolean unique = true;
if (c.isInZone(ZoneType.Hand)) {
if (c.isInZone(ZoneType.Hand) && !c.hasPerpetual()) {
for (Card d : deduped) {
if (d.isInZone(ZoneType.Hand) && d.getOwner().equals(c.getOwner()) && d.getName().equals(c.getName())) {
unique = false;

View File

@@ -31,7 +31,7 @@ import forge.game.combat.Combat;
import forge.game.combat.CombatUtil;
import forge.game.cost.CostPayment;
import forge.game.keyword.Keyword;
import forge.game.phase.Untap;
import forge.game.phase.PhaseType;
import forge.game.player.Player;
import forge.game.replacement.ReplacementEffect;
import forge.game.replacement.ReplacementLayer;
@@ -39,10 +39,12 @@ import forge.game.replacement.ReplacementType;
import forge.game.spellability.SpellAbility;
import forge.game.staticability.StaticAbility;
import forge.game.staticability.StaticAbilityAssignCombatDamageAsUnblocked;
import forge.game.staticability.StaticAbilityMode;
import forge.game.staticability.StaticAbilityMustAttack;
import forge.game.trigger.Trigger;
import forge.game.trigger.TriggerType;
import forge.game.zone.ZoneType;
import forge.util.IterableUtil;
import forge.util.MyRandom;
import forge.util.TextUtil;
import forge.util.collect.FCollection;
@@ -78,7 +80,7 @@ public class ComputerUtilCombat {
*/
public static boolean canAttackNextTurn(final Card attacker) {
final Iterable<GameEntity> defenders = CombatUtil.getAllPossibleDefenders(attacker.getController());
return Iterables.any(defenders, input -> canAttackNextTurn(attacker, input));
return IterableUtil.any(defenders, input -> canAttackNextTurn(attacker, input));
}
/**
@@ -100,7 +102,7 @@ public class ComputerUtilCombat {
return false;
}
if (attacker.getGame().getReplacementHandler().wouldPhaseBeSkipped(attacker.getController(), "BeginCombat")) {
if (attacker.getGame().getReplacementHandler().wouldPhaseBeSkipped(attacker.getController(), PhaseType.COMBAT_BEGIN)) {
return false;
}
@@ -117,7 +119,7 @@ public class ComputerUtilCombat {
// || (attacker.hasKeyword(Keyword.FADING) && attacker.getCounters(CounterEnumType.FADE) == 0)
// || attacker.hasSVar("EndOfTurnLeavePlay"));
// The creature won't untap next turn
return !attacker.isTapped() || (attacker.getCounters(CounterEnumType.STUN) == 0 && Untap.canUntap(attacker));
return !attacker.isTapped() || (attacker.getCounters(CounterEnumType.STUN) == 0 && attacker.canUntap(attacker.getController(), true));
}
/**
@@ -175,7 +177,7 @@ public class ComputerUtilCombat {
public static int damageIfUnblocked(final Card attacker, final GameEntity attacked, final Combat combat, boolean withoutAbilities) {
int damage = attacker.getNetCombatDamage();
int sum = 0;
if (attacked instanceof Player && !((Player) attacked).canLoseLife()) {
if (attacked instanceof Player player && !player.canLoseLife()) {
return 0;
}
@@ -213,10 +215,10 @@ public class ComputerUtilCombat {
int damage = attacker.getNetCombatDamage();
int poison = 0;
damage += predictPowerBonusOfAttacker(attacker, null, null, false);
if (attacker.hasKeyword(Keyword.INFECT)) {
if (attacker.isInfectDamage(attacked)) {
int pd = predictDamageTo(attacked, damage, attacker, true);
// opponent can always order it so that he gets 0
if (pd == 1 && Iterables.any(attacker.getController().getOpponents().getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals("Vorinclex, Monstrous Raider"))) {
if (pd == 1 && attacker.getController().getOpponents().getCardsIn(ZoneType.Battlefield).anyMatch(CardPredicates.nameEquals("Vorinclex, Monstrous Raider"))) {
pd = 0;
}
poison += pd;
@@ -356,7 +358,7 @@ public class ComputerUtilCombat {
} else if (attacker.hasKeyword(Keyword.TRAMPLE)) {
int trampleDamage = getAttack(attacker) - totalShieldDamage(attacker, blockers);
if (trampleDamage > 0) {
if (attacker.hasKeyword(Keyword.INFECT)) {
if (attacker.isInfectDamage(ai)) {
poison += trampleDamage;
}
poison += predictExtraPoisonWithDamage(attacker, ai, trampleDamage);
@@ -404,11 +406,11 @@ public class ComputerUtilCombat {
CardCollectionView otb = ai.getCardsIn(ZoneType.Battlefield);
// Special cases:
// AI can't lose in combat in presence of Worship (with creatures)
if (Iterables.any(otb, CardPredicates.nameEquals("Worship")) && !ai.getCreaturesInPlay().isEmpty()) {
if (otb.anyMatch(CardPredicates.nameEquals("Worship")) && !ai.getCreaturesInPlay().isEmpty()) {
return false;
}
// AI can't lose in combat in presence of Elderscale Wurm (at 7 life or more)
if (Iterables.any(otb, CardPredicates.nameEquals("Elderscale Wurm")) && ai.getLife() >= 7) {
if (otb.anyMatch(CardPredicates.nameEquals("Elderscale Wurm")) && ai.getLife() >= 7) {
return false;
}
@@ -456,11 +458,11 @@ public class ComputerUtilCombat {
maxTreshold--;
}
if (!ai.cantLoseForZeroOrLessLife() && lifeThatWouldRemain(ai, combat) - payment < Math.min(threshold, ai.getLife())) {
if (resultingPoison(ai, combat) > Math.max(7, ai.getPoisonCounters())) {
return true;
}
return resultingPoison(ai, combat) > Math.max(7, ai.getPoisonCounters());
return !ai.cantLoseForZeroOrLessLife() && lifeThatWouldRemain(ai, combat) - payment < Math.min(threshold, ai.getLife());
}
/**
@@ -499,11 +501,11 @@ public class ComputerUtilCombat {
}
}
if (!ai.cantLoseForZeroOrLessLife() && lifeThatWouldRemain(ai, combat) - payment < 1) {
if (resultingPoison(ai, combat) >= ai.getGame().getRules().getPoisonCountersToLose()) {
return true;
}
return resultingPoison(ai, combat) >= ai.getGame().getRules().getPoisonCountersToLose();
return !ai.cantLoseForZeroOrLessLife() && lifeThatWouldRemain(ai, combat) - payment < 1;
}
// This calculates the amount of damage a blockgang can deal to the attacker
@@ -724,7 +726,6 @@ public class ComputerUtilCombat {
return totalDamageOfBlockers(attacker, blockers) >= getDamageToKill(attacker, false);
}
// Will this trigger trigger?
/**
* <p>
* combatTriggerWillTrigger.
@@ -900,7 +901,7 @@ public class ComputerUtilCombat {
final CardCollectionView cardList = CardCollection.combine(game.getCardsIn(ZoneType.Battlefield), game.getCardsIn(ZoneType.Command));
for (final Card card : cardList) {
for (final StaticAbility stAb : card.getStaticAbilities()) {
if (!stAb.checkMode("Continuous")) {
if (!stAb.checkMode(StaticAbilityMode.Continuous)) {
continue;
}
if (!stAb.hasParam("Affected") || !stAb.getParam("Affected").contains("blocking")) {
@@ -1196,7 +1197,7 @@ public class ComputerUtilCombat {
final CardCollectionView cardList = CardCollection.combine(game.getCardsIn(ZoneType.Battlefield), game.getCardsIn(ZoneType.Command));
for (final Card card : cardList) {
for (final StaticAbility stAb : card.getStaticAbilities()) {
if (!stAb.checkMode("Continuous")) {
if (!stAb.checkMode(StaticAbilityMode.Continuous)) {
continue;
}
if (!stAb.hasParam("Affected") || !stAb.getParam("Affected").contains("attacking")) {
@@ -1244,7 +1245,7 @@ public class ComputerUtilCombat {
continue;
}
sa.setActivatingPlayer(source.getController(), true);
sa.setActivatingPlayer(source.getController());
if (sa.hasParam("Cost")) {
if (!CostPayment.canPayAdditionalCosts(sa.getPayCosts(), sa, true)) {
@@ -1387,7 +1388,7 @@ public class ComputerUtilCombat {
final CardCollectionView cardList = game.getCardsIn(ZoneType.Battlefield);
for (final Card card : cardList) {
for (final StaticAbility stAb : card.getStaticAbilities()) {
if (!"Continuous".equals(stAb.getParam("Mode"))) {
if (!stAb.checkMode(StaticAbilityMode.Continuous)) {
continue;
}
if (!stAb.hasParam("Affected")) {
@@ -1428,12 +1429,13 @@ public class ComputerUtilCombat {
if (sa == null) {
continue;
}
sa.setActivatingPlayer(source.getController(), true);
if (sa.usesTargeting()) {
continue; // targeted pumping not supported
}
sa.setActivatingPlayer(source.getController());
// DealDamage triggers
if (ApiType.DealDamage.equals(sa.getApi())) {
if (!sa.hasParam("Defined") || !sa.getParam("Defined").startsWith("TriggeredAttacker")) {
@@ -1733,6 +1735,7 @@ public class ComputerUtilCombat {
final int attackerLife = getDamageToKill(attacker, false)
+ predictToughnessBonusOfAttacker(attacker, blocker, combat, withoutAbilities, withoutAttackerStaticAbilities);
// AI should be less worried about Deathtouch
if (blocker.hasDoubleStrike()) {
if (defenderDamage > 0 && (hasKeyword(blocker, "Deathtouch", withoutAbilities, combat) || attacker.hasSVar("DestroyWhenDamaged"))) {
return true;
@@ -1962,6 +1965,7 @@ public class ComputerUtilCombat {
final int attackerLife = getDamageToKill(attacker, false)
+ predictToughnessBonusOfAttacker(attacker, blocker, combat, withoutAbilities, withoutAttackerStaticAbilities);
// AI should be less worried about deathtouch
if (attacker.hasDoubleStrike()) {
if (attackerDamage >= defenderLife) {
return true;
@@ -2538,20 +2542,20 @@ public class ComputerUtilCombat {
if (combat != null) {
GameEntity def = combat.getDefenderByAttacker(sa.getHostCard());
// 1. If the card that spawned the attacker was sent at a card, attack the same. Consider improving.
if (def instanceof Card && Iterables.contains(defenders, def)) {
if (((Card)def).isPlaneswalker()) {
if (def instanceof Card card && Iterables.contains(defenders, def)) {
if (card.isPlaneswalker()) {
return def;
}
if (((Card)def).isBattle()) {
if (card.isBattle()) {
return def;
}
}
// 2. Otherwise, go through the list of options one by one, choose the first one that can't be blocked profitably.
for (GameEntity p : defenders) {
if (p instanceof Player && !ComputerUtilCard.canBeBlockedProfitably((Player)p, attacker, true)) {
if (p instanceof Player p1 && !ComputerUtilCard.canBeBlockedProfitably(p1, attacker, true)) {
return p;
}
if (p instanceof Card && !ComputerUtilCard.canBeBlockedProfitably(((Card)p).getController(), attacker, true)) {
if (p instanceof Card card && !ComputerUtilCard.canBeBlockedProfitably(card.getController(), attacker, true)) {
return p;
}
}

View File

@@ -1,20 +1,22 @@
package forge.ai;
import com.google.common.base.Predicates;
import com.google.common.collect.Iterables;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.function.Predicate;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import forge.ai.AiCardMemory.MemorySet;
import forge.ai.ability.AnimateAi;
import forge.ai.ability.TokenAi;
import forge.card.ColorSet;
import forge.game.Game;
import forge.game.ability.AbilityUtils;
import forge.game.ability.ApiType;
import forge.game.card.*;
import forge.game.card.CardPredicates.Presets;
import forge.game.combat.Combat;
import forge.game.combat.CombatUtil;
import forge.game.cost.*;
import forge.game.keyword.Keyword;
import forge.game.phase.PhaseType;
@@ -23,14 +25,9 @@ import forge.game.spellability.Spell;
import forge.game.spellability.SpellAbility;
import forge.game.spellability.TargetChoices;
import forge.game.zone.ZoneType;
import forge.util.IterableUtil;
import forge.util.MyRandom;
import forge.util.TextUtil;
import forge.util.collect.FCollectionView;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.List;
import java.util.Set;
public class ComputerUtilCost {
@@ -53,8 +50,7 @@ public class ComputerUtilCost {
return true;
}
for (final CostPart part : cost.getCostParts()) {
if (part instanceof CostPutCounter) {
final CostPutCounter addCounter = (CostPutCounter) part;
if (part instanceof CostPutCounter addCounter) {
final CounterType type = addCounter.getCounter();
if (type.is(CounterEnumType.M1M1)) {
@@ -80,9 +76,7 @@ public class ComputerUtilCost {
}
final AiCostDecision decision = new AiCostDecision(sa.getActivatingPlayer(), sa, false);
for (final CostPart part : cost.getCostParts()) {
if (part instanceof CostRemoveCounter) {
final CostRemoveCounter remCounter = (CostRemoveCounter) part;
if (part instanceof CostRemoveCounter remCounter) {
final CounterType type = remCounter.counter;
if (!part.payCostFromSource()) {
if (type.is(CounterEnumType.P1P1)) {
@@ -109,9 +103,7 @@ public class ComputerUtilCost {
&& !source.hasKeyword(Keyword.UNDYING)) {
return false;
}
} else if (part instanceof CostRemoveAnyCounter) {
final CostRemoveAnyCounter remCounter = (CostRemoveAnyCounter) part;
} else if (part instanceof CostRemoveAnyCounter remCounter) {
PaymentDecision pay = decision.visit(remCounter);
return pay != null;
}
@@ -136,25 +128,29 @@ public class ComputerUtilCost {
CardCollection hand = new CardCollection(ai.getCardsIn(ZoneType.Hand));
for (final CostPart part : cost.getCostParts()) {
if (part instanceof CostDiscard) {
final CostDiscard disc = (CostDiscard) part;
if (part instanceof CostDiscard disc) {
final String type = disc.getType();
if (type.equals("CARDNAME")) {
if (source.getAbilityText().contains("Bloodrush")) {
continue;
} else if (ai.getGame().getPhaseHandler().is(PhaseType.END_OF_TURN, ai)
&& !ai.isUnlimitedHandSize() && ai.getCardsIn(ZoneType.Hand).size() > ai.getMaxHandSize()) {
// Better do something than just discard stuff
return true;
final CardCollection typeList;
int num;
if (type.equals("Hand")) {
typeList = hand;
num = hand.size();
} else {
if (type.equals("CARDNAME")) {
if (source.getAbilityText().contains("Bloodrush")) {
continue;
} else if (ai.getGame().getPhaseHandler().is(PhaseType.END_OF_TURN, ai)
&& !ai.isUnlimitedHandSize() && ai.getCardsIn(ZoneType.Hand).size() > ai.getMaxHandSize()) {
// Better do something than just discard stuff
return true;
}
}
typeList = CardLists.getValidCards(hand, type, source.getController(), source, sa);
if (typeList.size() > ai.getMaxHandSize()) {
continue;
}
num = AbilityUtils.calculateAmount(source, disc.getAmount(), sa);
}
final CardCollection typeList = CardLists.getValidCards(hand, type, source.getController(), source, sa);
if (typeList.size() > ai.getMaxHandSize()) {
continue;
}
int num = AbilityUtils.calculateAmount(source, disc.getAmount(), sa);
for (int i = 0; i < num; i++) {
Card pref = ComputerUtil.getCardPreference(ai, source, "DiscardCost", typeList);
if (pref == null) {
@@ -184,8 +180,7 @@ public class ComputerUtilCost {
return true;
}
for (final CostPart part : cost.getCostParts()) {
if (part instanceof CostDamage) {
final CostDamage pay = (CostDamage) part;
if (part instanceof CostDamage pay) {
int realDamage = ComputerUtilCombat.predictDamageTo(ai, pay.getAbilityAmount(sa), source, false);
if (ai.getLife() - realDamage < remainingLife
&& realDamage > 0 && !ai.cantLoseForZeroOrLessLife()
@@ -217,13 +212,8 @@ public class ComputerUtilCost {
return true;
}
for (final CostPart part : cost.getCostParts()) {
if (part instanceof CostPayLife) {
final CostPayLife payLife = (CostPayLife) part;
Integer amount = payLife.convertAmount();
if (amount == null) {
amount = AbilityUtils.calculateAmount(source, payLife.getAmount(), sourceAbility);
}
if (part instanceof CostPayLife payLife) {
int amount = payLife.getAbilityAmount(sourceAbility);
// check if there's override for the remainingLife threshold
if (sourceAbility != null && sourceAbility.hasParam("AILifeThreshold")) {
@@ -296,8 +286,7 @@ public class ComputerUtilCost {
return true;
}
for (final CostPart part : cost.getCostParts()) {
if (part instanceof CostSacrifice) {
final CostSacrifice sac = (CostSacrifice) part;
if (part instanceof CostSacrifice sac) {
final int amount = AbilityUtils.calculateAmount(source, sac.getAmount(), sourceAbility);
if (sac.payCostFromSource() && source.isCreature()) {
@@ -346,12 +335,11 @@ public class ComputerUtilCost {
return true;
}
for (final CostPart part : cost.getCostParts()) {
if (part instanceof CostSacrifice) {
if (part instanceof CostSacrifice sac) {
if (suppressRecursiveSacCostCheck) {
return false;
}
final CostSacrifice sac = (CostSacrifice) part;
final int amount = AbilityUtils.calculateAmount(source, sac.getAmount(), sourceAbility);
String type = sac.getType();
@@ -450,7 +438,7 @@ public class ComputerUtilCost {
* the source
* @return true, if successful
*/
public static boolean checkTapTypeCost(final Player ai, final Cost cost, final Card source, final SpellAbility sa, final CardCollection alreadyTapped) {
public static boolean checkTapTypeCost(final Player ai, final Cost cost, final Card source, final SpellAbility sa, final Collection<Card> alreadyTapped) {
if (cost == null) {
return true;
}
@@ -487,8 +475,8 @@ public class ComputerUtilCost {
c = AbilityUtils.calculateAmount(source, part.getAmount(), sa);
}
CardCollection exclude = new CardCollection();
if (AiCardMemory.getMemorySet(ai, MemorySet.PAYS_TAP_COST) != null) {
exclude.addAll(AiCardMemory.getMemorySet(ai, MemorySet.PAYS_TAP_COST));
if (alreadyTapped != null) {
exclude.addAll(alreadyTapped);
}
// trying to produce mana that includes tapping source that will already be tapped
if (exclude.contains(source) && cost.hasTapCost()) {
@@ -500,12 +488,12 @@ public class ComputerUtilCost {
}
CardCollection tapChoices = ComputerUtil.chooseTapType(ai, type, source, cost.hasTapCost(), c, exclude, sa);
if (tapChoices != null) {
for (Card choice : tapChoices) {
AiCardMemory.rememberCard(ai, choice, MemorySet.PAYS_TAP_COST);
}
// if manasource gets tapped to produce it also can't help paying another
if (cost.hasTapCost()) {
AiCardMemory.rememberCard(ai, source, MemorySet.PAYS_TAP_COST);
if (alreadyTapped != null) {
alreadyTapped.addAll(tapChoices);
// if manasource gets tapped to produce it also can't help paying another
if (cost.hasTapCost()) {
alreadyTapped.add(source);
}
}
return true;
}
@@ -527,58 +515,91 @@ public class ComputerUtilCost {
* @return a boolean.
*/
public static boolean canPayCost(final SpellAbility sa, final Player player, final boolean effect) {
return canPayCost(sa.getPayCosts(), sa, player, effect);
}
public static boolean canPayCost(final Cost cost, final SpellAbility sa, final Player player, final boolean effect) {
if (sa.getActivatingPlayer() == null) {
sa.setActivatingPlayer(player, true); // complaints on NPE had came before this line was added.
sa.setActivatingPlayer(player); // complaints on NPE had came before this line was added.
}
boolean cannotBeCountered = false;
// Check for stuff like Nether Void
int extraManaNeeded = 0;
if (sa instanceof Spell) {
cannotBeCountered = !sa.isCounterableBy(null);
for (Card c : player.getGame().getCardsIn(ZoneType.Battlefield)) {
final String snem = c.getSVar("AI_SpellsNeedExtraMana");
if (!StringUtils.isBlank(snem)) {
if (cannotBeCountered && c.getName().equals("Nether Void")) {
if (!effect) {
if (sa instanceof Spell) {
cannotBeCountered = !sa.isCounterableBy(null);
for (Card c : player.getGame().getCardsIn(ZoneType.Battlefield)) {
final String snem = c.getSVar("AI_SpellsNeedExtraMana");
if (!StringUtils.isBlank(snem)) {
if (cannotBeCountered && c.getName().equals("Nether Void")) {
continue;
}
String[] parts = TextUtil.split(snem, ' ');
boolean meetsRestriction = parts.length == 1 || player.isValid(parts[1], c.getController(), c, sa);
if(!meetsRestriction)
continue;
if (StringUtils.isNumeric(parts[0])) {
extraManaNeeded += Integer.parseInt(parts[0]);
} else {
System.out.println("wrong SpellsNeedExtraMana SVar format on " + c);
}
}
}
for (Card c : player.getCardsIn(ZoneType.Command)) {
if (cannotBeCountered) {
continue;
}
String[] parts = TextUtil.split(snem, ' ');
boolean meetsRestriction = parts.length == 1 || player.isValid(parts[1], c.getController(), c, sa);
if(!meetsRestriction)
continue;
if (StringUtils.isNumeric(parts[0])) {
extraManaNeeded += Integer.parseInt(parts[0]);
} else {
System.out.println("wrong SpellsNeedExtraMana SVar format on " + c);
final String snem = c.getSVar("SpellsNeedExtraManaEffect");
if (!StringUtils.isBlank(snem)) {
if (StringUtils.isNumeric(snem)) {
extraManaNeeded += Integer.parseInt(snem);
} else {
System.out.println("wrong SpellsNeedExtraManaEffect SVar format on " + c);
}
}
}
}
for (Card c : player.getCardsIn(ZoneType.Command)) {
if (cannotBeCountered) {
continue;
}
final String snem = c.getSVar("SpellsNeedExtraManaEffect");
if (!StringUtils.isBlank(snem)) {
if (StringUtils.isNumeric(snem)) {
extraManaNeeded += Integer.parseInt(snem);
} else {
System.out.println("wrong SpellsNeedExtraManaEffect SVar format on " + c);
// Try not to lose Planeswalker if not threatened
if (sa.isPwAbility()) {
for (final CostPart part : cost.getCostParts()) {
if (part instanceof CostRemoveCounter) {
if (part.convertAmount() != null && part.convertAmount() == sa.getHostCard().getCurrentLoyalty()) {
// refuse to pay if opponent has no creature threats or
// 50% chance otherwise
if (player.getOpponents().getCreaturesInPlay().isEmpty()
|| MyRandom.getRandom().nextFloat() < .5f) {
return false;
}
}
}
}
}
}
// Try not to lose Planeswalker if not threatened
if (sa.isPwAbility()) {
for (final CostPart part : sa.getPayCosts().getCostParts()) {
if (part instanceof CostRemoveCounter) {
if (part.convertAmount() != null && part.convertAmount() == sa.getHostCard().getCurrentLoyalty()) {
// refuse to pay if opponent has no creature threats or
// 50% chance otherwise
if (player.getOpponents().getCreaturesInPlay().isEmpty()
|| MyRandom.getRandom().nextFloat() < .5f) {
// Ward - will be accounted for when rechecking a targeted ability
if (!sa.isTrigger() && (!sa.isSpell() || !cannotBeCountered)) {
for (TargetChoices tc : sa.getAllTargetChoices()) {
for (Card tgt : tc.getTargetCards()) {
if (tgt.hasKeyword(Keyword.WARD) && tgt.isInPlay() && tgt.getController().isOpponentOf(sa.getHostCard().getController())) {
Cost wardCost = ComputerUtilCard.getTotalWardCost(tgt);
if (wardCost.hasManaCost()) {
extraManaNeeded += wardCost.getTotalMana().getCMC();
}
}
}
}
}
// Bail early on Casualty in case there are no cards that would make sense to pay with
if (sa.getHostCard().hasKeyword(Keyword.CASUALTY)) {
for (final CostPart part : cost.getCostParts()) {
if (part instanceof CostSacrifice) {
CardCollection valid = CardLists.getValidCards(player.getCardsIn(ZoneType.Battlefield), part.getType().split(";"),
sa.getActivatingPlayer(), sa.getHostCard(), sa);
valid = CardLists.filter(valid, CardPredicates.hasSVar("AIDontSacToCasualty").negate());
if (valid.isEmpty()) {
return false;
}
}
@@ -586,254 +607,15 @@ public class ComputerUtilCost {
}
}
// Ward - will be accounted for when rechecking a targeted ability
if (!sa.isTrigger() && (!sa.isSpell() || !cannotBeCountered)) {
for (TargetChoices tc : sa.getAllTargetChoices()) {
for (Card tgt : tc.getTargetCards()) {
if (tgt.hasKeyword(Keyword.WARD) && tgt.isInPlay() && tgt.getController().isOpponentOf(sa.getHostCard().getController())) {
Cost wardCost = ComputerUtilCard.getTotalWardCost(tgt);
if (wardCost.hasManaCost()) {
extraManaNeeded += wardCost.getTotalMana().getCMC();
}
}
}
}
}
// TODO: Alternate costs which involve both paying mana and tapping a card, e.g. Zahid, Djinn of the Lamp
// Current AI decides on each part separately, thus making it possible for the AI to cheat by
// tapping a mana source for mana and for the tap cost at the same time. Until this is improved, AI
// will not consider mana sources valid for paying the tap cost to avoid this exact situation.
if ("DontPayTapCostWithManaSources".equals(sa.getHostCard().getSVar("AIPaymentPreference"))) {
for (final CostPart part : sa.getPayCosts().getCostParts()) {
if (part instanceof CostTapType) {
CardCollectionView nonManaSources =
CardLists.getValidCards(player.getCardsIn(ZoneType.Battlefield), part.getType().split(";"),
sa.getActivatingPlayer(), sa.getHostCard(), sa);
nonManaSources = CardLists.filter(nonManaSources, card -> {
boolean hasManaSa = false;
for (final SpellAbility sa1 : card.getSpellAbilities()) {
if (sa1.isManaAbility() && sa1.getPayCosts().hasTapCost()) {
hasManaSa = true;
break;
}
}
return !hasManaSa;
});
if (nonManaSources.size() < part.convertAmount()) {
return false;
}
}
}
}
// Bail early on Casualty in case there are no cards that would make sense to pay with
if (sa.getHostCard().hasKeyword(Keyword.CASUALTY)) {
for (final CostPart part : sa.getPayCosts().getCostParts()) {
if (part instanceof CostSacrifice) {
CardCollection valid = CardLists.getValidCards(player.getCardsIn(ZoneType.Battlefield), part.getType().split(";"),
sa.getActivatingPlayer(), sa.getHostCard(), sa);
valid = CardLists.filter(valid, Predicates.not(CardPredicates.hasSVar("AIDontSacToCasualty")));
if (valid.isEmpty()) {
return false;
}
}
}
}
return ComputerUtilMana.canPayManaCost(sa, player, extraManaNeeded, effect)
&& CostPayment.canPayAdditionalCosts(sa.getPayCosts(), sa, effect);
}
public static boolean willPayUnlessCost(SpellAbility sa, Player payer, Cost cost, boolean alreadyPaid, FCollectionView<Player> payers) {
final Card source = sa.getHostCard();
final String aiLogic = sa.getParam("UnlessAI");
boolean payForOwnOnly = "OnlyOwn".equals(aiLogic);
boolean payOwner = sa.hasParam("UnlessAI") && aiLogic.startsWith("Defined");
boolean payNever = "Never".equals(aiLogic);
boolean isMine = sa.getActivatingPlayer().equals(payer);
if (payNever) { return false; }
if (payForOwnOnly && !isMine) { return false; }
if (payOwner) {
final String defined = aiLogic.substring(7);
final Player player = AbilityUtils.getDefinedPlayers(source, defined, sa).get(0);
if (!payer.equals(player)) {
return false;
}
} else if ("OnlyDontControl".equals(aiLogic)) {
if (source == null || payer.equals(source.getController())) {
return false;
}
} else if ("Paralyze".equals(aiLogic)) {
final Card c = source.getEnchantingCard();
if (c == null || c.isUntapped()) {
return false;
}
} else if ("RiskFactor".equals(aiLogic)) {
final Player activator = sa.getActivatingPlayer();
if (!activator.canDraw()) {
return false;
}
} else if ("MorePowerful".equals(aiLogic)) {
final int sourceCreatures = sa.getActivatingPlayer().getCreaturesInPlay().size();
final int payerCreatures = payer.getCreaturesInPlay().size();
if (payerCreatures > sourceCreatures + 1) {
return false;
}
} else if (aiLogic != null && aiLogic.startsWith("LifeLE")) {
// if payer can't lose life its no need to pay unless
if (!payer.canLoseLife())
return false;
else if (payer.getLife() <= AbilityUtils.calculateAmount(source, aiLogic.substring(6), sa)) {
return true;
}
} else if ("WillAttack".equals(aiLogic)) {
AiAttackController aiAtk = new AiAttackController(payer);
Combat combat = new Combat(payer);
aiAtk.declareAttackers(combat);
if (combat.getAttackers().isEmpty()) {
return false;
}
} else if ("nonToken".equals(aiLogic) && !AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa).isEmpty()
&& AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa).get(0).isToken()) {
return false;
} else if ("LowPriority".equals(aiLogic) && MyRandom.getRandom().nextInt(100) < 67) {
return false;
} else if (aiLogic != null && aiLogic.startsWith("Fabricate")) {
final int n = Integer.parseInt(aiLogic.substring("Fabricate".length()));
// if host would leave the play or if host is useless, create tokens
if (source.hasSVar("EndOfTurnLeavePlay") || ComputerUtilCard.isUselessCreature(payer, source)) {
return false;
}
// need a copy for one with extra +1/+1 counter boost,
// without causing triggers to run
final Card copy = CardCopyService.getLKICopy(source);
copy.setCounters(CounterEnumType.P1P1, copy.getCounters(CounterEnumType.P1P1) + n);
copy.setZone(source.getZone());
// if host would put into the battlefield attacking
Combat combat = source.getGame().getCombat();
if (combat != null && combat.isAttacking(source)) {
final Player defender = combat.getDefenderPlayerByAttacker(source);
if (defender.canLoseLife() && !ComputerUtilCard.canBeBlockedProfitably(defender, copy, true)) {
return true;
}
return false;
}
// if the host has haste and can attack
if (CombatUtil.canAttack(copy)) {
for (final Player opp : payer.getOpponents()) {
if (CombatUtil.canAttack(copy, opp) &&
opp.canLoseLife() &&
!ComputerUtilCard.canBeBlockedProfitably(opp, copy, true))
return true;
}
}
// TODO check for trigger to turn token ETB into +1/+1 counter for host
// TODO check for trigger to turn token ETB into damage or life loss for opponent
// in this cases Token might be prefered even if they would not survive
final Card tokenCard = TokenAi.spawnToken(payer, sa);
// Token would not survive
if (!tokenCard.isCreature() || tokenCard.getNetToughness() < 1) {
return true;
}
// Special Card logic, this one try to median its power with the number of artifacts
if ("Marionette Master".equals(source.getName())) {
CardCollection list = CardLists.filter(payer.getCardsIn(ZoneType.Battlefield), Presets.ARTIFACTS);
return list.size() >= copy.getNetPower();
} else if ("Cultivator of Blades".equals(source.getName())) {
// Cultivator does try to median with number of Creatures
CardCollection list = payer.getCreaturesInPlay();
return list.size() >= copy.getNetPower();
}
// evaluate Creature with +1/+1
int evalCounter = ComputerUtilCard.evaluateCreature(copy);
final CardCollection tokenList = new CardCollection(source);
for (int i = 0; i < n; ++i) {
tokenList.add(TokenAi.spawnToken(payer, sa));
}
// evaluate Host with Tokens
int evalToken = ComputerUtilCard.evaluateCreatureList(tokenList);
return evalToken < evalCounter;
} else if ("Riot".equals(aiLogic)) {
return !SpecialAiLogic.preferHasteForRiot(sa, payer);
}
// Check for shocklands and similar ETB replacement effects
if (sa.hasParam("ETB") && sa.getApi().equals(ApiType.Tap)) {
for (final CostPart part : cost.getCostParts()) {
if (part instanceof CostPayLife) {
final CostPayLife lifeCost = (CostPayLife) part;
Integer amount = lifeCost.convertAmount();
if (payer.getLife() > (amount + 1) && payer.canPayLife(amount, true, sa)) {
final int landsize = payer.getLandsInPlay().size() + 1;
for (Card c : payer.getCardsIn(ZoneType.Hand)) {
// Check if the AI has enough lands to play the card
if (landsize != c.getCMC()) {
continue;
}
// Check if the AI intends to play the card and if it can pay for it with the mana it has
boolean willPlay = ComputerUtil.hasReasonToPlayCardThisTurn(payer, c);
boolean canPay = c.getManaCost().canBePaidWithAvailable(ColorSet.fromNames(getAvailableManaColors(payer, source)).getColor());
if (canPay && willPlay) {
return true;
}
}
}
return false;
}
}
}
// AI will only pay when it's not already payed and only opponents abilities
if (alreadyPaid || (payers.size() > 1 && (isMine && !payForOwnOnly))) {
return false;
}
// ward or human misplay
if (ApiType.Counter.equals(sa.getApi())) {
List<SpellAbility> spells = AbilityUtils.getDefinedSpellAbilities(source, sa.getParamOrDefault("Defined", "Targeted"), sa);
for (SpellAbility toBeCountered : spells) {
if (!toBeCountered.isCounterableBy(sa)) {
return false;
}
// no reason to pay if we don't plan to confirm
if (toBeCountered.isOptionalTrigger() && !SpellApiToAi.Converter.get(toBeCountered.getApi()).doTriggerNoCostWithSubs(payer, toBeCountered, false)) {
return false;
}
// TODO check hasFizzled
}
}
// AI was crashing because the blank ability used to pay costs
// Didn't have any of the data on the original SA to pay dependant costs
return checkLifeCost(payer, cost, source, 4, sa)
&& checkDamageCost(payer, cost, source, 4, sa)
&& (isMine || checkSacrificeCost(payer, cost, source, sa))
&& (isMine || checkDiscardCost(payer, cost, source, sa))
&& (!source.getName().equals("Tyrannize") || payer.getCardsIn(ZoneType.Hand).size() > 2)
&& (!source.getName().equals("Perplex") || payer.getCardsIn(ZoneType.Hand).size() < 2)
&& (!source.getName().equals("Breaking Point") || payer.getCreaturesInPlay().size() > 1)
&& (!source.getName().equals("Chain of Vapor") || (payer.getWeakestOpponent().getCreaturesInPlay().size() > 0 && payer.getLandsInPlay().size() > 3));
return ComputerUtilMana.canPayManaCost(cost, sa, player, extraManaNeeded, effect)
&& CostPayment.canPayAdditionalCosts(cost, sa, effect, player);
}
public static Set<String> getAvailableManaColors(Player ai, Card additionalLand) {
return getAvailableManaColors(ai, Lists.newArrayList(additionalLand));
}
public static Set<String> getAvailableManaColors(Player ai, List<Card> additionalLands) {
CardCollection cardsToConsider = CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), Presets.UNTAPPED);
CardCollection cardsToConsider = CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.UNTAPPED);
Set<String> colorsAvailable = Sets.newHashSet();
if (additionalLands != null) {
@@ -923,8 +705,8 @@ public class ComputerUtilCost {
public static CardCollection paymentChoicesWithoutTargets(Iterable<Card> choices, SpellAbility source, Player ai) {
if (source.usesTargeting()) {
final CardCollection targets = new CardCollection(source.getTargets().getTargetCards());
choices = Iterables.filter(choices, Predicates.not(Predicates.and(CardPredicates.isController(ai), Predicates.in(targets))));
final CardCollectionView targets = source.getTargets().getTargetCards();
choices = IterableUtil.filter(choices, Predicate.not(CardPredicates.isController(ai).and(targets::contains)));
}
return new CardCollection(choices);
}

View File

@@ -1,7 +1,10 @@
package forge.ai;
import com.google.common.base.Predicates;
import com.google.common.collect.*;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import forge.ai.AiCardMemory.MemorySet;
import forge.ai.ability.AnimateAi;
import forge.card.ColorSet;
@@ -43,6 +46,7 @@ import forge.util.TextUtil;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
import java.util.stream.Collectors;
public class ComputerUtilMana {
private final static boolean DEBUG_MANA_PAYMENT = false;
@@ -52,25 +56,28 @@ public class ComputerUtilMana {
return payManaCost(cost, sa, ai, true, true, effect);
}
public static boolean canPayManaCost(final SpellAbility sa, final Player ai, final int extraMana, final boolean effect) {
return payManaCost(sa, ai, true, extraMana, true, effect);
return canPayManaCost(sa.getPayCosts(), sa, ai, extraMana, effect);
}
public static boolean canPayManaCost(final Cost cost, final SpellAbility sa, final Player ai, final int extraMana, final boolean effect) {
return payManaCost(cost, sa, ai, true, extraMana, true, effect);
}
public static boolean payManaCost(ManaCostBeingPaid cost, final SpellAbility sa, final Player ai, final boolean effect) {
return payManaCost(cost, sa, ai, false, true, effect);
}
public static boolean payManaCost(final Player ai, final SpellAbility sa, final boolean effect) {
return payManaCost(sa, ai, false, 0, true, effect);
public static boolean payManaCost(final Cost cost, final Player ai, final SpellAbility sa, final boolean effect) {
return payManaCost(cost, sa, ai, false, 0, true, effect);
}
private static boolean payManaCost(final SpellAbility sa, final Player ai, final boolean test, final int extraMana, boolean checkPlayable, final boolean effect) {
ManaCostBeingPaid cost = calculateManaCost(sa, test, extraMana);
return payManaCost(cost, sa, ai, test, checkPlayable, effect);
private static boolean payManaCost(final Cost cost, final SpellAbility sa, final Player ai, final boolean test, final int extraMana, boolean checkPlayable, final boolean effect) {
ManaCostBeingPaid manaCost = calculateManaCost(cost, sa, test, extraMana, effect);
return payManaCost(manaCost, sa, ai, test, checkPlayable, effect);
}
/**
* Return the number of colors used for payment for Converge
*/
public static int getConvergeCount(final SpellAbility sa, final Player ai) {
ManaCostBeingPaid cost = calculateManaCost(sa, true, 0);
ManaCostBeingPaid cost = calculateManaCost(sa.getPayCosts(), sa, true, 0, false);
if (payManaCost(cost, sa, ai, true, true, false)) {
return cost.getSunburst();
}
@@ -81,15 +88,15 @@ public class ComputerUtilMana {
public static boolean hasEnoughManaSourcesToCast(final SpellAbility sa, final Player ai) {
if (ai == null || sa == null)
return false;
sa.setActivatingPlayer(ai, true);
return payManaCost(sa, ai, true, 0, false, false);
sa.setActivatingPlayer(ai);
return payManaCost(sa.getPayCosts(), sa, ai, true, 0, false, false);
}
private static Integer scoreManaProducingCard(final Card card) {
int score = 0;
for (SpellAbility ability : card.getSpellAbilities()) {
ability.setActivatingPlayer(card.getController(), true);
ability.setActivatingPlayer(card.getController());
if (ability.isManaAbility()) {
score += ability.calculateScoreForManaAbility();
// TODO check TriggersWhenSpent
@@ -151,7 +158,7 @@ public class ComputerUtilMana {
}
// Mana abilities on the same card
String shardMana = shard.toString().replaceAll("\\{", "").replaceAll("\\}", "");
String shardMana = shard.toShortString();
boolean payWithAb1 = ability1.getManaPart().mana(ability1).contains(shardMana);
boolean payWithAb2 = ability2.getManaPart().mana(ability2).contains(shardMana);
@@ -260,7 +267,10 @@ public class ComputerUtilMana {
saList = filteredList;
break;
case "NotSameCard":
saList = Lists.newArrayList(Iterables.filter(filteredList, saPay -> !saPay.getHostCard().getName().equals(sa.getHostCard().getName())));
String hostName = sa.getHostCard().getName();
saList = filteredList.stream()
.filter(saPay -> !saPay.getHostCard().getName().equals(hostName))
.collect(Collectors.toList());
break;
default:
break;
@@ -268,6 +278,7 @@ public class ComputerUtilMana {
}
for (final SpellAbility ma : saList) {
// this rarely seems like a good idea
if (ma.getHostCard() == saHost) {
continue;
}
@@ -276,7 +287,7 @@ public class ComputerUtilMana {
continue;
}
if (!ComputerUtilCost.checkTapTypeCost(ai, ma.getPayCosts(), ma.getHostCard(), sa, new CardCollection())) {
if (!ComputerUtilCost.checkTapTypeCost(ai, ma.getPayCosts(), ma.getHostCard(), sa, AiCardMemory.getMemorySet(ai, MemorySet.PAYS_TAP_COST))) {
continue;
}
@@ -309,7 +320,7 @@ public class ComputerUtilMana {
// For cards like Genju of the Cedars, make sure we're not attaching to the same land that will
// be tapped to pay its own cost if there's another untapped land like that available
if (ma.getHostCard().equals(sa.getTargetCard())) {
if (CardLists.count(ai.getCardsIn(ZoneType.Battlefield), Predicates.and(CardPredicates.nameEquals(ma.getHostCard().getName()), CardPredicates.Presets.UNTAPPED)) > 1) {
if (CardLists.count(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals(ma.getHostCard().getName()).and(CardPredicates.UNTAPPED)) > 1) {
continue;
}
}
@@ -466,18 +477,18 @@ public class ComputerUtilMana {
public static String predictManafromSpellAbility(SpellAbility saPayment, Player ai, ManaCostShard toPay) {
Card hostCard = saPayment.getHostCard();
String manaProduced = predictManaReplacement(saPayment, ai, toPay);
String originalProduced = manaProduced;
StringBuilder manaProduced = new StringBuilder(predictManaReplacement(saPayment, ai, toPay));
String originalProduced = manaProduced.toString();
if (originalProduced.isEmpty()) {
return manaProduced;
return manaProduced.toString();
}
// Run triggers like Nissa
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromCard(hostCard);
runParams.put(AbilityKey.Activator, ai); // assuming AI would only ever gives itself mana
runParams.put(AbilityKey.AbilityMana, saPayment);
runParams.put(AbilityKey.Produced, manaProduced);
runParams.put(AbilityKey.Produced, manaProduced.toString());
for (Trigger tr : ai.getGame().getTriggerHandler().getActiveTrigger(TriggerType.TapsForMana, runParams)) {
SpellAbility trSA = tr.ensureAbility();
if (trSA == null) {
@@ -489,7 +500,7 @@ public class ComputerUtilMana {
if (produced.equals("Chosen")) {
produced = MagicColor.toShortString(trSA.getHostCard().getChosenColor());
}
manaProduced += " " + StringUtils.repeat(produced, " ", pAmount);
manaProduced.append(" ").append(StringUtils.repeat(produced, " ", pAmount));
} else if (ApiType.ManaReflected.equals(trSA.getApi())) {
final String colorOrType = trSA.getParamOrDefault("ColorOrType", "Color");
// currently Color or Type, Type is colors + colorless
@@ -498,11 +509,11 @@ public class ComputerUtilMana {
if (reflectProperty.equals("Produced") && !originalProduced.isEmpty()) {
// check if a colorless shard can be paid from the trigger
if (toPay.equals(ManaCostShard.COLORLESS) && colorOrType.equals("Type") && originalProduced.contains("C")) {
manaProduced += " " + "C";
manaProduced.append(" " + "C");
} else if (originalProduced.length() == 1) {
// if length is only one, and it either is equal C == Type
if (colorOrType.equals("Type") || !originalProduced.equals("C")) {
manaProduced += " " + originalProduced;
manaProduced.append(" ").append(originalProduced);
}
} else {
// should it look for other shards too?
@@ -510,7 +521,7 @@ public class ComputerUtilMana {
for (String s : originalProduced.split(" ")) {
if (colorOrType.equals("Type") || !s.equals("C") && toPay.canBePaidWithManaOfColor(MagicColor.fromName(s))) {
found = true;
manaProduced += " " + s;
manaProduced.append(" ").append(s);
break;
}
}
@@ -518,7 +529,7 @@ public class ComputerUtilMana {
if (!found) {
for (String s : originalProduced.split(" ")) {
if (colorOrType.equals("Type") || !s.equals("C")) {
manaProduced += " " + s;
manaProduced.append(" ").append(s);
break;
}
}
@@ -527,7 +538,7 @@ public class ComputerUtilMana {
}
}
}
return manaProduced;
return manaProduced.toString();
}
public static CardCollection getManaSourcesToPayCost(final ManaCostBeingPaid cost, final SpellAbility sa, final Player ai) {
@@ -608,7 +619,7 @@ public class ComputerUtilMana {
payMultipleMana(cost, manaProduced, ai);
// remove from available lists
Iterables.removeIf(sourcesForShards.values(), CardTraitPredicates.isHostCard(saPayment.getHostCard()));
sourcesForShards.values().removeIf(CardTraitPredicates.isHostCard(saPayment.getHostCard()));
}
CostPayment.handleOfferings(sa, true, cost.isPaid());
@@ -631,24 +642,28 @@ public class ComputerUtilMana {
List<SpellAbility> paymentList = Lists.newArrayList();
final ManaPool manapool = ai.getManaPool();
// Apply the color/type conversion matrix if necessary
manapool.restoreColorReplacements();
CardPlayOption mayPlay = sa.getMayPlayOption();
if (!effect) {
if (sa.isSpell() && mayPlay != null) {
mayPlay.applyManaConvert(manapool);
} else if (sa.isActivatedAbility() && sa.getGrantorStatic() != null && sa.getGrantorStatic().hasParam("ManaConversion")) {
AbilityUtils.applyManaColorConversion(manapool, sa.getGrantorStatic().getParam("ManaConversion"));
// Apply color/type conversion matrix if necessary (already done via autopay)
if (ai.getControllingPlayer() == null) {
manapool.restoreColorReplacements();
CardPlayOption mayPlay = sa.getMayPlayOption();
if (!effect) {
if (sa.isSpell() && mayPlay != null) {
mayPlay.applyManaConvert(manapool);
} else if (sa.isActivatedAbility() && sa.getGrantorStatic() != null && sa.getGrantorStatic().hasParam("ManaConversion")) {
AbilityUtils.applyManaColorConversion(manapool, sa.getGrantorStatic().getParam("ManaConversion"));
}
}
if (sa.hasParam("ManaConversion")) {
AbilityUtils.applyManaColorConversion(manapool, sa.getParam("ManaConversion"));
}
StaticAbilityManaConvert.manaConvert(manapool, ai, sa.getHostCard(), effect && !sa.isCastFromPlayEffect() ? null : sa);
}
if (sa.hasParam("ManaConversion")) {
AbilityUtils.applyManaColorConversion(manapool, sa.getParam("ManaConversion"));
}
StaticAbilityManaConvert.manaConvert(manapool, ai, sa.getHostCard(), effect && !sa.isCastFromPlayEffect() ? null : sa);
// not worth checking if it makes sense to not spend floating first
if (manapool.payManaCostFromPool(cost, sa, test, manaSpentToPay)) {
CostPayment.handleOfferings(sa, test, cost.isPaid());
return true; // paid all from floating mana
// paid all from floating mana
return true;
}
boolean purePhyrexian = cost.containsOnlyPhyrexianMana();
@@ -747,7 +762,7 @@ public class ComputerUtilMana {
break; // unwise to pay
} else if (sa.getParam("AIPhyrexianPayment").startsWith("OnFatalDamage.")) {
int dmg = Integer.parseInt(sa.getParam("AIPhyrexianPayment").substring(14));
if (!Iterables.any(ai.getOpponents(), PlayerPredicates.lifeLessOrEqualTo(dmg))) {
if (ai.getOpponents().stream().noneMatch(PlayerPredicates.lifeLessOrEqualTo(dmg))) {
break; // no one to finish with the gut shot
}
}
@@ -790,7 +805,7 @@ public class ComputerUtilMana {
payMultipleMana(cost, manaProduced, ai);
// remove from available lists
Iterables.removeIf(sourcesForShards.values(), CardTraitPredicates.isHostCard(saPayment.getHostCard()));
sourcesForShards.values().removeIf(CardTraitPredicates.isHostCard(saPayment.getHostCard()));
} else {
final CostPayment pay = new CostPayment(saPayment.getPayCosts(), saPayment);
if (!pay.payComputerCosts(new AiCostDecision(ai, saPayment, effect))) {
@@ -807,7 +822,7 @@ public class ComputerUtilMana {
if (hasConverge) {
// hack to prevent converge re-using sources
Iterables.removeIf(sourcesForShards.values(), CardTraitPredicates.isHostCard(saPayment.getHostCard()));
sourcesForShards.values().removeIf(CardTraitPredicates.isHostCard(saPayment.getHostCard()));
}
}
}
@@ -826,7 +841,8 @@ public class ComputerUtilMana {
if (test) {
resetPayment(paymentList);
} else {
System.out.println("ComputerUtilMana: payManaCost() cost was not paid for " + sa.toString() + " (" + sa.getHostCard().getName() + "). Didn't find what to pay for " + toPay);
System.out.println("ComputerUtilMana: payManaCost() cost was not paid for " + sa + " (" + sa.getHostCard().getName() + "). Didn't find what to pay for " + toPay);
sa.setSkip(true);
}
return false;
}
@@ -941,7 +957,7 @@ public class ComputerUtilMana {
if (checkCosts) {
// Check if AI can still play this mana ability
ma.setActivatingPlayer(ai, true);
ma.setActivatingPlayer(ai);
// if the AI can't pay the additional costs skip the mana ability
if (!CostPayment.canPayAdditionalCosts(ma.getPayCosts(), ma, false)) {
return false;
@@ -1260,7 +1276,7 @@ public class ComputerUtilMana {
* @param extraMana extraMana
* @return ManaCost
*/
public static ManaCostBeingPaid calculateManaCost(final SpellAbility sa, final boolean test, final int extraMana) {
public static ManaCostBeingPaid calculateManaCost(final Cost cost, final SpellAbility sa, final boolean test, final int extraMana, final boolean effect) {
Card card = sa.getHostCard();
Zone castFromBackup = null;
if (test && sa.isSpell() && !card.isInZone(ZoneType.Stack)) {
@@ -1268,16 +1284,22 @@ public class ComputerUtilMana {
card.setCastFrom(card.getZone() != null ? card.getZone() : null);
}
Cost payCosts = CostAdjustment.adjust(sa.getPayCosts(), sa);
Cost payCosts;
if (test) {
payCosts = CostAdjustment.adjust(cost, sa, effect);
} else {
// when not testing CostPayment already handled raise
payCosts = cost;
}
CostPartMana manapart = payCosts != null ? payCosts.getCostMana() : null;
final ManaCost mana = payCosts != null ? ( manapart == null ? ManaCost.ZERO : manapart.getManaCostFor(sa) ) : ManaCost.NO_COST;
ManaCostBeingPaid cost = new ManaCostBeingPaid(mana);
ManaCostBeingPaid manaCost = new ManaCostBeingPaid(mana);
// Tack xMana Payments into mana here if X is a set value
if (cost.getXcounter() > 0 || extraMana > 0) {
if (manaCost.getXcounter() > 0 || extraMana > 0) {
int manaToAdd = 0;
int xCounter = cost.getXcounter();
int xCounter = manaCost.getXcounter();
if (test && extraMana > 0) {
final int multiplicator = Math.max(xCounter, 1);
manaToAdd = extraMana * multiplicator;
@@ -1298,9 +1320,9 @@ public class ComputerUtilMana {
xColor = "WUBRGX";
}
if (xCounter > 0) {
cost.setXManaCostPaid(manaToAdd / xCounter, xColor);
manaCost.setXManaCostPaid(manaToAdd / xCounter, xColor);
} else {
cost.increaseShard(ManaCostShard.parseNonGeneric(xColor), manaToAdd);
manaCost.increaseShard(ManaCostShard.parseNonGeneric(xColor), manaToAdd);
}
if (!test) {
@@ -1308,15 +1330,8 @@ public class ComputerUtilMana {
}
}
CostAdjustment.adjust(cost, sa, null, test);
int timesMultikicked = card.getKickerMagnitude();
if (timesMultikicked > 0 && sa.isAnnouncing("Multikicker")) {
ManaCost mkCost = sa.getMultiKickerManaCost();
for (int i = 0; i < timesMultikicked; i++) {
cost.addManaCost(mkCost);
}
sa.setSVar("Multikicker", String.valueOf(timesMultikicked));
if (!effect) {
CostAdjustment.adjust(manaCost, sa, null, test);
}
if ("NumTimes".equals(sa.getParam("Announce"))) { // e.g. the Adversary cycle
@@ -1336,7 +1351,7 @@ public class ComputerUtilMana {
sa.getHostCard().setCastFrom(castFromBackup);
}
return cost;
return manaCost;
}
// This method can be used to estimate the total amount of mana available to the player,
@@ -1357,7 +1372,7 @@ public class ComputerUtilMana {
maxProduced = 0;
for (SpellAbility ma : src.getManaAbilities()) {
ma.setActivatingPlayer(p, true);
ma.setActivatingPlayer(p);
if (!checkPlayable || ma.canPlay()) {
int costsToActivate = ma.getPayCosts().getCostMana() != null ? ma.getPayCosts().getCostMana().convertAmount() : 0;
int producedMana = ma.getParamOrDefault("Produced", "").split(" ").length;
@@ -1394,7 +1409,7 @@ public class ComputerUtilMana {
final CardCollectionView list = CardCollection.combine(ai.getCardsIn(ZoneType.Battlefield), ai.getCardsIn(ZoneType.Hand));
final List<Card> manaSources = CardLists.filter(list, c -> {
for (final SpellAbility am : getAIPlayableMana(c)) {
am.setActivatingPlayer(ai, true);
am.setActivatingPlayer(ai);
if (!checkPlayable || (am.canPlay() && am.checkRestrictions(ai))) {
return true;
}
@@ -1470,7 +1485,7 @@ public class ComputerUtilMana {
if (cost != null) {
// if the AI can't pay the additional costs skip the mana ability
m.setActivatingPlayer(ai, true);
m.setActivatingPlayer(ai);
if (!CostPayment.canPayAdditionalCosts(m.getPayCosts(), m, false)) {
continue;
}
@@ -1488,7 +1503,7 @@ public class ComputerUtilMana {
AbilitySub sub = m.getSubAbility();
// We really shouldn't be hardcoding names here. ChkDrawback should just return true for them
if (sub != null && !card.getName().equals("Pristine Talisman") && !card.getName().equals("Zhur-Taa Druid")) {
if (!SpellApiToAi.Converter.get(sub.getApi()).chkDrawbackWithSubs(ai, sub)) {
if (!SpellApiToAi.Converter.get(sub).chkDrawbackWithSubs(ai, sub)) {
continue;
}
needsLimitedResources = true; // TODO: check for good drawbacks (gainLife)
@@ -1554,7 +1569,7 @@ public class ComputerUtilMana {
if (DEBUG_MANA_PAYMENT) {
System.out.println("DEBUG_MANA_PAYMENT: groupSourcesByManaColor m = " + m);
}
m.setActivatingPlayer(ai, true);
m.setActivatingPlayer(ai);
if (checkPlayable && !m.canPlay()) {
continue;
}
@@ -1568,7 +1583,7 @@ public class ComputerUtilMana {
// don't use abilities with dangerous drawbacks
AbilitySub sub = m.getSubAbility();
if (sub != null) {
if (!SpellApiToAi.Converter.get(sub.getApi()).chkDrawbackWithSubs(ai, sub)) {
if (!SpellApiToAi.Converter.get(sub).chkDrawbackWithSubs(ai, sub)) {
continue;
}
}

View File

@@ -1,7 +1,5 @@
package forge.ai;
import com.google.common.base.Function;
import forge.game.GameEntity;
import forge.game.ability.AbilityUtils;
import forge.game.ability.ApiType;
@@ -13,8 +11,11 @@ import forge.game.spellability.SpellAbility;
import forge.game.staticability.StaticAbilityAssignCombatDamageAsUnblocked;
import forge.game.staticability.StaticAbilityCantAttackBlock;
import forge.game.staticability.StaticAbilityMustAttack;
import forge.game.trigger.Trigger;
import forge.game.trigger.TriggerType;
import java.util.List;
import java.util.function.Function;
public class CreatureEvaluator implements Function<Card, Integer> {
@Override
@@ -26,6 +27,9 @@ public class CreatureEvaluator implements Function<Card, Integer> {
return evaluateCreature(c, true, true);
}
public int evaluateCreature(final Card c, final boolean considerPT, final boolean considerCMC) {
//Card shouldn't be null and AI shouldn't crash since this is just score
if (c == null)
return 0;
int value = 80;
if (!c.isToken()) {
value += addValue(20, "non-token"); // tokens should be worth less than actual cards
@@ -156,12 +160,6 @@ public class CreatureEvaluator implements Function<Card, Integer> {
value += addValue(20, "protection");
}
for (final SpellAbility sa : c.getSpellAbilities()) {
if (sa.isAbility()) {
value += addValue(evaluateSpellAbility(sa), "sa: " + sa);
}
}
// paired creatures are more valuable because they grant a bonus to the other creature
if (c.isPaired()) {
value += addValue(14, "paired");
@@ -209,11 +207,7 @@ public class CreatureEvaluator implements Function<Card, Integer> {
value += addValue(1, "untapped");
}
if (!c.getManaAbilities().isEmpty()) {
value += addValue(10, "manadork");
}
if (c.hasKeyword("CARDNAME doesn't untap during your untap step.")) {
if (!c.canUntap(c.getController(), true)) {
if (c.isTapped()) {
value = addValue(50 + (c.getCMC() * 5), "tapped-useless"); // reset everything - useless
} else {
@@ -222,29 +216,63 @@ public class CreatureEvaluator implements Function<Card, Integer> {
} else {
value -= subValue(10 * c.getCounters(CounterEnumType.STUN), "stunned");
}
if (c.hasSVar("EndOfTurnLeavePlay")) {
value -= subValue(50, "eot-leaves");
} else if (c.hasKeyword(Keyword.CUMULATIVE_UPKEEP)) {
value -= subValue(30, "cupkeep");
} else if (c.hasStartOfKeyword("UpkeepCost")) {
value -= subValue(20, "sac-unless");
} else if (c.hasKeyword(Keyword.ECHO) && c.cameUnderControlSinceLastUpkeep()) {
value -= subValue(10, "echo-unpaid");
for (final SpellAbility sa : c.getSpellAbilities()) {
if (sa.isAbility()) {
value += addValue(evaluateSpellAbility(sa), "sa: " + sa);
}
}
if (c.hasKeyword(Keyword.FADING)) {
value -= subValue(20 / (Math.max(1, c.getCounters(CounterEnumType.FADE))), "fading");
}
if (c.hasKeyword(Keyword.VANISHING)) {
value -= subValue(20 / (Math.max(1, c.getCounters(CounterEnumType.TIME))), "vanishing");
if (!c.getManaAbilities().isEmpty()) {
value += addValue(10, "manadork");
}
// use scaling because the creature is only available halfway
if (c.hasKeyword(Keyword.PHASING)) {
value -= subValue(Math.max(20, value / 2), "phasing");
}
// TODO no longer a KW
if (c.hasStartOfKeyword("At the beginning of your upkeep, CARDNAME deals")) {
value -= subValue(20, "upkeep-dmg");
if (c.hasSVar("EndOfTurnLeavePlay")) {
value -= subValue(50, "eot-leaves");
} else {
for (Trigger t : c.getTriggers()) {
if (!TriggerType.Phase.equals(t.getMode())) {
continue;
}
if (!"Upkeep".equals(t.getParam("Phase"))) {
continue;
}
if (t.isKeyword(Keyword.CUMULATIVE_UPKEEP)) {
value -= subValue(30, "cupkeep");
} else if (t.isKeyword(Keyword.ECHO) && c.cameUnderControlSinceLastUpkeep()) {
value -= subValue(10, "echo-unpaid");
}
if (t.isKeyword(Keyword.FADING)) {
value -= subValue(20 / (Math.max(1, c.isInPlay() ? c.getCounters(CounterEnumType.FADE) : c.getKeywordMagnitude(Keyword.FADING))), "fading");
}
if (t.isKeyword(Keyword.VANISHING)) {
value -= subValue(20 / (Math.max(1, c.isInPlay() ? c.getCounters(CounterEnumType.TIME) : c.getKeywordMagnitude(Keyword.VANISHING))), "vanishing");
}
SpellAbility ab = t.ensureAbility();
if (ab == null) {
continue;
}
if (ApiType.DealDamage.equals(ab.getApi())) {
if (!"You".equals(ab.getParamOrDefault("Defined", "You"))) {
continue;
}
if (c.getController().canLoseLife()) {
value -= subValue(20, "upkeep-dmg");
}
} else if (ApiType.Sacrifice.equals(ab.getApi())) {
if (!ab.hasParam("UnlessCost")) {
continue;
}
value -= subValue(20, "sac-unless");
}
}
}
// card-specific evaluation modifier
@@ -277,8 +305,9 @@ public class CreatureEvaluator implements Function<Card, Integer> {
}
}
}
} else if (ComputerUtilCost.isSacrificeSelfCost(sa.getPayCosts())) {
return -10; // can be sacrificed in response to ability or spell, thus, less prioritable
}
// default value
return 10;
}

Some files were not shown because too many files have changed in this diff Show More