Android build v1.1.23
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import { IWT2_INFUSION_ABILITIES, type Iwt2InfusionAbilityId } from './infusionAbilities'
|
||||
import type { Iwt2HealerAbility, Iwt2HealerId } from './healerAbilities'
|
||||
|
||||
export function iwt2HealerInfusionAbility(
|
||||
infusionAbilityId: Iwt2InfusionAbilityId,
|
||||
healerId: Iwt2HealerId,
|
||||
): Iwt2HealerAbility | null {
|
||||
const infusion = IWT2_INFUSION_ABILITIES[infusionAbilityId]
|
||||
if (!infusion || infusion.classId !== 'healer') return null
|
||||
if (infusion.effectKey === 'sanctuary') {
|
||||
return createInfusedHealerAbility(healerId, 'sanctuary', infusion.name, infusion.icon, 'shield', 50, 16, infusion.cooldownSeconds ?? 45, 'shield')
|
||||
}
|
||||
if (infusion.effectKey === 'guardianPulse') {
|
||||
return createInfusedHealerAbility(healerId, 'guardian-pulse', infusion.name, infusion.icon, 'group', 26, 14, infusion.cooldownSeconds ?? 40)
|
||||
}
|
||||
if (infusion.effectKey === 'emergencyMiracle') {
|
||||
return createInfusedHealerAbility(healerId, 'emergency-miracle', infusion.name, infusion.icon, 'direct', 90, 20, infusion.cooldownSeconds ?? 75)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function createInfusedHealerAbility(
|
||||
healerId: Iwt2HealerId,
|
||||
slug: string,
|
||||
name: string,
|
||||
icon: string,
|
||||
kind: Iwt2HealerAbility['kind'],
|
||||
power: number,
|
||||
manaCost: number,
|
||||
cooldownSeconds: number,
|
||||
effectType?: string,
|
||||
): Iwt2HealerAbility {
|
||||
return {
|
||||
cooldownSeconds,
|
||||
effectType,
|
||||
healerId,
|
||||
icon,
|
||||
id: `${healerId}-infusion-${slug}`,
|
||||
kind,
|
||||
manaCost,
|
||||
name,
|
||||
power,
|
||||
slot: 6,
|
||||
target: 'party-member',
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user