return;
}
- const primaryStat = data.action === 'attack' ? player.strength : player.constitution;
- const boostStat = data.action === 'attack' ? boost.strength : boost.constitution;
const attackType = data.action === 'attack' ? 'physical' : 'magical';
+ const primaryStat = data.action === 'attack' ? player.strength : player.intelligence;
+ const boostStat = data.action === 'attack' ? boost.strength : boost.intelligence;
const playerDamage = Math.floor(((primaryStat + boostStat) * 1.3) + boost.damage);
const skillsUsed: Record<SkillID | any, number> = {};
await updatePlayerSkills(player.id, skillsUsed);
- const playerFinalDamage = (attackType === 'magical' && !anyDamageSpells) ? 0 : Math.floor(playerDamage + playerDamageAfterMasteries);
+ const playerFinalDamage = (data.action === 'cast' && !anyDamageSpells) ? 0 : Math.floor(playerDamage + playerDamageAfterMasteries);
const playerFinalHeal = Math.floor(boost.hp + hpHealAfterMasteries);
roundData.roundDetails.push(`You targeted the monsters ${data.target.toUpperCase()} with ${attackType} damage!`);