Myrd
1d1b94e757
[Simulated AI] Teach simulated AI how to choose card modes (e.g. on Charms and Commands).
...
Note: There's still a limitation in the simulated AI where it doesn't know what to do when multiple effects from an ability require targets. This can be addressed in the future to support things like Cryptic Command to both counter a spell and bounce a permanent.
2016-12-29 06:36:08 +00:00
Agetian
c8ad6fe56a
- Code formatting.
2016-12-29 05:24:56 +00:00
Myrd
485623b631
Fix dev mode restoring game state with counters (e.g. planeswalker loyalty).
2016-12-28 21:32:29 +00:00
Myrd
010d958e33
[Simulated AI] I forgot to commit the marked damage test.
2016-12-28 21:31:44 +00:00
Hanmac
54b69e8040
Covenant of minds: move Cleanup to Choice for all choices
2016-12-28 18:57:26 +00:00
Agetian
e597f692e7
- Fixed Covenant of Minds (should not count as draw).
2016-12-28 18:25:00 +00:00
Agetian
823cb6c62a
- Rudimentary implementation of quest draft tournament screen in mobile Forge (feel free to improve).
2016-12-28 17:27:26 +00:00
Hanmac
58db808532
cards: update some cards with GainLife replacement
2016-12-28 15:10:11 +00:00
Hanmac
08a2b54e76
fixed Replacement Effects
2016-12-28 15:01:33 +00:00
Hanmac
3629be1a38
Card & Player: update replaceDamage to use new Replacement Effect (not finished yet)
2016-12-28 14:30:52 +00:00
Hanmac
a8fcc7c464
new ReplacementEffect now handles if it got replaced with something else.
2016-12-28 14:14:41 +00:00
Hanmac
ad8fab8b3f
cards: do Corpsejack Menace as ReplaceEffect too
2016-12-28 10:28:06 +00:00
Agetian
c11c3d5fd1
- Some code tidying in forge-gui-mobile-dev.
2016-12-28 05:26:52 +00:00
Agetian
392066d915
- Only use HiDPI in forge-gui-mobile-dev when running in full screen mode.
2016-12-28 05:25:22 +00:00
Myrd
4b13094945
Remove debug print lines.
2016-12-27 20:24:47 +00:00
Myrd
0cd378b442
[Simulated AI] Fix a bug in my previous changes.
...
resetTargets() needs to be called before tgt.getAllCandidates() so that the currently-set target is also considered.
2016-12-27 20:24:18 +00:00
Myrd
2a6ab7ec26
[Simulated AI] Introduce an optimization that skips evaluating a target for a spell/ability if it's the same as a different target that was already evaluated (e.g. when there's lots of tokens on the field and AI is evaluating removal).
2016-12-27 20:10:59 +00:00
Myrd
8f64ad3638
[Simulated AI] Fix game copy error caused by marked damage not being copied.
...
Since marked damage affects attack/block decisions and this is used for scoring, it resulted in a different score being computed in the sub game, triggering a copy error.
Adds a test.
Also fixes creature power evaluation copy paste error.
2016-12-27 19:11:18 +00:00
Agetian
7f05f08efc
- Change a replace call to a put call to satisfy Android SDK demands (fixes Android Forge compilation).
2016-12-27 19:11:11 +00:00
Agetian
a2cca4cb5a
- Do not crash when an unsupported card is found in a quest save, instead warn about it in the log and do not include the card in the pool (which eventually removes it from the save file).
...
- Might need to do something about CNS Conspiracies and other substandard cards enering the quest pool (e.g. from reward booster packs), which tended to "corrupt" the quest save by introducing cards into the pool which can't be loaded later (and used to crash).
2016-12-27 19:09:32 +00:00
Agetian
e707613ff0
- Fixed Scourge of the Throne
2016-12-27 17:57:43 +00:00
Myrd
1e95e14d6a
Lazy-load cards in GameSimulatorTest to make it exec faster.
2016-12-27 17:56:11 +00:00
Myrd
d64774dba0
Fix commander casting which I broke in r32823.
...
Revert to the original implementation of adding the ability to the Game cache in clone(), but now update this in setHostCard() if the new card comes from a different Game object.
2016-12-27 17:24:59 +00:00
Agetian
2344d02085
- Logic fix related to previous commit.
2016-12-27 12:42:15 +00:00
Agetian
2f121ee34e
- A somewhat more transparent implementation of DelayedTriggerRemembered fix.
2016-12-27 12:35:17 +00:00
Agetian
aaa9bf1a73
- Removed an unused import.
2016-12-27 12:24:52 +00:00
Agetian
1d55b0cf33
- Ported the "Duel a Specific Opponent / Start a Gauntlet" functionality in Booster Draft and Sealed Deck game modes to mobile Forge.
2016-12-27 12:24:07 +00:00
Agetian
16353246cd
- Fixed a mistype in Arcane Denial.
2016-12-27 12:23:14 +00:00
Agetian
47709d4061
- Fixed Arcane Denial, Sapphire Charm and other similar delayed triggers not activating correctly (to make them work it's apparently necessary to check the SA itself first for DelayTriggerRemembered info before searching up the chain in getRootAbility).
2016-12-27 12:21:06 +00:00
Agetian
8024b4567a
- Prevent a possible NPE in TextRenderer#updatePieces (mobile Forge)
2016-12-27 06:54:45 +00:00
Myrd
c34db9cf2d
Remove failing assert from GameSimulatorTest.
2016-12-27 06:47:08 +00:00
Myrd
35014d76f8
Revert my previous change for cloning a SpellAbility.
...
Looks like setHostCard() is being called when the clone gets added to a card. However, previously the SpellAbility was being added to the Game in clone(), which doesn't work if the cloned ability should be part of a different Game - such as in simulation AI code. So, this change moves that to addSpellAbility().
2016-12-27 06:39:25 +00:00
Myrd
7521c33c30
[Simulated AI] Fix issue with empty card names when pretty-printing SpellAbilities.
2016-12-27 04:28:02 +00:00
Myrd
3729533ea9
I think I missed this in my previous commit.
2016-12-27 04:24:59 +00:00
Myrd
0fe2afb3c0
When copying spell-abilities to a new card, update the hostCard.
...
(Not sure what this affects, but noticed that it wasn't being done.)
2016-12-27 04:20:56 +00:00
Myrd
741d38f50b
Make getTargetedString() not have a trailing space.
2016-12-27 04:09:59 +00:00
Myrd
77a526b6d9
[Simulated AI] Fix copying tokens with abilities, like Eldrazi Scions.
...
Also fixes a bug in the main game code where if you have Clone try to copy a token with abilities, like an Eldrazi Scion, it would previously not get those abilities.
Adds a test for the game simulation/copy case.
2016-12-27 04:09:18 +00:00
Myrd
5f634730ff
[Simulated AI] Some cards, like Wild Slash, have targeting as part of their sub-ability.
...
This fixes all the simulated AI logic to correctly look at all the sub-abilities for target choices. However, it still doesn't support multiple sub-abilities with targets.
Also fixes an issue - still with Wild Slash - where the AI would only look at top-level SA restrictions when determining whether a card is playable. For Wild slash, the top-level SA is the ferocious clause - while the 2 damage clause is a sub-ability and doesn't have the same restrictions.
2016-12-27 02:14:40 +00:00
Myrd
eafaaf5088
[Simulated AI] Copy combat when copying game state. This fixes an NPE in AI code that expects the Combat object to exist if we're in the corresponding phase.
2016-12-26 17:28:50 +00:00
Hanmac
3badd1bc15
cards: update TokenDoubler as Replacement Effect
2016-12-26 17:00:08 +00:00
Hanmac
e2eb916d72
make TokenDoubler use new Replacement Effect
2016-12-26 16:57:28 +00:00
Myrd
d3723daa6d
[Simulated AI] Fix game copy error with dashed creatures and add a test.
2016-12-26 16:29:21 +00:00
Myrd
0b7c70230a
[Simulation AI] Fix broken tests.
2016-12-26 16:12:46 +00:00
Myrd
32cb5690d3
Reland r32802 (lazy FaceDown characteristic creation) which had an issue with hasAlternateState() which this revision hopefully fixes.
2016-12-26 16:06:12 +00:00
Hanmac
a67da177ff
add new Replacement Effect its for manipulating the original request
...
Card#addCounter does show how it is done
2016-12-26 13:31:20 +00:00
Agetian
cae93fbc3c
- Preparing mobile Forge publish v1.5.58.009.
2016-12-26 11:10:02 +00:00
Agetian
56b40c960c
- Temporarily reverted r32802 (breaks visualization of transform, flip and meld cards in their alternate state, possibly more). Please feel free to revert this commit and update the solution when possible.
2016-12-26 07:04:20 +00:00
Agetian
1ba2197d2c
- Fixed foil effect corruption on zoomed card images in mobile Forge.
2016-12-26 06:24:31 +00:00
Myrd
4f61ca9f3b
[Simulated AI] Remove limitation of playing spells only in MAIN2 which I added a few commits ago.
2016-12-26 05:42:19 +00:00
Myrd
a78455051d
[Simulated AI] Now that we're pruning the search tree a bit, enable land-play simulation and increase search depth.
2016-12-26 05:34:21 +00:00