Commit Graph

31762 Commits

Author SHA1 Message Date
Agetian
d2172519b4 - Clear the temporary EndOfTurnLeavePlay SVar from a Dashed creature to avoid making it linger permanently on the card for the rest of the duel. 2016-12-24 07:05:30 +00:00
Agetian
0334dbb87c - Do not set an EndOfTurnLeavePlay SVar on Dash cards (seems to have no functional effect while preventing the AI from ever casting the card for its full mana cost after it was dashed once). 2016-12-24 05:13:51 +00:00
Agetian
3f95f34acc - Use LKI copy for Dash AI simulation. 2016-12-23 20:42:34 +00:00
Agetian
cabd71c4f6 - Removed a test code I forgot to take out last time. 2016-12-23 20:12:30 +00:00
Agetian
4f00ae9424 - Create a new object when considering Dash and simulating it by the AI (if it has the same ID as the original card copied by the simulation, that can mess up with time stamp checks later and the card can become untargetable by spells, e.g. Kolaghan, the Storm of Fury + Force Away in Commander mode). 2016-12-23 20:08:48 +00:00
Myrd
c272cde429 Simulated AI: Evaluate different fetch targets.
This lets the AI figure out such sequences as:

Game state:

In play: Urborg, Thespian's stage & fetch land
In hand: Crop rotation

Sequence:
  1. Fetch for a forest.
  2. Crop rotate forest into Dark Depths.
  3. Activate Thespian's stage targeting Dark Depths.
  4. Profit!
2016-12-23 17:50:26 +00:00
Agetian
bd1e99bc2e - Removed unused imports. 2016-12-23 12:32:57 +00:00
Agetian
7ab904eb07 - Implemented a way to override fullscreen resolution for forge-gui-mobile-dev. 2016-12-23 12:32:25 +00:00
Agetian
9d0e8b8096 - Made the desktop port and the mobile port of the game use different threads when processing multiple achievements (otherwise the game tends to freeze). 2016-12-23 07:13:07 +00:00
Agetian
8049783598 - Fixed Aetherworks Marvel. 2016-12-23 06:34:24 +00:00
Myrd
ca0e940069 Don't ignore counterspells in simulated AI. 2016-12-23 06:26:25 +00:00
Myrd
fce93840c0 Don't warn about cards AI can't play when using simulation AI. 2016-12-23 06:16:53 +00:00
Myrd
a2aa3ccc06 Fix another problem with Thespian's Stage copying itself and add a test. 2016-12-22 22:30:34 +00:00
Myrd
4efc738813 Fix dev mode save/restore of legendary tokens. 2016-12-22 21:59:35 +00:00
Myrd
3e91a56ced Fix NPE in CardUtil.getLKICopy() that would happen when Thespian's Stage would copy itself.
The problem would happen when executing:
        newCopy.getCurrentState().copyFrom(in, in.getState(in.getCurrentStateName()));
        
Because the clone code was clearing the cloned state without updating currentStateName.

