mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-18 01:42:42 +00:00
adventure: honor death-cheats on a cantrip kill and narrate the cantrip
A caster's at-will cantrip that lands the killing blow returned via a raw enemyHP<=0 read, skipping enemyDown -- so a survive_at_1 boss or T6 Valdris's phylactery rebirth died instead of cheating death. Route it through enemyDown, matching resolvePlayerAttack and the concentration-tick path. Also add the missing renderEvent "cantrip" case: the CantripDesc narration hook was set but never rendered, so cantrip damage dropped enemy HP with no log line.
This commit is contained in:
@@ -242,6 +242,10 @@ func renderEvent(e CombatEvent, playerName, enemyName string, result CombatResul
|
||||
case "concentration_tick":
|
||||
return fmt.Sprintf(pickRand(narrativeConcentrationTick), e.Damage)
|
||||
|
||||
case "cantrip":
|
||||
// e.Desc is the spell name (Fire Bolt / Eldritch Blast); e.Damage the hit.
|
||||
return fmt.Sprintf(pickRand(narrativeCantrip), e.Desc, e.Damage)
|
||||
|
||||
case "pet_deflect":
|
||||
return pickRand(narrativePetDeflect)
|
||||
|
||||
@@ -558,6 +562,15 @@ var narrativeConcentrationTick = []string{
|
||||
"🌀 The enemy steps wrong and the standing magic answers, %d damage. It does not move on.",
|
||||
}
|
||||
|
||||
// narrativeCantrip fires each round an arcane blaster throws its at-will cantrip
|
||||
// (Fire Bolt / Eldritch Blast) before the weapon swing. %s is the spell name,
|
||||
// %d the damage — a caster's sustained floor, so it lands every round.
|
||||
var narrativeCantrip = []string{
|
||||
"✨ %s streaks out and burns home — %d damage. The at-will floor never stops.",
|
||||
"✨ A bolt of %s answers before the staff even moves, scorching for %d.",
|
||||
"✨ %s lances the enemy for %d. No incantation, no wind-up — just the steady arcane drum.",
|
||||
}
|
||||
|
||||
var narrativePetDeflect = []string{
|
||||
"🐾 Your pet intercepts the blow. Damage halved. Your pet is now your best piece of equipment.",
|
||||
"🐾 Your pet pushes you aside at the last second. Impact reduced. You did not ask to be pushed. Results speak for themselves.",
|
||||
|
||||
Reference in New Issue
Block a user