Commit Graph

29213 Commits (master)

Author SHA1 Message Date
Mike 36c5ce55cc shut down firemind queue worker when magarena exits (#1589) 2018-06-14 14:08:19 +08:00
melvinzhang b87f60e99e add comment on how robust child was chosen 2018-06-06 10:20:26 +08:00
melvinzhang bfe43870b1 add comment that we are using the robust child strategy 2018-06-06 10:17:27 +08:00
melvinzhang 7640332133 replace member S with more descriptive member named variance 2018-06-06 10:09:13 +08:00
melvinzhang 2d2d0769f9 show opponent's hand as plain so that 'S' key works, restriction can be enabled when #217 is resolved 2018-05-27 17:30:52 +08:00
Ada Joule d213884dc2 Add Saga mechanic (#1564)
* Add AtBeginOfFirstMainPhaseTrigger and adding lore counter to saga

* Make add counter trigger more generic

* Change begin main phase trigger to Saga-specific

* Add magic.data.RomanToInt

* Add chapter parsing to ARG

* Add SagaChapterTrigger

* Add chapter ability to MagicAbility

* Add lore counter mechanic to Saga card definiton

* Add Saga sacrifice state-based action

* Fix import

* Fix getPendingTriggers

* Add History of Benalia

* Fix adding ETB trigger

* Remove AtBeginningOfFirstMainPhaseTrigger.Saga, Add counters directly in MagicMainPhase.executeBeginStep()

* Remove null case from RomanToInt

* Revert "Remove AtBeginningOfFirstMainPhaseTrigger.Saga, Add counters directly in MagicMainPhase.executeBeginStep()"

This reverts commit d8e5d1f253ab7b54f401f4151b44d39ee927f44c.

* Move isSaga method to IRenderableCard
2018-05-04 14:17:55 +08:00
melvinzhang fb306e34a8 add release notes for 1.93 2018-04-29 20:55:56 +08:00
melvinzhang f28d4a5f30 bump version to 1.93 for release 2018-04-29 20:15:59 +08:00
ShawnieBoy 4b55d458ea reparse A25 scripts: image urls 2018-04-27 14:12:34 +01:00
Ada Joule ad76850aa2 Add cards from Rivals of Ixalan (#1563)
* Add Admiral's Order

* Add Arterial Flow

* Add Blazing Hope

* Add Brass's Bounty

* Add Crashing Tide

* Add Journey to Eternity // Atzal, Cave of Eternity

* Add Enter the Unknown

* Add Fanatical Firebrand

* Add Form of the Dinosaur

* Add Ghalta, Primal Hunger

* Add Hornswoggle

* Add Jadelight Ranger

* Add Nezahal, Primal Tide

* Add Path of Discovery

* Add Pirate's Pillage

* Add Pitiless Plunderer

* Add Temple Altisaur

* Add Vraska's Scorn

* Add World Shaper
2018-04-27 13:05:56 +08:00
ShawnieBoy 50050fec7d reparse image url A25 scripts missing 2018-04-25 12:40:06 +01:00
ShawnieBoy ce0d1c6f6a Correct Masters 25 set code 2018-04-23 16:06:46 +01:00
ShawnieBoy 17b11d1b73 Reparse M25: Scripts missing 2018-04-22 15:08:30 +01:00
Martin Petricek 00451e038a Add another set of tested new cards (credit goes to Kelsioboy) (#1560)
Chameleon Spirit
Crypt Incursion
Custodi Soulcaller
Debt to the Deathless
Divine Congregation
Elemental Mastery
Goblin Archaeologist
Goblin Festival
Gravestorm
Hammer of Nazahn
Lurking Predators
Master the Way
Meren of Clan Nel-Toth
Molten Influence
Nazahn, Revered Bladesmith
Necromancer's Covenant
Prying Questions
2018-04-21 09:06:48 +08:00
ShawnieBoy 5befeed59d Include Firesong and Sunspeaker to DOM 2018-04-19 14:53:52 +01:00
ShawnieBoy 03cde9e8ff add DOM scripts 2018-04-19 14:41:29 +01:00
melvinzhang 62f4e84e00 only change unknown cards during showRandomizedHandAndLibrary, fixes #1506 2018-04-15 12:03:04 +08:00
Ada Joule 5e54d8ab90 Remove "to mana pool" from abilities that produce mana (#1558)
* Make "to your mana pool" optional in mana abilities

* Remove "to your mana pool" entirely

* Remove "to your mana pool" in card scripts

* Remove "to your mana pool" in scripts_missing

* Remove "to your mana pool" from other places

* Remove "to [anyone's] mana pool"
2018-04-15 08:32:42 +08:00
Ada Joule baffa65bb5 Correct target filter in Scrap Trawler (#1556)
* Correct target filter in Scrap Trawler

* Revert "Correct target filter in Scrap Trawler"

This reverts commit e6f2575c3a1903ba1db701bba906d393d98bf237.

* Add cmcLT to MagicCardFilterImpl and Scrap Trawler
2018-04-14 11:48:20 +08:00
ShawnieBoy 2e89cfb7b8 add Dominaria to sets - new scripts pending gatherer update next week 2018-04-14 03:23:01 +01:00
Ada Joule e0441c1cdc Add player check to Nest of Scarabs (#1554) 2018-04-14 08:28:20 +08:00
Ada Joule 5282913412 Extract counter change data to a local variable (#1555) 2018-04-14 08:25:56 +08:00
Ada Joule 8b0a79ee12 Add "Whenever you put one or more counters" abilities (#1553)
* Add createYou method for counter is put triggers

* Add "when you put one or more counter" to MagicAbility.java

* Add Defiant Greatmaw

* Add Hapatra, Vizier of Poisons and Snake token

* Add superclass accept check to created triggers

* Add Nest of Scarabs and Insect token

* Add Obelisk Spider
2018-04-13 09:29:35 +08:00
Ada Joule df7e5932b5 Remove redundant amount check in ChangeCountersAction.java (#1550) 2018-04-11 19:04:48 +08:00
Ada Joule 80891e0be2 Fix Deathgorge Scavenger and Verdant Sun's Avatar (#1548)
* Fix Deathgorge Scavenger

* Fix Verdant Sun's Avatar

* Fix wrong code location
2018-04-10 12:58:08 +08:00
Ada Joule 2a0d8c0394 Add player argument to ChangeCountersAction (#1549)
* Add source argument to ChangeCountersAction

* Add source argument to usages of ChangeCountersAction in event package

* Update usages in DealDamageAction

* Update usages in trigger package

* Change source argument to player argument

The oracle text refers to the player putting counters, so it's more
logical to have a player argument.

* Add player data to MagicCounterChangeTriggerData

* Update DealDamageAction

* Change to player in event package

* Change to player argument in trigger package

* Add import

* Fix usage in test package

* Fix usage in groovy scripts

* Fix bug
2018-04-10 12:08:37 +08:00
Ada Joule 209bb0a6d0 Add cards that utilise IfCounterWouldChangeTrigger (#1544)
* Add Corpsejack Menace

* Add Hardened Scales

* Add "one or more would be put" to accept method

* Add Tatterkite

* Add Vizier of Remedies

* Add Winding Constrictor

* Simplify condition in Winding Constrictor
2018-04-09 16:52:15 +08:00
melvinzhang 407d0c3665 check amount after it has been possibly modified by IfCounterWouldChange 2018-04-09 15:00:29 +08:00
Martin Petricek bd5ae5fd7a Refactoring (#1543)
* Fix typos.

* Remove unnecessary boxing/unboxing.

* Replace traditional 'for' loops with 'foreach' loops.

* Replace explicit types with <> (diamonds) where they can be inferred.

* Collapse identical catch branches.

* Replace statement lambda with expression lambda for short statements.

* Remove unnecessary imports.

* Replace some lambdas with Comparator.comparing

* Replace Runnables with lambdas.

* Use addAll instead of adding whole collection manually.

* Simplify boolean expressions.

* Remove redundant 'else'.

* Simplify some boolean conditions that are always true or false.

* Inline redundant local variables.

* Remove extraneous semicolons.

* Fix Javadoc errors.

* Replace anonymous classes with lambdas.

* Replace chain of 'if's with switch.

* Remove delaration of exception that is never thrown.

* Use String/StringBuilder properly.
2018-04-08 08:59:14 +08:00
Ada Joule 66ffd3f1d1 Add abilities that trigger when a counter is put on a card, or one or more counters are put (#1541)
* Add CounterIsAddedTrigger

* Add counter type to MagicCounterChangeTriggerData

* Rename CounterIsAdded to CounterIsPlaced

* Add CounterIsRemovedTrigger

* Add executeTrigger statements to ChangeCountersAction

* Fix errors

* Add IfCounterWouldChangeTrigger

* Change CounterIsPlacedTrigger to also have counterType argument

* Add when one or more counter is placed to MagicAbility

* Rename CounterIsPlacedTrigger to OneOrMoreCounterIsPlacedTrigger

* Change one or more counter is placed on SN to on permanent

* Change OneOrMoreCounterIsPlaced to OneOrMoreCountersArePlaced

* Add "are put" to counter checking

* Remove counter removed trigger type

* Change CountersArePlaced to CountersArePut

* Remove CounterIsRemovedTrigger.java

* Add cards that doesn't need groovy

* Revert "Add cards that doesn't need groovy"

This reverts commit 05f8782baba7280edb24c41a9f0ddeb6f54a312d.

* Add Enduring Scalelord

* Add ACounterIsPutTrigger

* Add Bloodcrazed Hoplite

* Add Fathom Mage

* Add Flourishing Defenses

* Rename counterType argument to aCounterType

* Use ARG.WORD1 in MagicAbility

* Change TriggerType name
2018-04-07 22:54:49 +08:00
melvinzhang 2c239a081e replace other uses of matcher.group(type) with ARG.word1(matcher) 2018-04-07 08:44:37 +08:00
melvinzhang 97627ea02b remove hardcoded regex with ARG constant 2018-04-07 08:40:26 +08:00
Ada Joule d2e44c054e Add Saga subtype and historic keyword (#1540)
* Add MagicSubType.Saga

* Add historic to MagicTargetFilterFactory
2018-04-06 19:54:56 +08:00
melvinzhang 35f423b263 add casting condition to legendary sorceries, closes #1536 2018-04-05 20:21:52 +08:00
melvinzhang 0c5a72ff4c use generic method to remove raw type warning 2018-04-05 19:55:19 +08:00
melvinzhang f9af5282b2 use existing ScriptParseException instead of FilterParseException 2018-04-01 12:47:33 +08:00
melvinzhang 55e06d3585 use FilterParseException instead of RuntimeException 2018-04-01 12:42:05 +08:00
melvinzhang 91605aa3c1 replace filter generators with filter parsers 2018-04-01 12:36:38 +08:00
Martin Petricek 5b371494a1 Improve and generalize script parsing (#1530)
* "it" and "SN" are synonyms, use both forms where this is true.

* Generalize parsing of targets

* Generalize parsing of targets with filter generator with numeric parameters.

* Simplify some of the existing Groovy scripts

* Simplify and refactor spells and CMC filters.

* Generalize parsing of spells with numeric parameters.

* Generalize parsing of permanent targets, support numeric parameters.

* Simplify parsing simple prefixes (color, type, subtype).
Use regexes instead of only looping over all possible colors/types/subtypes.

* Add three cards that are now supported with parser improvements:
 Horribly Awry
 Radiant Kavu
 Thoughtbind

* Remove complex old-style filters that are unreferenced from Java / Groovy.

* Further simplification of predefined rules.

* Fix bad mana cost in Sequestered Stash
2018-04-01 10:24:15 +08:00
melvinzhang b46234f3eb update release notes up to March 2018-03-31 20:20:59 +08:00
melvinzhang 5d09412609 add missing newline at end of file, remove blank lines at end of file 2018-03-28 16:24:04 +08:00
Ada Joule c34a40e9e8 Fix abilities that reveal cards from top of library until certain condition (#1531)
* Fix Tezzeret, Master of Metal

* Fix Ajani, Valiant Protector

* Fix MoveCardAction

* Fix Madcap Experiment

* Fix Treasure Keeper

* Fix RemoveCardAction

* Fix RemoveCardAction in castAction

* Fix variable name

* Use break to exit loop
2018-03-28 16:21:12 +08:00
ShawnieBoy 257bc61717 correct image url for 0/1 red elemental creature token 2018-03-23 15:20:39 +00:00
melvinzhang 1d157f84a1 fix incorrect interface for MagicPermanentAction instances 2018-03-23 21:58:08 +08:00
Martin Petricek 5ce8792d61 more cards 5 (#1517)
* Add more new cards after playtesting (credit goes to Kelsioboy):
Akuta, Born of Ash
Dark Dabbling
Defiling Tears
Doorkeeper
Dragon Grip
Explorer's Scope
Gigapede
Guul Draz Overseer
Into the Wilds
Salt Road Ambushers
Tainted Remedy
Terrifying Presence
Thrasios, Triton Hero
Trail of Mystery
Yomiji, Who Bars the Way

* Cleanup: Remove trailing whitespace from scripts

* Fix all HTTP to HTTPS for magiccards.info
2018-03-22 17:35:32 +08:00
Ada Joule e5ebff99b1 Add more cards from Kaladesh and Amonkhet blocks (#1504)
* Add Aetherstorm Roc

* Add Dubious Challenge

* Fix cost event of Aetherstorm Roc

* Fix Aetherstorm Roc

* Add MagicPayEnergyEvent in Aetherstorm Roc

* Add Fateful Showdown

* Add Madcap Experiment

* Add Tezzeret's Betrayal

* Add Treasure Keeper

* Add Edifice of Authority

* Add Gate to the Afterlife

* Remove groovy ability in Gate_to_the_Afterlife.txt

* Add Gideon's Resolve

* Add requires_groovy_code line to added cards

* Move another ability of Gate to the Afterlife to groovy

* Add Harvest Season

* Fix closure in Treasure Keeper

* Fix static type checking in Treasure Keeper

* Revert predicate declaration back

* Fix negative predicate closure in Treasure Keeper

* Fix static type checking in Treasure Keeper

* Add God Pharaoh's Gift

* Add requires_groovy_code to Harvest Season

* Use MagicCardList type for event ref

* Add missing comma

* Fix wrong return type

* Add groovy script for God Pharaoh's Gift

* Fix typo

* Fix int type in Harvest Season

* Add Imaginary Threats

* Add Nicol Bolas, the Deceiver

* Remove groovy ability from Nicol_Bolas__the_Deceiver.txt

* Remove redundant player ref from Nicol Bolas, the Deceiver's event

* Add Torment of Hailfire

* Add missing parenthesis

* Add Torment of Venom

* Remove Torment of Venom's effect from txt and add requires_groovy_code
line

* Remove extra ref argument from Torment of Venom's event

* Fix shuffle in Madcap Experiment

* Fix rest.remove(it) in Dubious Challenge

* Refine Madcap Experiment

* Fix Treasure Keeper

* Add exile action in God Pharaoh's Gift

* Use constructor instead of casting in Madcap Experiment

* Add missing choice argument in Torment of Venom

* Fix variable name

* Fix Edifice of Authority

* Fix Fateful Showdown

* Fix Treasure Keeper

* Fix targeting ruling in Tezzeret's Betrayal

* Rewrite Aetherstorm Roc

* Refine Aetherstorm Roc
2018-03-22 17:20:31 +08:00
Ada Joule 1d5e788838 Make targeting spells and abilities "countered" if the target becomes illegal (#1516)
* Fix Kari Zev's Expertise

* Fix Confiscation Coup

* Fix Liberating Combustion

* Fix typo

* Fix Chandra's Defeat

* Fix Imminent Doom

* Fix Wasp of the Bitter End

* Fix Field of Ruin

* Fix Expel from Orazca

* Remove extra $ in Chandra's Defeat
2018-03-22 17:19:08 +08:00
Ada Joule 0301e99c1b Add RevealAction to groovy scripts (#1509)
* Fix Commune with Dinosaurs

* Fix Aetherworks Marvel

* Fix Azcanta, the Sunken Ruin

* Fix Sunbird's Invocation

* Change Aetherworks Marvel back

* Add LookAction to Commune with Dinosaurs
2018-03-20 17:55:05 +08:00
Martin Petricek f9745090fc More cards again (#1511)
* Put back https:// instead of http:// on new card scripts.

* Add support for new cards (credit goes to kelsioboy for them):
 Aleatory
 Blazing Salvo
 Chaotic Strike
 Confront the Unknown
 Cyclopean Giant
 Hamletback Goliath
 Indulgent Tormentor
 Intimidation Bolt
 Learn from the Past
 Measure of Wickedness
 Neko-Te
 Sylvan Primordial
 Tenacious Dead
 Thran Foundry
 Waxing Moon
 Wheel and Deal
 Wolfcaller's Howl
2018-03-20 10:42:31 +08:00
melvinzhang 42df2b22f9 fix crash due to wrong interface for playMod, use AddTurnTriggerAction instead of AddTrigerAction, fixes #1512 2018-03-20 10:28:36 +08:00