Commit Graph

26 Commits

Author SHA1 Message Date
ThePenguinMan96
e40c2b21f2 Channel Cancel checks for Channeled AOE DPS Spells
Hello everyone,

I liked the channel cancel I did on mage recently, where they cancel blizzard if there is only 1 enemy left. I decided to do the same for the following classes:

Druid: Hurricane
Hunter: Volley
Priest: Mind Sear
Warlock: Rain of Fire

I moved the "ChannelCancel" action to it's own file, so other classes could benefit from it. I removed it from the mageactions.
2025-07-28 01:35:56 -07:00
ThePenguinMan96
96cc0daea6 Hunter/Warlock AoE Fix (#1440)
Hello everyone,

This fixes these two classes so they respond to the command "co -aoe" and "co +aoe". This also fixes the survival hunter so that trap weave is not a default strategy - they will not walk into melee anymore.
2025-07-14 10:15:11 +02:00
ThePenguinMan96
8ca4ab1344 Hunter Overhaul
Hello everybody,

I saw that the hunter class had one strategy for all 3 specs, and decided to create specialized strategies for each one. Here is a list of the changes:

conf\playerbots.conf.dist: Redid the talent trees and glyphs slightly, for more consistent dps

src\AiFactory.cpp: Changed the default strategies assigned for each spec.

src\strategy\hunter\BeastMasteryHunterStrategy.cpp and src\strategy\hunter\BeastMasteryHunterStrategy.h: Strategy for BM hunters. Includes all of the original logic from DpsHunterStrategy, with the addition of kill command, bestial wrath, and intimidation.

src\strategy\hunter\DpsHunterStrategy.cpp and src\strategy\hunter\DpsHunterStrategy.h: Old Dps strategy used for all 3 specs - removed.

src\strategy\hunter\GenericHunterStrategy.cpp and src\strategy\hunter\GenericHunterStrategy.h: Tidied up code, added Dragonhawk passthrough to hawk, moved rapid fire to inittriggers for generichunterstrategy and increased its priority (it is still a boost trigger, so it will function the same).

src\strategy\hunter\HunterActions.cpp:
Added isuseful check for aspect of the hawk, to ensure it is never cast if the bot knows aspect of the dragonhawk.
Added isuseful check for arcane shot to never use it after explosive shot is learned (so the hunter can use it as it levels survival, but drops it after that). Also added a check for arcane shot, so it won't use it above 435 armor pen rating (steady shot is superior after this arp).
Added isuseful check for immolation trap so it won't use it after explosive shot is learned.

src\strategy\hunter\HunterActions.h:
General cleanup/alignment of actions based on type.
Added TTL checks to all DoTs and debuffs - hunters weren't using hunter's mark, serpent sting, black arrow, explosive shot on enemies that it thought would die too soon.
Black Arrow - added a strategy check here as well so the bot won't use it at all if trap weave is enabled. There was already a check in the trigger, but it was still getting cast, so I added this check.
Explosive Shot Rank 4, 3, 2, 1 actions- Added these so the hunter can downrank explosive shot dynamically based on the level when lock and load procs. So if the hunter is level 70, and a lock and load proc happens, it will fire rank 2 - rank 1 - rank 2, similar to how the level 80 version will fire 4-3-4.

src\strategy\hunter\HunterAiObjectContext.cpp:
Added strategy support for bm, mm, and surv (and their aoes)
Added trigger support for kill command, explosive shot, lock and load, silencing shot (as an spellcasting interrupt), and intimidation
Added action support for the 4 ranks of explosive shot and intimidation.

src\strategy\hunter\HunterTriggers.cpp: Kill command was completely non-functional because there was no buff trigger associated with it. Adding this will correct that, and the hunter will use kill command.

src\strategy\hunter\HunterTriggers.h: Added Kill command, silencing shot, intimidation, lock and load, and explosive shot triggers.

src\strategy\hunter\MarksmanshipHunterStrategy.cpp and src\strategy\hunter\MarksmanshipHunterStrategy.h: Strategy for MM hunters. Includes all of the original logic from DpsHunterStrategy, with the addition of kill command, silencing shot, chimera shot, and aimed shot.

src\strategy\hunter\SurvivalHunterStrategy.cpp and src\strategy\hunter\SurvivalHunterStrategy.h: Strategy for Survival hunters. Includes all of the original logic from DpsHunterStrategy, with the addition of kill command, explosive shot, black arrow, aimed shot, lock and load triggers + downranking explosive shot.
2025-07-11 17:10:03 -07:00
Yunfan Li
24efa7efa2 General improvement on init and strats (#1064)
* Potions strats and potions init

* Druid and shaman spell in low level

* Ammo init improvement

* Rogue low level

* Fix melee attack action (for caster with no mana)

* Disable pet spells that reduce dps

* Talents improvement

* Remove CanFreeMove check

* Reduce penalty for non-dagger weapon for rogue
2025-03-08 12:36:06 +01:00
avirar
a0278f1efb Hunter ammo equip bug and other issues with BuyAction.cpp (#986)
Resolves #947

Equip logic was failing as projectiles were never returning ITEM_USAGE_EQUIP in ItemUsageValue.cpp, added two cases where equip is returned:

If no ammo is currently set
If new ammo has higher DPS than old/currently equipped ammo
While testing this using "b [itemlink]" and "b vendor" to purchase arrows I noticed some issues with BuyAction.cpp and have resolved them:

Bots will now perform the "equip upgrades" action for any bought item that has an equip usage
When using "b vendor" to buy all useful items from vendors within interaction distance, it now sorts the list of available items by calculated item score and buys the highest scoring item (if it is higher than the currently equipped item) for each slot. It should not buy multiple items for the same slot anymore, saving gold/emblems/etc.
"b vendor" will now only attempt to buy 1 of each item. Consumable and projectile item types can be bought up to 10 times per execution as long as it is still useful to buy the item in each iteration of the for loop. All items were following this behaviour previously and since the equip command was only given after the for loop it would buy 10 of an item before triggering it wasn't useful to buy more.
And finally, resolved issues where a bot runs out of ammo mid-fight:

Re-enabled combat and non-combat "no ammo" strategies to perform "equip upgrades" action.
Modified GenericTriggers.cpp; AmmoCountTrigger::IsActive to return true when the bot has ammo but it is not equipped yet.
2025-02-21 18:32:10 +01:00
Yunfan Li
bb729e35b9 Fix stuck on knockback, enhance movement & flee and trap weave strats (#980)
* Hunter trap weave strats

* Do not allow actions to stack

* Remove trap weave by default

* Refactor on Engine

Co-authored-by: SaW <swerkhoven@outlook.com>

* Remove unused funcs in Queue

* Remove ExpireActionTime config

---------

Co-authored-by: SaW <swerkhoven@outlook.com>
2025-02-18 22:55:44 +08:00
Yunfan Li
406949f6dd Misdirection and tricks of the trade 2024-09-04 20:08:44 +08:00
Yunfan Li
a1cb9dea05 Improve class spell and use trinket 2024-08-14 18:37:21 +08:00
Yunfan Li
264c533d1f Fix move delay and reach combat 2024-08-06 00:44:50 +08:00
Yunfan Li
085b2e7f19 Improve containsstrategy performance 2024-08-05 22:07:07 +08:00
Yunfan Li
53611c9040 Run clang-format 2024-08-04 10:23:36 +08:00
Yunfan Li
51a88063f8 [Class spell] Hunter auto shot 2024-06-23 16:29:46 +08:00
Yunfan Li
aab51a8182 Spell casting 2024-03-12 18:39:23 +08:00
Yunfan Li
2a44fb1885 Merge branch 'master' of github.com:liyunfan1223/mod-playerbots 2023-12-25 18:49:05 +08:00
Yunfan Li
98c87300b0 Better too close distance calculation 2023-12-24 11:54:34 +08:00
Yunfan Li
111109b112 Raise flee action relevance 2023-12-22 00:05:09 +08:00
Yunfan Li
9dab10a5df Hunter melee 2023-12-19 20:10:43 +08:00
Yunfan Li
748801b10b fix action node factory 2023-11-10 20:10:03 +08:00
Yunfan Li
7063e5e00b remove meaningless flee 2023-11-10 19:46:48 +08:00
Yunfan Li
e93b1edcd5 fix strategies conflict for rndbot 2023-07-30 14:33:52 +08:00
Yunfan Li
98e46a3d02 miscs(raid strategy, distance triggers, etc) 2023-06-06 00:11:35 +08:00
Yunfan Li
2ad567a1a8 Flee action, factory setting 2023-05-29 11:45:18 +08:00
qudzy
15e3e452d8 Encourage hunter bots to use auto shot 2022-06-01 22:52:32 +02:00
whipowill
92ce54a3cd Compile bug fixes. 2022-05-20 12:41:13 -05:00
whipowill
9a6709f5c1 Compile bug fixes. 2022-05-18 17:03:01 -05:00
UltraNix
b952636f0d Big update. 2022-03-12 22:27:09 +01:00