Commit Graph

3292 Commits

Author SHA1 Message Date
Michael Kamensky
22b2f30ffb Merge branch 'AICoffinQueen' into 'master'
Will not untap Coffin Queen if already reanimating a creature

See merge request core-developers/forge!204
2018-02-14 03:46:50 +00:00
Michael Kamensky
9a7215a2a2 Merge branch 'AINecrologia' into 'master'
Ai necrologia

See merge request core-developers/forge!205
2018-02-14 03:44:30 +00:00
Michael Kamensky
6d4cc6efcb Merge branch 'bloodyCardTraits' into 'master'
CardTaits: make cardtraits inside LKI has the same id's as the in the original

See merge request core-developers/forge!197
2018-02-14 03:28:25 +00:00
Seravy
ead64864f4 Now it actually works and doesn't break the card.
Marked card AI playable.

Note : This also adds a new function to ComputerUtil,that checks if the AI is in danger of being killed, or if it has a same amount of life remaning - useful for future "pay life" AI decisions.
2018-02-13 18:07:51 +01:00
Seravy
8521387312 AI can play Necrologia 2018-02-13 17:40:03 +01:00
Seravy
3e5b47185e Special case for Null Brooch because it needs to be used even though its cost has a "discard". 2018-02-13 14:59:15 +01:00
Seravy
b5dbb7da90 Countering from abilities will have a 100% chance to get used, unless it costs cards to activate, otherwise normal counter settings are used.
This ensures the AI never wastes an opportunity to counter a spell if it does not cost him a card - holding a "tap to counter target spell" ability for later use is generally bad as the AI cannot determine if they need the mana later or not - but in most cases they don't.

Required for cards Null Brooch and Ertai Wizard Adept in Tempest quest world.
2018-02-13 13:57:30 +01:00
Seravy
03886905bd Will not untap Coffin Queen if already reanimating a creature 2018-02-13 13:03:44 +01:00
Seravy
2b688a99ff Improves AI logic for Hermit Druid
-Will now use at end of enemy turn at 100% chance instead of wasting opportunity to get land and fill grave

Not sure if "RemRandomDeck" is still needed? Card is now safe to play unless the deck has fewer than 4-5 basic lands in it.
2018-02-13 11:19:55 +01:00
Seravy
2ff32d3b90 MIssing ! in the check for nonvigilence creature. 2018-02-13 03:11:18 +01:00
Seravy
76bcbc632e Rearranged to fix rounding problem 2018-02-12 00:03:09 +01:00
Seravy
e04d88977e adding to cards L-Z
Added creatures with low power that have
-abilities that tap for something really valuable like drawing a card
-abilities that usually need to be saved until enemy turn (counter a spell, tap a creature, prevent damage)
-abilities that usually deal equal or more damage if not attacking (prodigal sorcerer, grim lavamancer)
Generally avoided abilities where activating before combat is an acceptable choice and thus the attack decision doesn't come up anyway as the AI already used the ability.
However, this behavior is unacceptable on certain abilities (mostly those with higher mana costs) which should not be used before the end of main 2 as it prevents the AI from actually playing their cards. (like Hanna Ship Navigator)

