[trust, sql, lua, core] Trust Tank audit and cleanup#10002
Conversation
| MOBMOD_RANGED_ATTACK_RANGE = 93, // Max range for ranged auto attacks. Mob will move closer if target is beyond this range. | ||
| MOBMOD_FOLLOW_LEASH_RANGE = 94, // Distance the leader can walk before their followers start moving. Applied to followers. | ||
| MOBMOD_FOLLOW_STOP_RANGE = 95, // Distance the followers attempt to stop at once their leader stops moving. Applied to followers. | ||
| MOBMOD_SHIELD_SIZE_TRUST = 96, // Set the size of the mob's shield. 3 = Default size, only used for trusts that use shields. |
There was a problem hiding this comment.
While you're here, you could make the 3 mobmods that affect trusts all styled the same:
MOBMOD_TRUST_DISTANCE = 77, // TRUSTS ONLY: Set movement type/distance. See trust.lua for details.
MOBMOD_TRUST_X ... // TRUSTS ONLY. ...
There was a problem hiding this comment.
i think the prefix MOBMOD_TRUST is better, so i will stick to that and amend the shield size mob mod
| case TYPE_TRUST: | ||
| { | ||
| constexpr int8 defaultTrustShieldSize = 3; | ||
| const int16 shieldMobModValue = static_cast<CMobEntity*>(m_PBaseEntity)->getMobMod(MOBMOD_SHIELD_SIZE_TRUST); |
There was a problem hiding this comment.
You've checked that it's a trust, so cast it into a trust. Then, you can move constexpr int8 defaultTrustShieldSize = 3; to be a private member of trusts with an accessor - in case we need this information outside of just this binding
| RANGED_ATTACK_RANGE = 93, -- Max range for ranged auto attacks. Mob will move closer if target is beyond this range. | ||
| FOLLOW_LEASH_RANGE = 94, -- Distance the leader can walk before their followers start moving. Applied to followers. | ||
| FOLLOW_STOP_RANGE = 95, -- Distance the followers attempt to stop at once their leader stops moving. Applied to followers. | ||
| SHIELD_SIZE_TRUST = 96, -- Set the size of the mob's shield. 3 = Default size, only used for trusts that use shields. |
There was a problem hiding this comment.
This would then need to align with the C++ naming, etc.
|
You could split up your commits into the mobmod/C++ changes, and then the trust script changes. Commits like this aren't valuable to future readers: |
| mob:addMod(xi.mod.ENMITY, 15) -- Enmity+ | ||
| mob:addMod(xi.mod.DUAL_WIELD, 10) -- Dual Wield +10 | ||
| mob:addMod(xi.mod.DMG, -500) -- Damage Taken -5% | ||
| mob:addMod(xi.mod.HPP, 20) -- HP+20% |
There was a problem hiding this comment.
These comments are redundant
There was a problem hiding this comment.
This pattern is true across all these trust files
There was a problem hiding this comment.
ok, ill remove them
| mob:addGambit(ai.t.SELF, { ai.c.HPP_LT, 33 }, { ai.r.JA, ai.s.SPECIFIC, xi.ja.SENTINEL }) | ||
| -- Dragon Killer handled in mob_pool_mods | ||
| mob:addMod(xi.mod.ENMITY, 10) -- Enmity+ | ||
| mob:addMod(xi.mod.DMG, -500) -- Damage Taken -5% |
There was a problem hiding this comment.
Comments like this one are fair, since DMG is poorly names given it represents DMG_TAKEN_BASE_10K, etc.
I affirm:
What does this pull request do?
Trust scripts:
mob_skill.lua
mob_skills.sql
Mob Mods
lua_baseentity: getShieldSize()
Notes:
Steps to test these changes