Commit Graph

2301 Commits

Author SHA1 Message Date
Sloth
8e5b5c8b4f - Little improvement for the sortManaAbilities function. 2014-09-13 19:12:21 +00:00
drdev
d028c1e235 Make logic smarter for sorting cards to use for auto-payment of mana abilities 2014-09-13 17:24:46 +00:00
drdev
3ffa15019f More code cleanup 2014-09-13 16:43:44 +00:00
drdev
9fc3798e30 Code cleanup 2014-09-13 16:38:51 +00:00
drdev
93447295d7 Fix warnings 2014-09-13 16:32:07 +00:00
elcnesh
295423050b Merged changes from trunk to GuiRefactoring: 27297-27319. 2014-09-13 07:53:24 +00:00
Krazy
46b9dd67ab Fix for cards such as Nykthos, Shrine to Nyx causing NPEs when being sorted for AI mana payment. 2014-09-12 21:49:50 +00:00
elcnesh
c3e9ff7e5b Merged changes from trunk to GuiRefactoring: 27266-27293; plus some minor fixes. 2014-09-12 11:07:11 +00:00
Agetian
05729db2d0 - Removed an outdated comment. 2014-09-12 04:20:58 +00:00
Sloth
f0633ad5b7 - Fixed AI playing Molting Harpy and friends without being able to pay the upkeep next turn. 2014-09-11 20:10:02 +00:00
elcnesh
1ba2cb498b HUGE update to the GUI refactoring, fixing most known bugs and making everything run a lot faster and smoother.
Fixed: exceptions during combat, display of face-down cards, searching libraries, mindslaver effects, and more.
2014-09-11 15:46:33 +00:00
Agetian
7455437fc8 - The AI will move equipment off of creatures that are no longer controlled by the AI. 2014-09-10 03:49:31 +00:00
Agetian
072fc12d1d - Some extra NPE protection. 2014-09-09 18:37:31 +00:00
Agetian
7e7a069455 - Added a new AI profile property: MOVE_EQUIPMENT_TO_BETTER_CREATURES. Defines whether the AI will always move equipment to better creatures if it has mana ('always'), only move if the currently equipped creature becomes useless ('from_useless_only'), or never moves equipment around ('never').
- Added a new AI profile: Tricky (doesn't mulligan too heavily, moves equipment around from useless creatures).
- Default AI profile will not move equipment around (similar to how Forge operated before this change).
- Reckless AI profile will always move equipment to new more powerful creatures if it has enough mana and doesn't have other Main 2 plans.
- Some related refactoring.
2014-09-09 18:34:11 +00:00
Agetian
3173e330fa - Improved AttachAi such that the AI can choose to equip a different creature with an equipment that was already placed on a creature before. Currently set to make sure to hold mana for a predicted spell to cast in Main 2. Will help along with better use of equipment once equipped creatures get Arrest'ed or when a more powerful creature is played and the equipment is better used elsewhere. 2014-09-09 17:38:52 +00:00
elcnesh
ecdd2b2995 Merged changes from trunk to GuiRefactoring: 27239-27260 2014-09-09 09:30:57 +00:00
Agetian
38bd41cec6 - Added a special AI logic to guild lands such that the AI does not bounce played guild lands back to hand with their own triggered ability. 2014-09-09 05:46:49 +00:00
drdev
221b084679 Add Auto support for paying X mana costs 2014-09-07 15:24:14 +00:00
elcnesh
5925c35486 Merged changes from trunk to GuiRefactoring: 27198-27235 2014-09-07 09:27:46 +00:00
Agetian
160d23f3d4 - Removed a superfluous comment. 2014-09-07 05:59:56 +00:00
Agetian
e65adb6dff - Improved the AttachAi to account for cases when attaching a card is useless even though basic evaluation of the target may show otherwise (e,g, it's useless to equip a creature if this creature can't attack or block or if it's tapped and won't untap normally during the untap step, even if the said creature is evaluated as the best creature for its high CMC in ComputerUtilCard.evaluateCreature). 2014-09-07 05:56:20 +00:00
drdev
fe63fd8925 Code cleanup 2014-09-05 22:20:34 +00:00
drdev
162435ca52 Fix so Oracle Text appears on fallback image for copies 2014-09-05 14:18:16 +00:00
Agetian
b834a03172 - Added a way for the AI to ignore the fact that the mana sources have been reserved in case some high priority spell needs to be cast (e.g. for the cases where a regen ability has to be activated for a creature but all the mana has previously been reserved for a future spell). Currently not very smart, basically considers everything "high priority" except for the +X/+X pumps that the mana is initially reserved for. Feel free to improve. 2014-09-05 13:52:22 +00:00
Agetian
cfcb0b7549 - Refactored the code that deals with holding mana sources for spells. Still need to figure out where to best place the decision to hold mana so that the AI is not too conservative in its plays related to useful pump spells. 2014-09-05 06:20:28 +00:00
Agetian
aa6c0e9208 - Renamed a method to be more self-explanatory. 2014-09-05 04:27:03 +00:00
Agetian
e2b8c5156d - Renamed a method to be more self-explanatory. 2014-09-05 04:26:23 +00:00
Agetian
2b9a8bf05b - Fixed a bug that caused an illegal cast when the AI wrongly tried to determine if it has reserved mana sources for creatures on the human's side of the battlefield.
- General code cleanup related to the reserved mana sources code.
2014-09-05 04:21:25 +00:00
Agetian
a481c0b536 - Highly experimental: added a way for the AI to reserve mana for casting a Main 2 phase spell when deciding whether to pump a creature or not. This may not be optimal and probably needs refactoring as well. It's a somewhat drastic changes so bugs may arise (though the main use cases were tested). Please assist if possible. 2014-09-04 20:18:48 +00:00
Agetian
8041d7a440 - Temporarily commented out the parts of AI card memory code that will not be used in the nearest future. 2014-09-04 13:56:27 +00:00
Agetian
90367cbc93 - Simplified the AI card memory interface. No more need to store the reference to a player and complicate matters with individual memory sets for each player. 2014-09-04 13:53:26 +00:00
Agetian
10bc6f92b7 - Added a basic card memory mechanism that allows the AI to temporarily mark certain cards in game zones for future decisions.
- Added a way for the AI to mark temporarily stolen creatures that return to the original controller at end of turn as "mandatory attackers" so that the AI doesn't miss the opportunity to attack with a creature that will otherwise be worthless for the AI.
2014-09-04 12:12:07 +00:00
Krazy
6418962357 Small update to further improve mana ability ordering. Multi-mana producing cards are given even lower priority. 2014-09-01 20:41:52 +00:00
Krazy
c1eada4c21 Made the AI smarter in picking which mana abilities to use. Pain lands will only be used when necessary, creatures will be tapped last, and abilities that produce multiple mana will be left available, among other possible interactions. 2014-09-01 20:31:23 +00:00
excessum
fa857b7d38 - AI will bounce the attacker to save its blocker(s) instead of bouncing the blocker(s) 2014-09-01 12:45:14 +00:00
drdev
45942de46f Support showing command zone inline with lands instead of in a tab 2014-09-01 04:12:42 +00:00
Agetian
abacd41e47 - For now, only keep pumping the creature if it actually increases its effective power. 2014-08-29 06:55:37 +00:00
Agetian
ccf04c97e6 - An experimental update to PumpAiBase that allows the AI to pump attackers when they will be left unblocked or when the pumped attacker is not predicted to be destroyed in combat. 2014-08-29 05:37:15 +00:00
Sloth
ee500cb6bd - Fixed AI using Glowing Anemone. 2014-08-26 07:14:32 +00:00
excessum
de1d214a16 - Basic fix for PumpAiBase.shouldPumpCard() to enable the AI to use abilities that grant "Lifelink" 2014-08-23 12:18:26 +00:00
excessum
19b50b4ff8 - Improved logic for AiAttackController.toProtectAttacker() and added documentation 2014-08-23 08:10:35 +00:00
elcnesh
f51e767e6b Fix possible NPE in having a player select from a list. 2014-08-18 13:05:08 +00:00
elcnesh
8be5331329 Use calculateAmount as these values may not be integers. 2014-08-16 07:51:51 +00:00
Sloth
4661a6f18e - Fixed "AILogic$ Never" in PumpAI. 2014-08-16 06:40:38 +00:00
Sloth
545666f7c9 - Added basic AI support for Helm of Obedience. 2014-08-13 20:55:54 +00:00
Sol
566b1955f9 - Forgot to add AI handling for Iterative Analysis 2014-08-12 11:58:07 +00:00
elcnesh
0d534be21e Add code allowing text-changing effects (+some cleanup). 2014-08-11 09:22:18 +00:00
drdev
7d77e2007c Make end turn button meet player's expectations by skipping the attack phase and not requiring you to respond to triggers 2014-08-10 04:19:54 +00:00
Sloth
90c318ef91 - Added a safety check for invalid blocks at the end of assignBlockers AI. 2014-08-08 07:00:47 +00:00
swordshine
d1c0340bfc - Added Drain Power 2014-08-07 12:21:16 +00:00