Update Healer Man server
This commit is contained in:
1 parent
9d7e0e2f9e
commit
35dfdaed61
94 files changed
+17034
-418
No files matched your search
@@ -84,7 +84,7 @@ import {
|
||||
ROGUE_DEADLY_POISON_DOSE_TAG,
|
||||
ROGUE_ENVENOM_BUFF_TAG,
|
||||
} from "./roguePoison";
|
||||
import { romAbilityNeedsShield, romEffectsForCast, romSelfDrainPercent, romTargetBleedCount } from "./romCombatMechanics";
|
||||
import { romAbilityNeedsRangedWeapon, romAbilityNeedsShield, romEffectsForCast, romSelfDrainPercent, romTargetBleedCount } from "./romCombatMechanics";
|
||||
import { romCreatureFamilyTargetTags } from "./romCreatureFamilies";
|
||||
import { romScoutRogueWhirlwindBonusEffect } from "./romScoutRogueOverrides";
|
||||
import { ROM_FIRE_LIGHTNING_BURST_RESET_GUARD_TAG, romFireLightningBurstReset } from "./romMageWarlockOverrides";
|
||||
@@ -797,7 +797,7 @@ function partyAbilityTargetIsValid(
|
||||
&& aura.definition.utilityTags?.includes("rom-charged"))) return false;
|
||||
if (ability.dbcSpellId === 491172 && !combat.auras.some((aura) => aura.targetId === member.id
|
||||
&& aura.definition.utilityTags?.includes("rom-static-field-charge"))) return false;
|
||||
if (ability.dbcSpellId === 490311 || romAbilityNeedsShield(ability)) {
|
||||
if (ability.dbcSpellId === 490311 || romAbilityNeedsShield(ability) || romAbilityNeedsRangedWeapon(ability)) {
|
||||
const loadout = resolvedEquipmentLoadout(combat.equipment, combat.inventory, {
|
||||
ownerId: member.id, ownerKind: "party", classId: member.classId,
|
||||
secondaryClassId: member.secondaryClassId,
|
||||
@@ -805,6 +805,7 @@ function partyAbilityTargetIsValid(
|
||||
});
|
||||
if (ability.dbcSpellId === 490311 && loadout["main-hand"]?.weaponType !== "dagger") return false;
|
||||
if (romAbilityNeedsShield(ability) && loadout["off-hand"]?.armorType !== "shield") return false;
|
||||
if (romAbilityNeedsRangedWeapon(ability) && !loadout.ranged) return false;
|
||||
}
|
||||
}
|
||||
const targetPosition = hostile ? getMobPosition(targetId) : partyFriendlyPosition(targetId);
|
||||
@@ -1239,6 +1240,10 @@ function executePartyAbility(
|
||||
specializationId: member.specializationId, role: member.role, level: member.level,
|
||||
})["main-hand"]?.weaponType === "dagger",
|
||||
casterMaxHealth: member.maxHealth,
|
||||
targetHealthPercent: combat.mobs[targetId]
|
||||
? combat.mobs[targetId]!.health / Math.max(1, combat.mobs[targetId]!.maxHealth)
|
||||
: 1,
|
||||
naturePower: member.resourcePools["nature-power"] ?? 0,
|
||||
passiveTags: combat.auras.filter((aura) => aura.targetId === member.id)
|
||||
.flatMap((aura) => aura.definition.utilityTags ?? []).concat(
|
||||
abilitiesForCharacter(member.classId, member.secondaryClassId)
|
||||
@@ -1455,9 +1460,10 @@ function executePartyAbility(
|
||||
}
|
||||
} else if (effect.kind === "resource") {
|
||||
for (const friendlyTargetId of friendlyTargets.length ? friendlyTargets : [member.id]) {
|
||||
const resource = effect.resource ?? member.resourceType;
|
||||
effectiveAmount += useCombatStore.getState().restoreActorResource(
|
||||
friendlyTargetId,
|
||||
effect.resource ?? member.resourceType,
|
||||
resource,
|
||||
effect.amount,
|
||||
effect.percentage,
|
||||
member.id,
|
||||
@@ -1473,12 +1479,20 @@ function executePartyAbility(
|
||||
runtimeMember,
|
||||
useCombatStore.getState().actors[member.id],
|
||||
);
|
||||
const restoredPool = resourceMirror.resourcePools[resource];
|
||||
if (restoredPool === undefined) continue;
|
||||
runtimeMember = {
|
||||
...runtimeMember,
|
||||
resource: resourceMirror.resource,
|
||||
maxResource: resourceMirror.maxResource,
|
||||
resourcePools: resourceMirror.resourcePools,
|
||||
lastResourceSpentAt: resourceMirror.lastResourceSpentAt,
|
||||
...(resource === runtimeMember.resourceType
|
||||
? { resource: restoredPool, maxResource: resourceMirror.maxResource }
|
||||
: {}),
|
||||
resourcePools: { ...runtimeMember.resourcePools, [resource]: restoredPool },
|
||||
...(resourceMirror.lastResourceSpentAt[resource] === undefined
|
||||
? {}
|
||||
: { lastResourceSpentAt: {
|
||||
...runtimeMember.lastResourceSpentAt,
|
||||
[resource]: resourceMirror.lastResourceSpentAt[resource],
|
||||
} }),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user