I suspect this will need quite a bit of improvement in the future but we have to start somewhere.
2018-02-11 22:13:58 +01:00
Seravy
07439cfeeb Exclude creatures with vigilance - attacking does not prevent using the ability 2018-02-11 20:27:03 +01:00
Seravy
15715cec10 Tested and now it works, unfortunately it's not as smart as I originally wanted, but it'll do. 2018-02-11 18:34:33 +01:00
Seravy
3662bb8e84 Implements Feature 2018-02-11 17:31:20 +01:00
Agetian
8a880a3f89 - Simplify a target num check in AiController. 2018-02-11 13:27:11 +03:00
Agetian
670966be57 - Fixed the AI targeting restrictions check in AiController to account for the AILogics that can pre-target cards.
- Added an AI logic for The Scarab God (can be generalized later).
2018-02-11 07:46:38 +03:00
Seravy
3a9af0480d Improves "NonStackingEffect" Svar behavior for the AI.
The AI will now not play a second copy of these cards if and only if, there is no copy of the card owned by that AI in play, except copies that are enchanted by Auras owned by other players.
Later, a better logic that actually determines whether the enchanting aura removes the relevant ability from the card or not should be added - Warp Artifact will not stop a disk from activating, but Arrest will (if it's a creature).

Note : Only add NonStackingEffect to permanents the AI shouldn't play more than one of at a time if and only if, removal of enchantment is not pontentially leathal to the AI.
For example, do not add to Ensnaring Bridge or Moat, as loss of those allows the enemy to swing with possibly accumulated large armies for likely too much damage.
Those cards will need a different logic, that avoids playing a second copy if and only if the threat the card protects from is already too dangerous.
2018-02-10 23:21:03 +01:00
Hanmac
2e196fc41b CardTaits: make cardtraits inside LKI has the same id's as the in the original object\nReplaceMoved now works with Blood Moon and Blood Sun 2018-02-10 18:50:22 +01:00
Seravy
0fe8c1f121 AI will activate ~DestroyAll~ abilities during combat if it would lose the game, or it would take too much damage (Nevinnyrral's Disk, Pernicious Deed) 2018-02-10 13:30:22 +01:00
Agetian
647e9f6a14 - Got rid of an esoteric component for logging, switched over to standard err printout like it's done in most other places. 2018-02-08 15:28:50 +03:00
Hanmac
ff7a0f1ae6 Regeneration Rework:
- Regenerate or RegenerateAll does create an Effect
in Command which does replace Destroy if possible
- Trigger Regenerated will be added to the Effect
if something does care about "regenerated that way"
- new Regeneration Api is the internal effect
that does handle the actual regeneration
- ReplaceDestroy has Section to handle if Regeneration is possible
- CardShields are removed with the option in PlayerController
2018-02-06 12:56:02 +01:00
Agetian
ecd4a5dedd - Fixed the AI trying to e.g. Embalm a Vizier of Many Faces ignoring the NeedsToPlay SVar requirement. 2018-02-04 20:24:51 +03:00
Agetian
369c4f77a0 - AiController: a more robust check for potential targets in order to avoid the AI activating an ability it can't legally target due to restrictions (e.g. Wicked Akuba). 2018-01-30 19:26:14 +03:00
Agetian
b763e06560 - AiAttackController: Don't check targeting restrictions if the ability doesn't target. 2018-01-30 08:45:25 +03:00
Agetian
2447ea4fb0 - AiAttackController/AiBlockController: do not count activated abilities that can't target the attacker/blocker when trying to predict P/T bonus from AF Pump (fixes the AI suicide attacking/blocking with cards like Pia Nalaar) 2018-01-30 08:45:25 +03:00
Agetian
b0037faa11 - Fixed an AI logic error in CountersPutAi which caused the AI to buff the opponent's creatures with Incremental Growth. 2018-01-27 19:34:11 +03:00
Agetian
1e59b75d08 - Don't order cards from Discard<0/Hand> if there's only one card going to graveyard.
- Allow to order the cards going to graveyard from Discard<X/Random>.
2018-01-24 16:53:30 +03:00
Agetian
bfef8b125c - Fixed the cost "discard your hand" not allowing to order the cards going to graveyard when and if needed. 2018-01-24 16:41:12 +03:00
Agetian
714f21913b - Method name unification. 2018-01-24 09:14:08 +03:00
Agetian
6e1733821c - Somewhat better logic for Glimmer of Genius, part 2. 2018-01-24 09:07:00 +03:00
Agetian
2be734f137 - Somewhat better logic for Glimmer of Genius. 2018-01-24 08:23:28 +03:00
Agetian
89184b97dd - ScryAi: Glimmer of Genius -> at opp EOT 2018-01-23 23:50:48 +03:00
Agetian
ce35c6232e - Simple AI logic for Explore with a target (e.g. Enter the Unknown), fixes the AI wasting its activation. 2018-01-23 18:17:36 +03:00
Agetian
2e51375c0f - Somewhat less risky logic for the AI Glimmer of Genius (otherwise it manalocks itself too much) 2018-01-23 18:03:31 +03:00
Agetian
4b5a555c1e - Fixed the AI overtargeting cards like Hunt the Weak and Savage Stomp and failing to add the card to stack. 2018-01-21 16:38:45 +03:00
swordshine
c0ae7f42d9 - Added Orzhov Advokist (still need improved ai logic) 2018-01-17 13:47:03 +08:00
Chris H
c87a2bff23 Manually update Pom files and release changes to be ready for next release 2018-01-15 13:57:46 -05:00
swordshine
e050a62b0c - Added Slaughter the Strong 2018-01-13 16:21:59 +08:00
swordshine
a12eedfa93 - Added cost for Timestream Navigator 2018-01-13 10:30:20 +08:00
swordshine
356bd9c635 - Fixed P/T of two cards 2018-01-11 21:07:53 +08:00
Hanmac
c888a09a40 AscendEffect: add Effect to add Blessing to Player 2018-01-07 18:56:52 +01:00
KrazyTheFox
6d5e56f6bf Normalize line endings 2017-12-28 23:40:29 -05:00
Agetian
f08a0eaffd - Added a new Puzzle Mode game state flag, "NoETBTrigs", which allows you to ignore the ETB triggers and replacement effects for a card when necessary.
- Fixed a bug that made it tricky to add several precast flags to a puzzle due to absence of whitespace trimming.
- Added puzzles PC_012616 and PC_020216 by Xitax.
- Updated the puzzle PC_122915 to set itself up automatically without being obnoxious.
2017-12-21 06:11:21 +00:00
Agetian
013cd0a9a8 - Added puzzle PC_122915 by Xitax (has some start-of-the-game quirks, documented in the description for now, may be addressed later). 2017-12-04 05:30:59 +00:00
Blacksmith
946a360652 [maven-release-plugin] prepare for next development iteration 2017-12-03 15:21:13 +00:00
Blacksmith
071fe9a910 [maven-release-plugin] prepare release forge-1.6.5 2017-12-03 15:21:05 +00:00
Hanmac
c5fad910ba remove use of CardFactory.copyCopiableAbilities, it is already done by copyCopiableCharacteristics 2017-11-19 09:02:38 +00:00
Agetian
164e6656e8 - Pump AILogic ContinuousBonus: don't target opponent's creatures. 2017-10-25 04:28:37 +00:00
Hanmac
2030ffcea3 KeywordApocalypse: return KeywordInstance whenever possible 2017-10-23 19:54:12 +00:00