Also added a test for this in the context of simulated AI, although the actual bug was not in simulation code - it's just simulation code would run into it since it tries all possible targets to copy (while humans would likely not try it).
2016-12-22 20:31:41 +00:00
Myrd
4b14c9d943 Fix copying of emblems for simulated AI along with a test. 2016-12-22 19:45:16 +00:00
Agetian
85ad047e4b - Preparing Mobile Forge v1.5.58.007 (fixes a lock-up/crash issue). 2016-12-22 19:42:50 +00:00
Agetian
fc9d924208 - Reverted r32715, breaks mobile Forge (better solution may be needed in order to prevent this from locking up Forge on desktop when processing achievements). 2016-12-22 19:35:56 +00:00
Myrd
2b0c76ad66 Fix cost reduction for Not of This World when targeting an Abzan Charm that's exiling a creature. 2016-12-22 18:58:02 +00:00
Agetian
e9385941cc - Improved the Forge Mobile Dev project: it can now function as a fullscreen back-port of the mobile Forge app running on Linux, Mac and Windows PCs.
- Added desktopMode parameter to forge-gui-mobile-dev Main: set it to "true" to make the game run in full-screen mode.
- Added desktopModeAssetsDir parameter to forge-gui-mobile-dev Main: it can be set to make the game use the standard desktop Forge assets folder structure.
- Disabled resizing for the forge-gui-mobile-dev screen when running in standard cellphone/tablet "emulation" mode since it causes visual graphics corruption.
- Added a Maven plugin to forge-gui-mobile-dev to build a .jar with dependencies (like for desktop Forge) that can function as a standalone executable running on Linux, Mac and Windows systems.
2016-12-22 18:06:34 +00:00
Myrd
d1bd0f0293 Fix loading a gauntlet. 2016-12-22 17:17:08 +00:00
Agetian
ff46840dca - Fixed a couple crashes when processing card scripts. 2016-12-22 05:47:39 +00:00
Myrd
73ab19cfb3 Fix gauntlet contests. 2016-12-21 21:07:49 +00:00
Hanmac
50b45901c1 cards: update splice cards 2016-12-21 18:33:31 +00:00
Hanmac
94681b6675 Splice: do a total rewrite to make it better for the player and more rules conform 2016-12-21 18:32:50 +00:00
Hanmac
77437bdb50 Card: hide staticAbilities which are Secondary (probably made by Keyword) 2016-12-21 18:00:12 +00:00
Agetian
930c804b93 - Add a static ability string to card when adding a keyword static ability (fixes Clone on a card with one of those keyword abilities, e.g. Cloning a card with Changeling).
- Simplified CardFactoryUtil::addStaticAbility code.
2016-12-21 15:45:34 +00:00
Agetian
fcad3618e0 - Fixed a NPE when trying to load a Planar Conquest when no conquest has been started yet and the profile folder was not yet created. 2016-12-21 07:58:11 +00:00
Agetian
9e22822dad - Preparing Mobile Forge release 1.5.58.006 (incremental). 2016-12-21 05:12:44 +00:00
Agetian
33c5f4d158 - Correctly identify the paid X for the purpose of building stack descriptions (e.g. fixes Repeal stack desc). 2016-12-20 19:20:45 +00:00
Agetian
7cf2c7e383 - Enforce deck construction limits in the deck editor by unique card name instead of by unique PaperCard. 2016-12-20 17:04:22 +00:00
Agetian
4b46daf963 - AI should not confirm the AF Tap action if nothing at all was targeted by it (prevents e.g. the AI pouring all available mana into Waxmane Baku). 2016-12-20 13:59:53 +00:00
Agetian
ae608246d1 - Reverting the lifelink change for now, better solution needed. 2016-12-20 10:18:06 +00:00
Agetian
3fc05d6940 - Resetting targets not required when changing ValidTgts for Detonate. 2016-12-20 08:40:14 +00:00
Agetian
4d491a6bdf - A [hacky] fix for Detonate that only allows targeting CMC 0 artifacts if Detonate is cast without mana cost (e.g. on Cascade) with X=0.
- Ideally should be done via Annouce$ X by announcing X before starting to cast the spell and presetting it to 0 when cast without mana cost, but that causes massive issues with the AI.
2016-12-20 08:37:04 +00:00
Agetian
d23964106d - Attempting to fix interaction between lifelink on combat damage and replacement effects like Gisela, Blade of Goldnight. 2016-12-20 08:35:06 +00:00
Agetian
c255cb5285 - Fixed copying a SA with no mana cost not setting the WithoutManaCost param which is needed by e.g. Play effect AI to properly determine that the spell should be played without paying its mana cost. 2016-12-20 05:22:37 +00:00
Agetian
7e4ab8d0bb - Fixed Grip of Chaos NPEing when Maze of Ith is used in its presence (and other potential similar NPEs). 2016-12-19 16:47:45 +00:00
Agetian
9f17f2700d - Chandra, Torch of Defiance should show the exiled card to the ability activator prior to asking whether the player wants to play it or not. 2016-12-19 06:06:30 +00:00
Agetian
66da481f45 - Fixed Kalonian Hydra. 2016-12-19 04:56:49 +00:00
Hanmac
875198bed5 TriggerChangesZone: use ArrayUtils.contains to check for String in String[] 2016-12-18 21:15:05 +00:00
Agetian
d07a0913ad - Allow multiple Destinations for TriggerChangesZone (fixes Reyhan, Last of the Abzan). 2016-12-18 18:46:09 +00:00
Hanmac
a2759ace2c Arcbound Fiend: use second mode for MoveCounter, no need for extra Pump Effect for Tgt 2016-12-18 06:35:39 +00:00
Hanmac
0000700320 CountersMoveAi: total refacor of AI class, now it has better logic for Tgt -> Defined and Source -> Tgt and for without Tgt 2016-12-18 06:33:40 +00:00
Hanmac
90ffab69de ClashAi & ManifestAi: use shorter form now for looking at TopCard of Library 2016-12-18 06:28:59 +00:00
Agetian
e8f30ace1e - Formatting imports. 2016-12-18 05:30:24 +00:00
Agetian
9352b7f3ce - A more transparent fix for Kalitas, Traitor of Ghet which does not affect cards such as Aurification, Curse of Stalked Prey and others.
- Adds an extra parameter to Card which stores the last known zone information for the card when it is copied for the purpose of LKI. Thus, things such as the zone and the timestamp of the LKI copy are not affected.
- If the card is not a LKI copy, the last known zone info is assumed to be the current zone the card is in.
2016-12-18 05:29:23 +00:00
Agetian
281e5f12c0 - Hopefully a better solution for the LKI problem: add a special flag to show that the card is a temporary copy and should not be considered as being in play 2016-12-17 20:12:08 +00:00
Agetian
b50183e7c4 - Copy the timstamp over to the LKI copy of a card (may be necessary to "prove" that the card and its LKI copy are the same, e.g. for the purpose of some triggers). 2016-12-17 19:47:07 +00:00
Hanmac
08b984ff4c cards: update cards using UpkeepCost 2016-12-17 18:05:44 +00:00