Skip to content

[core, lua, sql] PET AI Claim and Enmity changes#9465

Merged
Xaver-DaRed merged 5 commits intoLandSandBoat:basefrom
Omnione:smn
Feb 24, 2026
Merged

[core, lua, sql] PET AI Claim and Enmity changes#9465
Xaver-DaRed merged 5 commits intoLandSandBoat:basefrom
Omnione:smn

Conversation

@Omnione
Copy link
Copy Markdown
Contributor

@Omnione Omnione commented Feb 15, 2026

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

This pull request implements several supporting changes to the Pet AI, enmity, and pet handling systems are also included to ensure correct gameplay and avoid exploits.

Support for the Atomos summon, and enable it to perform abilities (Deconstruction and Chronoshift).

Small change to the commands !changejob and !changesjob, they now despawn a pet when used to avoid problems with having an incorrect pet out on a job that should not have a pet/have the wrong pet, Thanks to @atomos for bringing up this issue.

AI and Pet Behavior Adjustments

  • Updated AI controllers to treat Atomos as a passive pet (does not auto-attack or defend the master, matching retail behavior) and included Atomos in the immobile pets set.
  • Modified enmity generation so that (SMN) summoning pets on a target does not generate enmity or claim mobs only allows magic aggro as usual.

Pet Skill and Mob Skill State Improvements

  • Improved pet and mob skill state handling to track whether a skill successfully executed, ensuring enmity is only updated when appropriate and preventing unintended enmity updates, Mobs were unintentionally calling ClaimMob when not player controlled and trying to claim themselves or other mob alligned mobs.

Atomos Summon and Abilities Implementation

  • Added new Lua scripts for Atomos's abilities: deconstruction.lua (steals a status effect from the target and stores it for later use) and chronoshift.lua (transfers the stolen effect to the party and despawns Atomos after a delay).
  • Added the Atomos summoning spell script (atomos.lua), which spawns Atomos as a pet.
  • Updated the pet spawning logic in pets.lua to handle Atomos's unique sequence: disables auto-claim, prevents movement, triggers Deconstruction after 3 seconds, then Chronoshift after 10 seconds, and finally despawns Atomos.

Steps to test these changes

Change to all pet jobs one at a time and test the following:
[SMN]

  • Send in pet to fight a mob, notice mob is claimed, release pet, mob should now attack master.
  • Use a non dmg bloodpact on a mob without sending the pet into battle and release right after, i.e Shiva's Sleepga II, mob should get claimed, after waking up, the mob should go after the master.
  • Use a non dmg bloodpact on a mob, i.e Shiva's Sleepga II, mob should get claimed, the pet should go after the claimed mob.
  • Find some mobs that link (crawlers in Escha - Zi'Tah zone 288 are good), send in pet to attack, once claimed, pull the pet back to you and make other mobs link, move away a little and release the pet, you should only have the original mob following you, unless they aggroed you or they linked again, its tricky but this is the correct behavior, this is the classic "Carby pull".
  • best way to test smn is to use retail and compare side by side if possible as i have.

[BST]

  • Charm or use jug pet, send in pet to fight a mob, notice mob is claimed, use Leave, the claimed mob should now attack you, if you used a charmed mob, the charmed mob should now be passive unless it agros you or can link with the previous target mob after a short window.
  • One test i did and can validate if needed, send pet into fight, then use sic(will most likley have a delay)/ready right away without hitting the mob, you should notice these skills do not claim.

[PUP]

  • Use a ranged or caster frame and head, Deploy on a target, you should notice no claiming unless the skill defeted the mob or the mob is close enough to be hit with regular attacks.

[DRG]

  • Nothing has really changed but you can test Smiting breath, that should claim a mob as per retail.

Comment thread scripts/actions/abilities/pets/chronoshift.lua
Comment thread scripts/actions/abilities/pets/deconstruction.lua Outdated
Comment thread scripts/actions/abilities/pets/deconstruction.lua Outdated
Comment thread scripts/actions/abilities/pets/chronoshift.lua
Comment thread scripts/globals/pets.lua Outdated
Comment thread scripts/globals/pets.lua Outdated
Comment thread src/map/ai/states/magic_state.cpp Outdated
Comment thread src/map/entities/automatonentity.cpp
@Omnione Omnione force-pushed the smn branch 5 times, most recently from 1a84da7 to d95b42e Compare February 17, 2026 22:00
@LandSandBoat LandSandBoat deleted a comment from github-actions Bot Feb 18, 2026
@Xaver-DaRed
Copy link
Copy Markdown
Contributor

YOLO

@Xaver-DaRed Xaver-DaRed merged commit 685a5dc into LandSandBoat:base Feb 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants