Commit Graph

39 Commits

Author SHA1 Message Date
ThePenguinMan96
aa6f8153a1 Tame Chat Action / Pet Chat Action (stances/commands)
Hello everyone,

I am on a quest to make bot's pets completely functional, focuses on solving issues #1351 , #1230 , and #1137 . This PR achieves the following:

1. Changes the current "pet" chat command to "tame", which is more intuitive that only hunters can use it. The modes are "tame name (name)", "tame id (id)", "tame family (family)", "tame rename (new name)", and "tame abandon". Tame abandon is new - it simply abandons the current pet. Also, now, if you type in "tame family" by itself, it will list the available families. See pictures below for examples.
2. Added new "pet" chat command, with the following modes: "pet passive", "pet aggressive", "pet defensive", "pet stance" (shows current pet stance), "pet attack", "pet follow", and "pet stay". Previously, the pet's stance was not changeable, and there were some less than desired effects from summonable pets - see the issues above.
3. New config option: AiPlayerbot.DefaultPetStance, which changes the stance that all bot's pets are summoned as. This makes sure when feral spirits or treants are summoned by shamans and druids, they are immediately set to this configured stance. Set as 1 as default, which is defensive. (0 = Passive, 1 = Defensive, 2 = Aggressive)
4. New config option: AiPlayerbot.PetChatCommandDebug, which enables debug messages for the "pet" chat command. By default it is set to 0, which is disabled, but if you would like to see when pet's stances are changed, or when you tell the pet to attack/follow/stay, and when pet spells are auto-toggled, this is an option. I made this for myself mainly to test the command - if anyone notices any wierd pet behavior, this will be an option to help them report it as well.
5. Modified FollowActions to not constantly execute the petfollow action, overriding any stay or attack commands issued.
6. Modified GenericActions to have TogglePetSpellAutoCastAction optionally log when spells are toggled based on AiPlayerbot.PetChatCommandDebug.
7. Modified PetAttackAction to not attack if the pet is set to passive, and not override the pet's stance to passive every time it was executed.
8. Modified CombatStrategy.cpp to not constantly issue the petattack command, respecting the "pet stay" and "pet follow" commands. Pets will still automatically attack the enemy if set to aggressive or defensive.
9. Warlocks, Priests, Hunters, Shamans, Mages, Druids, and DKs (all classes that have summons): Added a "new pet" trigger that executes the "set pet stance" action. The "new pet" trigger happens only once, upon summoning a pet. It sets the pet's stance from AiPlayerbot.DefaultPetStance's value.
2025-08-01 01:18:16 -07:00
Boxhead78
309d177dd8 Battleground Rewrite
- Refactored BattleGroundTactics.cpp
- Bots choose strategies to determine if they are more aggressive or defensive in objectives
- Largely improved bots tactics in WSG, AB, AV and EY
- Improved how bots chase flag carriers
- Fixed some bots stuck in action loops - especially in WSG and AV
- Fixed several other Bugs
2025-07-03 08:25:55 +02:00
ThePenguinMan96
00cc2468f1 Warlock overhaul (#1397)
This is a complete overhaul of the warlock class, making 3 new strategies (affliction, demonology, and destruction), as well as finishing the warlock tank strategy (shadow ward and searing pain). It also includes a soulstone fix, where the bots can change who they soulstone based on the non-combat strategies you set for them. It also includes a self-resurrect action and trigger that allows the bots to resurrect using a soulstone or reincarnation. Many other skills were added to finish out the warlock skillset.
2025-06-27 20:00:38 +02:00
kadeshar
3d6d454337 Stay strategy improvement (#1072)
* - Stay Strategy work in combat and with RTSC

* - Fixed summon with stay strategy

* - Added new stay strategy support for chat commands
2025-03-20 10:53:16 +01: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
bc33851189 Mage improvement (fire mage aoe) 2025-01-19 20:06:10 +08:00
Yunfan Li
008d098eda [Assist Dps] Healer assist dps strats 2024-10-04 14:14:16 +08:00
Yunfan Li
f20d3aea6c Unholy dk 2024-09-06 20:29:56 +08:00
Yunfan Li
406949f6dd Misdirection and tricks of the trade 2024-09-04 20:08:44 +08:00
Yunfan Li
4c77f71bd4 Cat druid energy control 2024-09-02 00:30:10 +08:00
Yunfan Li
52bb8b9770 General trigger fix 2024-09-01 17:19:12 +08:00
Yunfan Li
a1cb9dea05 Improve class spell and use trinket 2024-08-14 18:37:21 +08:00
Yunfan Li
53611c9040 Run clang-format 2024-08-04 10:23:36 +08:00
Yunfan Li
05e799cff4 [Class spell] Improve warrior, dk, paladin 2024-07-13 11:41:16 +08:00
Yunfan Li
9e78a0b36a Pet attack (fix shadowfiend) 2024-02-08 00:36:16 +08:00
Yunfan Li
3c2bc1c959 quest share 2023-12-18 20:29:48 +08:00
Yunfan Li
4e56008b61 more configurations 2023-10-07 22:12:02 +08:00
Yunfan Li
a24e60f03d facing to & reach party member to resurrect 2023-09-14 23:29:09 +08:00
Yunfan Li
243a4df967 optimize class spell 2023-09-08 12:44:38 +08:00
Yunfan Li
5e676e60e0 debuff on attacker 2023-09-05 01:41:13 +08:00
Yunfan Li
b4a5736c02 time unit for expected lifetime 2023-09-05 00:56:12 +08:00
Yunfan Li
7e1de0b9cf life time check for debuff spell & cast time spell 2023-09-04 17:04:59 +08:00
Yunfan Li
14b94e20fb major class spells 2023-09-02 22:37:11 +08:00
Yunfan Li
1136b7bfdc debuff on melee attackers 2023-08-28 17:28:36 +08:00
Yunfan Li
46b94824e4 miscs: movement, coredump fix, rndbot 2023-08-02 16:16:56 +08:00
Yunfan Li
fca4d17c97 test: ms_time 2023-08-02 03:46:15 +08:00
Yunfan Li
9c1bb63d10 razuvious strategy 2023-07-18 21:00:49 +08:00
Yunfan Li
98e46a3d02 miscs(raid strategy, distance triggers, etc) 2023-06-06 00:11:35 +08:00
Yunfan Li
e68a22d968 mage and paladin strategy port 2023-06-03 20:16:35 +08:00
Yunfan Li
0f483047e5 warlock and dk strategy port 2023-06-03 14:01:20 +08:00
Yunfan Li
a44b310c0a debuff trigger and action, allow multiple spell 2023-06-02 19:57:08 +08:00
Yunfan Li
25da0af70e tank target, formation arrow, mount fix, miscs 2023-06-02 15:49:49 +08:00
Yunfan Li
d45a7dc5b8 fix party member dispel. 2023-05-29 23:03:21 +08:00
Yunfan Li
2ad567a1a8 Flee action, factory setting 2023-05-29 11:45:18 +08:00
郑佩茹
53395b64ed avoid AOE strategy (WIP) 2023-03-23 12:22:58 -06:00
郑佩茹
5d17dfb2fe Check debuff owner on target 2023-03-21 13:25:41 -06:00
郑佩茹
aeeb37da78 Trigger fixes and Warrior AI tweaks 2023-03-21 12:25:25 -06:00
UltraNix
b952636f0d Big update. 2022-03-12 22:27:09 +01:00