Commit Graph

6452 Commits (master)

Author SHA1 Message Date
melvinzhang a3f0f81fd6 add effect 'gain control of <permanent> for as long as SN remains on the battlefield' 2017-07-01 13:54:04 +08:00
melvinzhang 2009ed03d3 add effect 'gain control of <permanent> for as long as you control SN and SN remains tapped' 2017-07-01 13:48:42 +08:00
melvinzhang 4ea378bcb1 add effect "tap <permanent>. It doesn't untap during its controller's untap step for as long as SN remains tapped." 2017-07-01 11:37:56 +08:00
melvinzhang 7772fa4193 add effect 'exile all cards from <players>'s graveyard' 2017-07-01 10:57:51 +08:00
ShawnieBoy 68ad7f52bc include `for each` in energy method 2017-06-30 12:15:49 +01:00
ShawnieBoy 04249377a5 include 'face down' in morph play mod - for parsing 2017-06-29 17:53:50 +01:00
ShawnieBoy f45116a824 add new planeswalker subtype Samut 2017-06-22 18:11:33 +01:00
lodici 707eacdead remove unused method parameter in MagicBasicLandChoice. 2017-06-19 13:04:23 +01:00
lodici 8ffa3676bb remove unused field in MagicPhase. 2017-06-19 12:52:51 +01:00
lodici 3edc87736b remove unused method parameter in MagicColorChoice. 2017-06-19 12:52:00 +01:00
lodici 4924508d84 remove unused field in DiscardCardAction. 2017-06-19 12:49:09 +01:00
lodici 933e646217 remove unused field in MurmurHash3. 2017-06-19 12:47:00 +01:00
lodici 7abce85df1 remove unused import in MagicMessage. 2017-06-19 12:46:07 +01:00
lodici 3e664f34c4 remove unused methods in MagicCardDefinition. 2017-06-19 12:45:08 +01:00
lodici 1ae240a92d consolidate duplicate log header code into setLogHeader(). 2017-06-19 10:00:21 +01:00
melvinzhang 60f7308bb3 handle missing cases for TopOfOwnersLibrary and BottomOfOwnersLibrary in RemoveCardAction 2017-06-18 08:36:12 +08:00
melvinzhang 41557a9b98 prefer short circuit boolean operators 2017-06-17 12:18:42 +08:00
melvinzhang abf695ac4a ensure files and read/written using UTF_8 instead of platform default charset 2017-06-17 12:06:28 +08:00
melvinzhang bbbdcac9ef add override annotation to overridden methods 2017-06-17 11:19:03 +08:00
melvinzhang 9551cb4748 handle case of Battlefield explicitly, throw error on other cases 2017-06-17 10:53:18 +08:00
melvinzhang ab8c9d1336 remove exception for MoveCardAction as toLocation may be set to battlefield 2017-06-17 10:43:04 +08:00
melvinzhang 3f446b5324 ensure switch statements handle all cases 2017-06-17 10:32:59 +08:00
melvinzhang d3de830740 add override annotation to overridden methods 2017-06-17 10:32:32 +08:00
melvinzhang de64a5ab2e add override annotation to overridden methods 2017-06-17 10:32:12 +08:00
melvinzhang f648223572 remove unused imports 2017-06-17 09:57:42 +08:00
melvinzhang 0928be03c0 support Eternalize <mana cost> ability, closes #1151 2017-06-17 09:47:24 +08:00
lodici 1dc38c1fb8 rename PlayerProfileSelected() to playerProfileSelected(). 2017-06-16 15:54:18 +01:00
lodici dda6a4bc40 rename PlayerProfileDeleted() to playerProfileDeleted(). 2017-06-16 15:53:32 +01:00
lodici 5f9869fd46 rename PlayerProfileUpdated() to playerProfileUpdated(). 2017-06-16 15:51:56 +01:00
lodici 2400cf9188 Position literals first in String comparisons to avoid potential NPEs. 2017-06-16 10:22:50 +01:00
lodici 3dd89ed678 remove "it" from declare attacker prompt. (see #1139). 2017-06-07 12:57:36 +01:00
ShawnieBoy a361f62918 add "four or more creature cards in graveyard" to conditions and type method in factory 2017-05-28 17:35:08 +01:00
melvinzhang 7173ba51a9 MagicAbility.AttacksEachTurnIfAble should override AI set MagicPermanentState.ExcludeFromCombat, fixes #1135 2017-05-28 16:58:24 +08:00
melvinzhang 73a661c4f2 restore changes to other zone, don't change tab when clearing cards 2017-05-21 11:33:49 +08:00
melvinzhang 8839c10410 fix cards list not cleared on undo, for #1129 2017-05-21 11:23:42 +08:00
lodici d480bdd51c Revert "fixes ##559 : restores "choice" zone when mouse enters the user prompt and does not select the Library icon."
This reverts commit 9fd38035a7.
2017-05-20 10:38:37 +01:00
melvinzhang 08b2ac948d fix Champion of Lambholt does not prevent blocking by rewording ability, closes #1121 2017-05-20 08:41:05 +08:00
melvinzhang b1a52406f6 fix genABGameStatic to use Game layer, for #1121 2017-05-19 09:29:38 +08:00
melvinzhang a155571769 remove unused case as Game layer is not used by Permanents 2017-05-19 09:28:48 +08:00
lodici 9fd38035a7 fixes ##559 : restores "choice" zone when mouse enters the user prompt and does not select the Library icon. 2017-05-16 16:45:03 +01:00
lodici 3588ba6b7e rename showCards() to showCardsToChoose() 2017-05-16 16:42:09 +01:00
melvinzhang f6ad5cbda8 Move image cache back to MagcImages while we figure out a better place for it
fix MessagePanel to use MagicImages

This reverts commit 4056d00ab7.
2017-05-15 19:56:58 +08:00
melvinzhang 9a608c0965 remove MessageViewerInfo and use MagicMesage directly
removed MagicPlayer from MagicMessage
2017-05-15 19:24:35 +08:00
lodici 4056d00ab7 move responsibility for caching PlayerAvatar from MagicImages to PlayerProfile. 2017-05-14 17:34:32 +01:00
lodici 44cfc716b5 rename MagicPlayer getPlayerDefinition(). 2017-05-14 16:31:20 +01:00
lodici efb2a4603d remove obsolete constant. 2017-05-14 11:43:42 +01:00
lodici b4397e1201 remove UI-related and poorly named visiblePlayer reference from MagicGame. 2017-05-14 08:58:43 +01:00
lodici 9e6a2b25d8 remove hard-coded MagicPlayer array elements from MagicGame. 2017-05-14 08:30:43 +01:00
lodici 57480bc1da adds "--deck" command line arg which can be used to set an AI player's deck. 2017-05-11 23:01:09 +01:00
lodici b36482471c Adds the deck name and type to the Library zone icon tooltip. 2017-05-09 18:42:26 +01:00
melvinzhang 541b4323c2 temp fix for #1116 by removing choice in rider and add check to detect future cases 2017-05-07 10:05:21 +08:00
melvinzhang c0f9cb81a3 fix "PN may PN draws" with "PN may draw" 2017-05-07 10:05:21 +08:00
lodici 75687153b5 Add method to return arbitrary number of random cards from MagicDeck. 2017-05-05 13:13:53 +01:00
lodici 9f700df5d5 add sorting comparator as static constant to MagicCardDefinition. 2017-05-05 13:13:53 +01:00
melvinzhang e13c0e4d1d move the alternative case into else block 2017-04-27 10:58:22 +08:00
ShawnieBoy a1a1c1d30a add condition for nonCreature spell cast 2017-04-25 16:20:33 +01:00
ShawnieBoy 2c3c6b8a5c add non-creature spell count 2017-04-25 16:20:00 +01:00
ShawnieBoy 0fe18b5c3d add additional pattern match for 'you control at least' 2017-04-25 15:29:38 +01:00
ShawnieBoy ecc549f73a allow "when" for OtherYouControlEntersEffect 2017-04-25 14:41:48 +01:00
ShawnieBoy 7206a26f3b add planeswalker methods to Target Filter 2017-04-25 14:08:48 +01:00
melvinzhang c20a7521cf add ability 'SN costs {n} less to cast if <condition>.' 2017-04-24 14:37:52 +08:00
melvinzhang 520d058ce6 add support for ability '<spell> you cast cost {n} less to cast' 2017-04-23 18:20:23 +08:00
ShawnieBoy b7e586a68c add Bricker counter to counterTypes 2017-04-23 04:06:25 +01:00
ShawnieBoy 670cc9cba1 add '<n> or fewer cards in hand' condition 2017-04-23 03:14:37 +01:00
ShawnieBoy d4920cc3d7 add Jackal creature subtype 2017-04-23 03:13:39 +01:00
melvinzhang 9de0b22a5f create a new card def for embalm tokens to set the mana cost, for #1091 2017-04-23 09:15:03 +08:00
ShawnieBoy 99fc488212 enable 'Whenever you cycle or discard a(nother) card' 2017-04-23 00:04:58 +01:00
ShawnieBoy 40c0ffe2b6 add 'basic land card or Desert card' to target filter 2017-04-22 23:51:18 +01:00
ShawnieBoy 21926c0ef2 add Embalm ability - still requires removal of token's casting cost 2017-04-22 23:49:51 +01:00
melvinzhang 5867b2661f replace generic 'you -> PN' with more specific replacement that accounts for grammar, for #1100 2017-04-15 10:39:53 +08:00
ShawnieBoy 7c65cec24e add Cartouche Enhantment subtype 2017-04-14 17:38:25 +01:00
melvinzhang 69b5622be1 fix 'PN win' and 'PN have', for #1100 2017-04-09 22:25:52 +08:00
melvinzhang 10b72f55c7 put target indicator after "'s", for #1100 2017-04-09 19:27:15 +08:00
melvinzhang 44f9f9b643 fix 'PN control' in event description 2017-04-09 17:25:10 +08:00
melvinzhang de93d8b07d fix 'PN do' and 'PN don't' in event description 2017-04-09 17:16:54 +08:00
melvinzhang 37f78dbba7 replace extra space after 'draw' 2017-04-09 17:07:38 +08:00
melvinzhang c0b9107f01 fix 'may reveals' in event description 2017-04-09 17:03:56 +08:00
melvinzhang 058c2f9c78 move rest of cards outside of processChosenCards as it is not called when no cards are selected, fixes #1094 2017-04-09 10:17:03 +08:00
melvinzhang 20037770c6 perform 'put' -> 'PN puts' only if prefix is not 'may ', fixes #1095 2017-04-09 10:02:19 +08:00
lodici 28b250978c use logical AND / OR operator instead of ternary. 2017-04-08 16:50:53 +01:00
lodici 1915195aeb Remove imports in same package. 2017-04-08 11:29:49 +01:00
lodici 4e96aabc66 remove unused local variables; organize imports. 2017-04-08 08:49:14 +01:00
lodici 25be3dfba9 remove unused local variables. 2017-04-08 08:48:56 +01:00
lodici 0326b42634 remove unused local variables; organize imports. 2017-04-08 08:48:03 +01:00
lodici 0c1a7d5ae8 remove unused import statements and sort. 2017-04-08 08:26:41 +01:00
lodici 0be849659e remove duplicate import. 2017-04-08 08:09:09 +01:00
melvinzhang c9ac82c1b6 compute more accurate permanent power by considering power decrease due to effect 2017-04-08 14:48:29 +08:00
lodici e414d31364 add refactor warning comment to MagicWeakenTargetPicker. 2017-04-07 20:58:45 +01:00
lodici 7bd1dc3112 Revert "remove unused constructor parameter in MagicWeakenTargetPicker."
This reverts commit dd8f67c5dd.
2017-04-07 20:52:44 +01:00
lodici 4b3cd4933a remove unused constructor. 2017-04-07 20:22:55 +01:00
lodici 81e360fe34 remove unused constructor parameter in MagicCombatCreature. 2017-04-07 20:22:53 +01:00
lodici 2a2c38795f remove unused constructor. 2017-04-07 20:22:53 +01:00
lodici dd8f67c5dd remove unused constructor parameter in MagicWeakenTargetPicker. 2017-04-07 20:22:52 +01:00
lodici ea3115b913 remove redundant modifiers from interface methods (pmd:UnusedModifier). 2017-04-07 20:22:52 +01:00
melvinzhang 8dabb983b9 fix flanking to trigger for each blocker, closes #1090 2017-03-31 10:13:55 +08:00
lodici f2291e61e6 DeckUtils.getDecksFolder() returns Path instead of String. 2017-03-12 20:01:07 +00:00
lodici cf9d8b2aff rename DeckUtils.getDeckFolder() to getDecksFolder(). 2017-03-12 19:35:59 +00:00
lodici edbaecb933 Ensure PlayerProfiles map is refreshed before use (fixes #1069). 2017-02-24 00:07:36 +00:00
lodici d221b5aeb9 Make UI text translatable in MagicFromCardListChoice. 2017-02-22 18:17:25 +00:00
lodici e569979047 remove dead code, redundant final modifier on private method; use diamond inference. 2017-02-22 18:12:21 +00:00
lodici fa83391b17 fix code formatting. 2017-02-22 18:10:49 +00:00
lodici 84570bda88 replace redundant displayMessage with call to getDescription(). 2017-02-22 18:10:20 +00:00
lodici 52edb2f0f2 Make UI text translatable in MagicFromCardFilterChoice. 2017-02-22 18:05:58 +00:00
lodici 1d5e298f72 remove dead code, redundant final modifier on private method; use diamond inference. 2017-02-22 18:00:44 +00:00
lodici 4201377a41 fix code formatting. 2017-02-22 17:58:42 +00:00
lodici 7b931ac02b replace redundant displayMessage with call to getDescription(). 2017-02-22 17:58:02 +00:00
lodici cd7352497d Make UI text translatable in MagicCardChoice. 2017-02-22 17:51:29 +00:00
lodici 5c46a64395 Make UI text translatable in MagicBasicLandChoice 2017-02-22 17:39:08 +00:00
lodici a15f6bb0d3 Make UI text translatable in MagicCoinFlipChoice & MagicOrChoice. 2017-02-22 17:34:59 +00:00
lodici 74dec310ba Make UI text translatable in MagicColorChoice (#1080). 2017-02-22 17:29:15 +00:00
lodici d3098bac0d remove dead method; redundant final modifier on private method; use diamond inference. 2017-02-22 16:56:24 +00:00
lodici fcda4002dd Make UI text translatable in MagicMayChoice (#1080). 2017-02-22 16:41:40 +00:00
lodici 40a8933228 Make UI text translatable in MagicDeclareBlockersChoice (#1080). 2017-02-22 15:52:55 +00:00
lodici f1f94c82e7 Make UI text translatable in MagicScryChoice (#1080). 2017-02-22 15:38:45 +00:00
lodici 37167f3b59 Make UI text translatable in MagicDeclareAttackersChoice (#1080). 2017-02-22 15:18:32 +00:00
lodici 8422e98f22 remove unused code; re-organize imports. 2017-02-22 14:48:04 +00:00
lodici 7499c377fd link PhaseStepViewer to MagicPhaseType (UN vs UT inconsistency); remove redundant text from MagicPhaseType. 2017-02-21 18:39:04 +00:00
ShawnieBoy d633155b93 add clarifying comment for final section of MagicCombatDamagePhase 2017-02-07 13:14:25 +00:00
ShawnieBoy d755c93aa9 correct attackerMessage length check in MagicCombatDamagePhase and
rename defender message.
2017-02-07 13:07:47 +00:00
ShawnieBoy dcd88a4c6b add Aura, Equipment or Vehicle spell to MagicTargetFilterFactory 2017-02-05 13:24:24 +00:00
lodici 966caa0f05 fix: need to click twice the first time on name column to trigger sort. 2017-02-04 14:08:13 +00:00
ShawnieBoy 22cd9a3e56 add permanentCardEqualCMC method to MagicTargetFilterFactory 2017-02-04 01:04:47 +00:00
lodici 3d97985934 core code for implementing H2 game stats database (see #1041 for more details). 2017-02-01 12:44:59 +00:00
melvinzhang 5d2543cf0b fix token cdef constructor to include abilities, fixes #1040 2017-01-31 21:47:24 +08:00
melvinzhang 6135babed0 undo snapshot should be taken after choice is made, fixes #1054 2017-01-31 14:00:32 +08:00
ShawnieBoy 4198a55b26 optimise imports 2017-01-30 20:31:44 +00:00
ShawnieBoy d837f87cfb replace instances of ChangePoisonAction with ChangeCountersAction 2017-01-30 20:31:18 +00:00
ShawnieBoy e1a6bf36e9 include Vehicles in getPowerToughnessText() 2017-01-29 14:36:49 +00:00
melvinzhang 67d987adcf improve logic of skip till EOT for checking whethre AI played something, for #1047 2017-01-29 09:05:40 +08:00
ShawnieBoy fb4e8fd1be use imports for MurmurHash3 2017-01-28 15:08:10 +00:00
ShawnieBoy 7cb0eb2fde add 'permanent card from your library' target filters 2017-01-27 16:25:42 +00:00
ShawnieBoy 430d27c55f add 'experience counters you have' to Amount Parser 2017-01-27 05:30:16 +00:00
ShawnieBoy 6e6d250c68 add CountersOnController to AmountFactory 2017-01-27 05:29:43 +00:00
ShawnieBoy ec60ae4f96 add Experience counter gain 2017-01-27 05:16:31 +00:00
ShawnieBoy 2f78ccd3df add log messages for attacker and defender for life and poison changes
#354 #1030
2017-01-27 05:12:30 +00:00
ShawnieBoy 44f2af8b0b correct hints and name for Energy RuleEventAction 2017-01-27 04:51:42 +00:00
ShawnieBoy 92bd99a0a0 enable "When SN enters the battlefield or dies, <effect>" in scripts 2017-01-27 02:24:46 +00:00
ShawnieBoy 7b3f528b04 add unity counter to MagicCounterType 2017-01-27 01:35:19 +00:00
ShawnieBoy d8636852ff correct acceptType and remove unecessary 'any' prefix for new permanentCardMaxCMC method 2017-01-26 14:47:56 +00:00
ShawnieBoy 51adfe7cd0 correct CMC value and include existing template with new method 2017-01-26 14:28:34 +00:00
ShawnieBoy a2e302f2ef add 'anyPermanentCardMaxCMC' to target filters matching others without type/subtype filter 2017-01-26 13:51:33 +00:00
ShawnieBoy df3e5a7e7f add Revolt Mechanic 2017-01-25 08:20:40 +00:00
lodici c6a34ac5d4 support '<card name>.full.jpg' pattern as a custom image file. 2017-01-21 15:49:29 +00:00
melvinzhang 239a962f12 put condition on the same condition 2017-01-15 09:54:31 +08:00
melvinzhang 552a5fdae2 use getTokenizedCardNames to generate card names when returning cards from exile, fixes #1033 2017-01-15 09:42:00 +08:00
ShawnieBoy 8e0a8cc2ad correct tense for MiracleTrigger log 2017-01-14 14:26:41 +00:00
melvinzhang be192056d6 store undo point during MagicMayChoice, for #1031 2017-01-14 11:29:57 +08:00
melvinzhang 0e81e1c672 do not show card due to Miracle unless it is revealed, for #325 2017-01-14 10:41:03 +08:00
ShawnieBoy b4a5f475fd add 'creature with power 4 or less' to MagicTargetFilterFactory 2017-01-14 02:32:39 +00:00
ShawnieBoy d9159ed005 correct target filter for 'creature card in a graveyard' 2017-01-14 01:16:40 +00:00
melvinzhang 05ec193e25 remove unused filter and choice 2017-01-14 09:01:54 +08:00
melvinzhang 64377f3a70 generalize regex for gaining energy to omit player 2017-01-14 08:54:08 +08:00
ShawnieBoy 5f60251d5a add 'creature card in a graveyard' to MagicTargetFilterFactory 2017-01-13 15:16:48 +00:00
ShawnieBoy 54eaf9dcd4 add Kaya to planeswalker subtypes 2017-01-13 15:12:50 +00:00
lodici e70a94be7f closes #699 : Option to speed up progression through the stack. 2017-01-11 20:16:50 +00:00
melvinzhang 8d82bd8ac0 use the 'Double-Checked Locking using Volatile' idiom, for #696 2017-01-11 16:03:52 +08:00
melvinzhang f3410c517c construct MagicBuilderManaCost in a single step to avoid cases where incomplete builderCost is retrieved, for #696 2017-01-11 14:52:01 +08:00
lodici 171720882f add index to assert message (see #696). 2017-01-10 19:38:11 +00:00
lodici 0c97be9215 only set non-zero checksum if original deck file on which duel deck was based has not changed since the duel was created. 2017-01-10 12:04:13 +00:00
lodici 19c2a99382 Display warning if deck editor has changes; change status of duel deck if updated via deck editor. 2017-01-10 12:04:08 +00:00
lodici 89c868ff72 Use "New deck" instead of "Unsaved Deck". 2017-01-10 12:04:06 +00:00
lodici 5ec05f502d Show deck type in duel decks screen. 2017-01-10 12:04:02 +00:00
lodici 1c8de22b3f Update deck title on duel decks screen with indication that deck is unsaved and remove redundant "Deck". 2017-01-10 12:04:02 +00:00
lodici c5f88782d1 set checksum and deck type when loading deck from file. 2017-01-10 12:04:01 +00:00
lodici d67fe0262d saving and restoring new deck checksum properties in latest.duel file. 2017-01-10 12:04:01 +00:00
ShawnieBoy 6c3c08a055 include locale in toLowerCase() 2016-12-28 00:53:29 +00:00
melvinzhang 2012ba99f9 replace groovy code with card script 2016-12-07 09:55:33 +08:00
ShawnieBoy f10a0285af add 'Scarecrow or Plains' to targetfilters 2016-11-20 14:53:34 +00:00
melvinzhang 88713b5024 fix bug where chosen is set to event.getPlayer(), should be done with processTargetPlayer 2016-11-08 17:31:18 +08:00
ShawnieBoy 48fbb56668 fix EnterChoosePlayer 2016-11-08 08:19:37 +00:00
ShawnieBoy 600d513222 add getChosenPlayer to MagicEvent 2016-11-08 08:19:20 +00:00
ShawnieBoy 65bcf49142 Generalise MagicCardList.getNrOfLands to .getNrOf(MagicType) 2016-11-08 07:55:26 +00:00
ShawnieBoy 401f26378f add EntersChoosePlayer to abilities 2016-11-08 07:28:34 +00:00
melvinzhang 025379c6b4 replace floor and ceil with intdiv 2016-11-07 16:11:01 +08:00
melvinzhang 1c805f7e38 use methods to get half life rounded up/down 2016-11-07 15:33:40 +08:00
melvinzhang bf2807389f ensure game state is updated before player gets priority, fixes #986 2016-11-07 15:30:38 +08:00
melvinzhang 7535305390 add ability Partner and Undaunted 2016-10-30 10:40:45 +08:00
ShawnieBoy e1c3963873 add additional phrasing for OpponentWasDealtDamage condition 2016-10-30 01:53:20 +00:00
melvinzhang f1b0f9b94d replace ChangePlayerStateAction with AddStaticAction for ephemeral state 2016-10-30 09:31:51 +08:00
melvinzhang 667423ced6 clean up player state on each update, fixes #962 2016-10-30 09:31:28 +08:00
ShawnieBoy e38c63ee2c add spite countertype 2016-10-29 20:11:19 +01:00
ShawnieBoy 4311952ba6 add Fury counter type 2016-10-29 01:58:27 +01:00
ShawnieBoy 4067f13c78 Hybrid was checking for colorless hybrid instead of colored - Fixes rendering of hybrid cards 2016-10-29 00:58:35 +01:00
melvinzhang ed02b99589 specify Locale.ENGLISH when comparing against hardcoded strings or doing lookup 2016-10-27 10:04:39 +08:00
lodici 6245037367 rename UiString to MText. 2016-10-26 09:46:59 +01:00
melvinzhang ed234a51ed remove support for unused "put tokens" form 2016-10-13 16:12:31 +08:00
melvinzhang 135b9c3e46 allow create token form for copying 2016-10-13 15:40:04 +08:00
melvinzhang 10c08534bf all token name to terminate at end of string 2016-10-13 14:16:13 +08:00
melvinzhang 21be1ca38f terminate tokens clause with ',' 2016-10-13 08:53:03 +08:00
melvinzhang e2bc426a96 there is always a comma before 'where' clause 2016-10-13 08:28:27 +08:00
lodici 15e999b557 Update tryDownloadingImage() to work only with IRenderableCard. 2016-10-12 19:53:28 +01:00
lodici 7d893ff28d update getImageType() to work only with IRenderableCard. 2016-10-12 19:53:28 +01:00
lodici 79ae406b44 relocate IRenderableCard into magic.model. 2016-10-06 12:26:58 +01:00
melvinzhang be58fc13c1 replace use of data.MagicIcon in IRenderableCard with model.MagicCostManaType 2016-10-06 19:00:24 +08:00
melvinzhang fc93264e99 simplify and remove cast from global prevent damage trigger 2016-10-06 17:40:55 +08:00
melvinzhang 4f6b96dc94 simplify and remove cast for isOnStack 2016-10-06 17:37:19 +08:00
melvinzhang 60976579b8 merge getPermanentImage(MagicPermanent permanent) and getCardImage(MagicCardDefinition cdef) into getCardImage(IRenderableCard face) 2016-10-06 14:12:38 +08:00
melvinzhang c2bc7a030f check for ALL_CREATURES instead of Changeling to cover Mistform Ultimus, for #623 2016-10-06 10:05:38 +08:00
melvinzhang 86bb0786fa add getSubTypeText to MagicPermanent, restore original default implementation of getSubTypeText 2016-10-06 08:54:42 +08:00
melvinzhang d0b14c71c1 simplify Goad, model it after Detain 2016-10-05 21:04:30 +08:00
lodici b55da6a394 create 'magic.cardDefinition*' and relocate classes. 2016-10-05 13:53:20 +01:00
melvinzhang 4d6c66f7c6 add effect: goad <permanents>, closes #825 2016-10-05 20:25:35 +08:00
melvinzhang fabc63fe54 replace groovy code with card script 2016-10-05 13:28:29 +08:00
melvinzhang 653b5297ab fix regex for search to hand/library top 2016-10-05 09:29:27 +08:00
melvinzhang 136dae256d make reveal optional for SearchLibraryToTopLibrary 2016-10-05 09:17:44 +08:00
melvinzhang 4b7b5659c5 merge SearchLibraryToHandHidden into SearchLibraryToHand 2016-10-05 09:11:05 +08:00
melvinzhang 3ed0fc316c add filter: legendary Spirit permanent card from your library 2016-10-05 08:33:02 +08:00
melvinzhang eb448d4db6 add variant of search library to battlefield effect with mods at the end 2016-10-05 08:16:12 +08:00
melvinzhang 8f870f1cae add effect: return <card> at random from your graveyard to your hand 2016-10-04 14:26:33 +08:00
melvinzhang bbaf401b34 add condition: enchanted creature's power is <amount> or greater 2016-10-04 13:29:30 +08:00
melvinzhang 1c144da7bc allow multiple conditions in intervening if clause 2016-10-04 12:25:45 +08:00
melvinzhang 40e3c31d3c add condition: RN has <amount> or fewer cards in hand 2016-10-04 10:57:51 +08:00
melvinzhang 4191a36395 add condition: RN has <amount> or more cards in hand 2016-10-04 10:51:59 +08:00
melvinzhang e529520ae1 add condition: that player has no cards in hand 2016-10-04 10:37:06 +08:00
melvinzhang ba938ec3e0 allow MagicCondition to check current event 2016-10-04 10:32:45 +08:00
melvinzhang e582364b6e replace generic logAppendMessage with logAppendValue or logAppendX 2016-10-04 10:10:19 +08:00
melvinzhang f6006d2f5e fix missing check for "isn't monstrous" when monstrousity resolves 2016-10-04 09:58:10 +08:00
melvinzhang 30afcab981 allow 'has' in ConditionGainGroup 2016-10-04 09:43:46 +08:00
melvinzhang dd275f085f make mana cost payment for Pact optional as 'playing mana abilities to generate the mana is optional' 2016-10-03 14:31:54 +08:00
melvinzhang 0c4fc9d3a1 remove unused filter 2016-10-03 11:30:52 +08:00
melvinzhang f43ef8a5c7 add effect: At the beginning of your next upkeep, pay <mana cost>. If you don't, you lose the game 2016-10-03 11:25:05 +08:00
ShawnieBoy bee8706a84 add green Creature card from Library to TargetFilterFactory 2016-10-02 17:04:38 +01:00
melvinzhang c6978f9987 remove genABStaticGame as permanents do not use the Game layer, fixes #928 2016-10-02 09:47:09 +08:00
ShawnieBoy c92c68eee9 Oracle Updates: Energy counter renamed for Energy Vortex 2016-10-01 13:26:07 +01:00
melvinzhang 711985d405 use custom may choice question for tribute 2016-10-01 13:45:53 +08:00
melvinzhang d170b1d2d5 replace replaceFirst in addAbilityImpl with constant in regex 2016-10-01 13:35:32 +08:00
melvinzhang 19af5b1bdc remove unnecessary custom filters 2016-10-01 09:29:43 +08:00
melvinzhang 238be0d242 add filter 'attacking or blocking <permanent>', 'attacking <permanent>', 'untapped <permanent>', 'tapped <permanent>' 2016-10-01 09:03:29 +08:00
melvinzhang 1a316a9c3c allow searching from library + graveyard/hand 2016-09-30 11:02:21 +08:00
melvinzhang 7d7d10af4c only add cards in library to showCards, prefer to show hand, graveyard, library in this order 2016-09-30 11:02:21 +08:00
melvinzhang 4f018e6eb5 fix incorrect boolean opreator for CREATURE_OR_VEHICLE, fixes #922 2016-09-29 09:18:59 +08:00
melvinzhang c0a6028e9e move morph activations to card layer as permanent no longer check game layer, fixes #921 2016-09-29 08:59:22 +08:00
melvinzhang 3a3a9722ec support create token phrasing, closes #897 2016-09-27 20:53:50 +08:00
ShawnieBoy 12e3da740d add Dovin and Saheeli to planeswalker subtypes 2016-09-26 17:52:30 +01:00
melvinzhang f0195725db reduce updates by only updating between events if the next one has a choice 2016-09-26 21:45:03 +08:00
ShawnieBoy 4911b05d2f prevent adding 'Tribal' to getLongTypeString() addition of supertypes 2016-09-24 16:22:39 +01:00
melvinzhang d72e475742 MagicPlayAuraEvent should extend MagicETBEvent 2016-09-24 20:59:38 +08:00
melvinzhang fc862a4733 create MagicETBEvent that is used by permanents, for #893 2016-09-24 20:53:25 +08:00
melvinzhang 8f1977cd24 revert PT setting token to changing of card definition so that it is copied correctly 2016-09-24 13:21:56 +08:00
melvinzhang f908b236a2 add playmod factory PT to set PT, and MagicPlayMod.FLYING 2016-09-24 10:04:34 +08:00
ShawnieBoy 6188bcb0ca add FILTER_SUBTYPES enumset for SubType filtering 2016-09-23 16:54:02 +01:00
melvinzhang cf63eec4c4 add Wily Bandar 2016-09-23 20:50:15 +08:00
melvinzhang 412251cc83 add filter 'creature or nonbasic land' 2016-09-23 00:16:15 +08:00
melvinzhang 1735c5f15a add ability '<permanents> enter the battlefield tapped' 2016-09-22 23:57:21 +08:00
melvinzhang 16b05b7689 add Hightide Hermit 2016-09-22 23:22:20 +08:00
ShawnieBoy 24384a3720 add MagicPlayMod.SPIRIT 2016-09-22 15:26:40 +01:00
ShawnieBoy da50b537d4 allow MagicManaCost.create() to accept an int for colorless mana. 2016-09-22 14:03:44 +01:00
melvinzhang c8cc32c169 add Fragmentize 2016-09-22 10:01:04 +08:00
melvinzhang 388d019b08 add Master Trinketeer 2016-09-22 09:15:51 +08:00
melvinzhang 5e2881341b add filter 'creature or vehicle' 2016-09-22 08:47:53 +08:00
ShawnieBoy b1ad6ca413 revert monarch log wording 2016-09-21 16:12:26 +01:00
melvinzhang dc80bb455b permanent update should not include player layer or game layer 2016-09-21 19:15:17 +08:00
melvinzhang 6fac4bc4bb include CombatDamage in combat phase check 2016-09-21 19:15:17 +08:00
melvinzhang 871dae570e allow effect '<effect> unless you <cost>' 2016-09-21 12:31:49 +08:00
melvinzhang 62a7ada1ea allow ability '<permament> don't untap during their controllers' untap steps.', adjust ability properties 2016-09-21 11:21:32 +08:00
melvinzhang 037e5e2202 allow 'this land' and 'this permanent' in nested ability 2016-09-21 11:04:43 +08:00
melvinzhang 9535ecfc81 allow 'this creature' to represent SN in nested ability 2016-09-21 10:34:33 +08:00
ShawnieBoy 9d63b67c16 give Monarch draw trigger a source-neutral log message 2016-09-19 15:22:01 +01:00
melvinzhang b709c43094 replace MagicPlayerState.Exhausted used by a single card with MagicStatic 2016-09-19 15:12:19 +08:00
melvinzhang f7efeca48c use game triggers to implement Monarch triggers, for #826 2016-09-19 11:00:00 +08:00
melvinzhang 098e8994cd add condition 'you're the monarch', for #826 2016-09-19 10:59:49 +08:00
melvinzhang 88de23c219 follow MagicPermanentState for MagicPlayerState management 2016-09-19 10:56:24 +08:00
ShawnieBoy 2f98ecfff0 Monarch attempt (Non-functional) with TestMonarch and sample card. 2016-09-18 16:43:02 +01:00
melvinzhang 9449be257a add ability 'Fabricate <n>', closes #831 2016-09-18 21:16:29 +08:00
melvinzhang dec1a963ba add cost 'Pay {E}+', for #830 2016-09-18 20:34:58 +08:00
melvinzhang 37a532f54d add effect '<player> get {E}+', for #830 2016-09-18 20:34:53 +08:00
melvinzhang fce9c35ba9 add condition 'enchanted creature has <amount> or more <type> counters on it' 2016-09-16 10:08:20 +08:00
melvinzhang 5c96f2d028 add condition 'if a <permanent> is on the battlefield' 2016-09-16 10:04:10 +08:00
melvinzhang 79527ecf6a add condition 'you have more life than an opponent' 2016-09-16 09:53:43 +08:00
melvinzhang ee02ddb535 add conditions 'an opponent controls more creatures than you' and 'an opponent has more life than you' 2016-09-15 21:31:00 +08:00
melvinzhang b3dabb2f57 extend SacrificeChosen to multiple permanents 2016-09-15 17:59:27 +08:00
ShawnieBoy 7e45f1ab79 add Aetherborn and Pilot to creature subtypes 2016-09-15 01:20:12 +01:00
melvinzhang 1cc67ef277 standardize return type of getCostEvent 2016-09-14 16:21:26 +08:00
melvinzhang 7730e682fa store number of energy counters in MagicPlayer, for #830 2016-09-14 11:44:24 +08:00
melvinzhang a12fb8e200 include Vehicle in ALL_ARTIFACTS 2016-09-13 21:30:25 +08:00
melvinzhang bdfda09085 add Vehicle subtype 2016-09-13 21:22:48 +08:00
melvinzhang c4791016ac add ability 'Crew <n>', closes #829 2016-09-13 21:22:24 +08:00
melvinzhang fb917b3d20 fix duplicate draw message in log 2016-09-13 21:20:07 +08:00
ShawnieBoy 0360ab7bd9 add basic Monarch player state info 2016-09-09 17:00:18 +01:00
ShawnieBoy 685abdc632 add additional phrasing for BLACK_ZOMBIE play mod 2016-09-09 16:36:03 +01:00
melvinzhang 8719b403df add amount 'the highest converted mana cost among permanents you control' 2016-09-05 13:54:32 +08:00
melvinzhang 047e0e5512 support 'where X is' in PutTokens 2016-09-04 12:26:23 +08:00
kelsioboy a332943f44 fix Deathbringer Liege trigger order for white black spells 2016-09-04 08:47:53 +08:00
lodici 6cb85f284a checkboxes creation now handled by FilterButtonPanel instead of sub-classes. 2016-09-02 20:42:02 +01:00
melvinzhang e6f23523e3 add Dream Leash 2016-09-01 18:33:50 +08:00
melvinzhang 40780bc8d8 add ability 'Melee' 2016-08-30 08:19:07 +08:00
lodici 55c6ec423a Add "unsupported" filter button to explorer (closes #827). 2016-08-29 11:39:59 +01:00
melvinzhang 6b63f702ad add condition "you've cast another spell this turn" 2016-08-18 18:43:09 +08:00
melvinzhang 1809082700 add Skybind 2016-08-16 21:28:53 +08:00
melvinzhang 7ce1f10c5e ability unless should always be at the Game layer, fixes #819 2016-08-10 20:34:48 +08:00
melvinzhang fc2ca79e40 create new trigger type WhenTransforms, fixes #822 2016-08-09 10:38:00 +08:00
melvinzhang 274a8af14a remove unused reference 2016-07-26 08:46:13 +08:00
melvinzhang 362c1ae2d5 make member newValue final as it never changes 2016-07-26 08:45:52 +08:00
melvinzhang 3b04702a46 consolidate yes/no lists in MagicChoice 2016-07-26 08:45:52 +08:00
melvinzhang b94d4fd343 add ability 'SN cost {1} less to cast for each <amount>' 2016-07-23 09:17:06 +08:00
melvinzhang 8965294583 add filter 'enchantment, instant, or sorcery spell' and 'creature that has a fate counter on it' 2016-07-22 20:43:55 +08:00
melvinzhang 273a795a77 fix crash due to accessing refPermanent in MagicStackGetChoicesEvent 2016-07-22 16:55:18 +08:00
ShawnieBoy 7a75e34a40 add ANY_HELLBENT condition 2016-07-21 17:44:11 +01:00
melvinzhang 6554c61351 allow 'Whenever' for transforms trigger 2016-07-19 13:17:37 +08:00
melvinzhang 6c3f7152b3 support effect '<sn/rn> fight <permanent>' 2016-07-19 13:17:09 +08:00
melvinzhang eb8bf6bac2 revert == to equals replacement, shorten param names 2016-07-19 11:59:03 +08:00
melvinzhang c65d8ef105 replace direct comparison with isValid, isFriend, isEnemy 2016-07-19 11:25:58 +08:00
melvinzhang 3af80f3cb6 replace multiple isPhase with ordinal comparison 2016-07-19 11:00:43 +08:00
ShawnieBoy 10bd53250e add additional combat conditions 2016-07-18 19:47:29 +01:00
ShawnieBoy 6ef7007c15 add Attacking Ally to target filters 2016-07-18 18:58:08 +01:00
ShawnieBoy 77281766b9 tidy MagicCardDefinition 2016-07-18 17:43:17 +01:00
ShawnieBoy 10f4c6f7f9 add card Status to explorer filters 2016-07-18 17:41:46 +01:00
ShawnieBoy d293c0d827 add MELD property to melded products 2016-07-18 13:38:56 +01:00
melvinzhang 5cd02acbf9 remove unnecessary this. add spaces for readability 2016-07-18 13:31:15 +08:00
melvinzhang a3e264cecc order of blocking creatures matters for stateId, use blockingCreatures instead of blockedCreature 2016-07-18 11:39:05 +08:00
melvinzhang 631192a461 add abilities 'snow landwalk', 'snow swampwalk', 'snow forestwalk', fixes #811 2016-07-18 09:03:03 +08:00
melvinzhang f75e217cc2 allow play mods for FlickerOwner 2016-07-17 17:34:08 +08:00
melvinzhang 9d8909c77a add rider to start with 'Then' 2016-07-17 11:58:44 +08:00
melvinzhang 4bed08340f allow "owners'" in FlickerEndStep 2016-07-12 21:17:32 +08:00
melvinzhang 68aa75c04c add ability conspire, closes #801 2016-07-12 20:18:38 +08:00
melvinzhang 12bf05498a add filter 'creature that's one or more colors' 2016-07-12 16:53:26 +08:00
melvinzhang 39cefe24dd replace expression with call to shareColor 2016-07-12 11:57:32 +08:00
melvinzhang 5eb74dae5c add filter 'creature you control that share a color with it' for conspire 2016-07-12 11:53:28 +08:00
melvinzhang e5982d13dd add getColorFlags and shareColor to MagicObject 2016-07-12 11:51:53 +08:00
melvinzhang 69e229c010 support effect '<players> lose <amount> life. You gain life equal to the life lost this way' 2016-07-10 09:45:52 +08:00
melvinzhang 5a0dc0abfd remove need for quoting by improving toSingular conversion 2016-07-09 11:38:39 +08:00
melvinzhang f6de9c733e ensure equip with restriction can only be for creature you control, fixes #794 2016-07-08 10:16:02 +08:00
melvinzhang 3e25c8d398 add Master of Arms 2016-07-07 10:45:02 +08:00
melvinzhang 0aea3209f5 replace hardcoded action with action parameter, fixes #791 2016-07-07 09:25:07 +08:00
melvinzhang 25f66c9ac9 add MagicManaCost.getDevotion 2016-07-06 11:57:39 +08:00
melvinzhang e45dc79ab2 add filter 'creature without shadow' 2016-07-06 09:03:49 +08:00
melvinzhang 3277b3d284 generalize AttackSelf to use ARG.PERMANENTS 2016-07-05 20:25:22 +08:00
melvinzhang b39e8354b7 add ability 'Whenever <permanent> enters the battlefield under an opponent's control, <effect>.' 2016-07-05 20:13:01 +08:00
melvinzhang dde5e739f2 add filter 'creature with power less than SN's power' 2016-07-03 09:10:23 +08:00
melvinzhang 2d1d912b90 add ability '<permanents> can't block it', filter 'creature with power greater than SN's power' 2016-07-03 09:06:16 +08:00
melvinzhang 4b8b1953fd support ability "Emerge <mana cost>", closes #790 2016-07-02 10:43:15 +08:00
melvinzhang 8392f84c6e add filter 'creature defending player controls with ...' 2016-06-21 20:44:57 +08:00
melvinzhang 9c11a6ef77 remove unused filter constants 2016-06-21 20:41:56 +08:00
melvinzhang f2321b5065 add filter parser for 'creature you control with ...' and 'creature an opponent controls with ...' 2016-06-21 20:24:50 +08:00
melvinzhang 41d89edf64 consolidate filter parser cases 2016-06-21 19:42:14 +08:00
melvinzhang 132938e1a7 replace mutable update to find max with stream based max 2016-06-19 20:15:01 +08:00
melvinzhang b9cefceddc generalize PumpX/WeakenX to allow gaining ability 2016-06-19 12:01:23 +08:00
melvinzhang 46901dce51 generalize Draw to allow 'equal to <amount>' 2016-06-19 12:01:22 +08:00
melvinzhang 41abf64add add amount 'the greatest power among creatures you control' 2016-06-19 11:55:20 +08:00
melvinzhang 72a35b87c3 remove more specific DamageToYou before DamageToTarget 2016-06-18 23:26:14 +08:00
melvinzhang 0355773ddf restore DamageToYou as it passes the source of the damage as RN instead of the target 2016-06-18 23:24:33 +08:00
melvinzhang c40f59ee31 check that tfilter accepts type of damage target 2016-06-18 22:48:02 +08:00
melvinzhang f0714636ce consolidate 'deals damage to' under DamageToTarget 2016-06-18 20:50:56 +08:00
melvinzhang b2aff97076 add filter 'card name <name> from a graveyard' 2016-06-18 10:40:34 +08:00
melvinzhang 750a334a8c remove trailing whitespace 2016-06-18 10:12:34 +08:00
melvinzhang a065e9e316 add factory method that uses a template card def 2016-06-18 10:07:16 +08:00
melvinzhang db833d9e39 replace listing of plurals with regex and words ending in 's' that should not have 's' removed 2016-06-18 09:18:39 +08:00
ShawnieBoy bfb9ffe42a add Skeleton token to target filters 2016-06-17 16:13:49 +01:00
melvinzhang 94a5c676c7 remove unnecessary filters 2016-06-17 22:18:54 +08:00
ShawnieBoy 145916547d add Attacking creature opp controls to target filters 2016-06-17 14:51:20 +01:00