Commit Graph

36673 Commits

Author SHA1 Message Date
Seravy
465066c04c Had to move this part to a new "AvoidTargetP" function - shouldtargetP is not absolute, the AI still targets the player if there is no better target move, but we want it to not use the ability instead. 2018-02-14 19:20:57 +01:00
Seravy
668eaa1a7c Orcish Artielly marked as self damage
Will now target players if granted Lifelink or equivalent even if otherwise would not - self damage is not a concern
Are there any other cards that need AILogic "SelfDamage" or Svar "LikeLifeLink" added? If you are aware of any, please add!
2018-02-14 18:20:04 +01:00
Seravy
0bed673340 Do not use Fireslinger on players if our life lower
Do prefer targeting the player if has a "when this deals damage to an opponent" trigger

Important : The AI should be able to recognize the ability stacks - if there are multiple cards that deal damage, they should be used to kill the target together. (for example, tap two prodigal sorcerers to kill a 2/2 creature!)
Unfortunately, I don't think I can implement this with my current knowledge.
2018-02-14 18:06:13 +01:00
Seravy
13f606999c Improved playing conditions 2018-02-14 16:32:50 +01:00
Seravy
b0677ca006 Merge branch 'DumpTurn' into PriceOfProgress 2018-02-14 16:14:22 +01:00
Seravy
22846db1a3 Dump/Setup game state will now save current game turn.
Needed to test cards and AI that care about how many turns it have been since the start of the game.
2018-02-14 16:13:44 +01:00
Seravy
c9b634a274 fixed order of operations 2018-02-14 14:09:18 +01:00
Seravy
c37a492cb7 Was in wrong file, moved 2018-02-14 13:27:17 +01:00
Seravy
92f663c753 AI for Price of Progress 2018-02-14 13:25:13 +01:00
Seravy
35a2f9bf2b Fixes Ghouls - this one benefits the player with the MORE cards, not less. 2018-02-14 12:46:09 +01:00
Michael Kamensky
2dcf4b23b7 Merge branch 'AIDestroyAllInDanger' into 'master'
AI will activate ~DestroyAll~ abilities during combat if it would lose the game,…

See merge request core-developers/forge!206
2018-02-14 03:48:09 +00:00
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
Jamin W. Collins
45a0c54fb8 Define getter for TrackableObject props
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2018-02-13 18:44:28 -07:00
Jamin W. Collins
e8c9c8b90c Define getter for ClientGameLobby
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2018-02-13 18:41:56 -07:00
Jamin W. Collins
367fcad53c Define getter for GameView
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2018-02-13 18:38:58 -07:00
Jamin W. Collins
3a6c5b0cd5 Allow arbitrarily setting a Tracker
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2018-02-13 18:36:19 -07:00
Jamin W. Collins
375adab087 gracefully handle failure to connect to server
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2018-02-13 18:33:25 -07:00
Jamin W. Collins
fbf0f98c3a Limit team editing to each player
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2018-02-13 18:30:58 -07:00
Jamin W. Collins
711342829b Improve interruption messaging
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2018-02-13 18:28:47 -07:00
Jamin W. Collins
daf3be6346 Improve reported multiplayer host IP
The existing IP selection logic was less than optimal on Linux hosts
where it would frequently select and report 127.0.0.1 as the IP address
to share.  The new logic will create a datagram socket, use it to locate
an interface with a default route, and further backtrack to the
interface's IPv4 address.

Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2018-02-13 18:16:10 -07:00
Seravy
06edf9351a Oath of Druids, Oath of Lieges, Oath of Ghouls
Do not play if the enemy would immediately benefit from them in their upkeep.
2018-02-14 01:06:46 +01: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
Sol
f01282f12f Merge branch 'patch-6' into 'master'
Several updates to formats.txt

See merge request core-developers/forge!203
2018-02-13 03:06:11 +00:00
Sol
5e5fca9722 Merge branch 'LifeTotalBonusOption' into 'master'
Life total bonus option

See merge request core-developers/forge!176
2018-02-13 02:57:25 +00:00
Seravy
2ff32d3b90 MIssing ! in the check for nonvigilence creature. 2018-02-13 03:11:18 +01:00
Seravy
3b72bd18f0 Now quest data needs to be saved when changing decks, instead of quest preferences. 2018-02-13 02:14:42 +01:00
Rob Schnautz
fcb7f89001 typo (Trace Secrets > Trade Secrets) 2018-02-13 00:49:25 +00:00
Rob Schnautz
38cebf52c3 missed a couple 2018-02-13 00:48:05 +00:00
Seravy
56983b2553 Moves "Current_Deck" from Quest Preferences to Quest Data.
Without this, the selected deck name was global for all quests - switching to another quest retained the deck name from the previous quest
and if the new quest had a deck with the identical name, selected that one, otherwise selected nothing. (in one weird case, this resulted in quest data that crashed caused bugs when loading forge - as quest was saved with a selected deck from another quest data.)
Preferred behavior is to select the deck that was last selected in THAT QUEST when switching to another quest.
2018-02-13 01:37:00 +01:00
Rob Schnautz
04b347b968 we're not ready for block formats 2018-02-13 00:21:21 +00:00
Rob Schnautz
08a87ea112 Add conspiracy and ante cards to ban lists, update Standard, Modern, and Commander. Modern list is officially effective the 19th, all the rest is current. Add block formats. Reorder formats in the same order shown on the website. Move Extended to the end. To do: remove Extended. 2018-02-12 23:56:45 +00:00
Seravy
67e8046af6 Remove the line that resets the selected deck index to 0, so the next time the deck tab is opened, it autopicks the first deck instead of keeping what was last chosen. 2018-02-13 00:43:26 +01:00
Sol
dc11fad342 Merge branch 'QuestDraftRotation' into 'master'
Quest draft rotation

See merge request core-developers/forge!179
2018-02-12 03:06:40 +00:00
Seravy
8f9857e72d Fixing Planeshift set alter foils in boosters
-Now always foil, and with the (guesstimated) correct chance.
2018-02-12 01:11:03 +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
Hanmac
3e613a8b80 cards: remove triggerZones from Unequip trigger, it doesn't work with ChangeZoneAll effects 2018-02-11 21:04:49 +01:00
Seravy
1f364168e8 adding to cards D-K 2018-02-11 20:55:44 +01:00
Seravy
07439cfeeb Exclude creatures with vigilance - attacking does not prevent using the ability 2018-02-11 20:27:03 +01:00
Seravy
94eda92d21 Adding to cards A-C 2018-02-11 20:15:51 +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
Sol
14fc75be44 Merge branch 'QuestDraftSetFix' into 'master'
Quest draft set fix

See merge request core-developers/forge!174
2018-02-11 15:18:12 +00:00