Move guard captain powers from static_rune_powers to MinionType
The 14 Magister Captain contracts' powers have no client rune or deed (Task 3.9), so they live on the MinionType mage entries instead of the DB fallback in loadAllRunePowers. canCast, mobCast and aiInfoCmd read them through MinionType.getCaptainPowers. No value change: same 56 power ids, rank 40, and all 56 DB tokens equal the powerbase token of their power id (checked on mbdb_108). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b0460ed2d0
commit
dff53d5c76
5 files changed
+51
-39
No files matched your search
@@ -276,7 +276,7 @@ public class MobAI {
|
||||
|
||||
// Mobile has no powers defined in mobbase or contract..
|
||||
|
||||
if (PowersManager.getPowersForRune(mob.getMobBaseID()).isEmpty() && PowersManager.getPowersForRune(contractID).isEmpty())
|
||||
if (PowersManager.getPowersForRune(mob.getMobBaseID()).isEmpty() && mbEnums.MinionType.getCaptainPowers(contractID).isEmpty())
|
||||
return false;
|
||||
|
||||
if (mob.nextCastTime == 0)
|
||||
@@ -309,18 +309,17 @@ public class MobAI {
|
||||
powerEntries = new ArrayList<>(PowersManager.getPowersForRune(mob.getMobBaseID()));
|
||||
purgeEntries = new ArrayList<>();
|
||||
|
||||
// Additional powers may come from the contract ID. This is to support
|
||||
// powers for player guards irrespective of the mobbase used.
|
||||
// Player guards also cast their captain contract's powers, irrespective of the mobbase used.
|
||||
|
||||
if (mob.isPlayerGuard()) {
|
||||
|
||||
ArrayList<RunePowerEntry> contractEntries = new ArrayList<>();
|
||||
|
||||
if (mob.contract != null)
|
||||
contractEntries = PowersManager.getPowersForRune(mob.contractUUID);
|
||||
contractEntries = mbEnums.MinionType.getCaptainPowers(mob.contractUUID);
|
||||
|
||||
if (mob.agentType.equals(mbEnums.AIAgentType.GUARDMINION))
|
||||
contractEntries = PowersManager.getPowersForRune(mob.guardCaptain.contractUUID);
|
||||
contractEntries = mbEnums.MinionType.getCaptainPowers(mob.guardCaptain.contractUUID);
|
||||
|
||||
powerEntries.addAll(contractEntries);
|
||||
|
||||
|
||||
Reference in new issue
Block a user