From a328568ee5ad694fcc010ec2ae9578dd78e485b8 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 27 Mar 2024 23:31:17 +0100 Subject: [PATCH] new messages on Orb of Phasing, Slaying, and Weakness --- attack.cpp | 8 ++++++++ orbs.cpp | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/attack.cpp b/attack.cpp index 84e2aac0..bfe39258 100644 --- a/attack.cpp +++ b/attack.cpp @@ -944,6 +944,14 @@ EX void fightmessage(eMonster victim, eMonster attacker, bool stun, flagtype fla else addMessage(XLAT("You pierce %the1.", victim)); // normal } + else if(items[itOrbSlaying]) { + playSound(NULL, "hit-crush"+pick123()); + addMessage(XLAT("You crush %the1!", victim)); // normal + } + else if(stun && items[itCurseWeakness]) { + playSound(NULL, "click"); + addMessage(XLAT("You punch %the1.", victim)); // normal + } else if(!peace::on) { playSound(NULL, "hit-sword"+pick123()); addMessage(XLAT("You kill %the1.", victim)); // normal diff --git a/orbs.cpp b/orbs.cpp index 5b58b630..9989ea6d 100644 --- a/orbs.cpp +++ b/orbs.cpp @@ -664,7 +664,7 @@ EX void teleportTo(cell *dest) { } /* calls changes.rollback or changes.commit */ -EX bool jumpTo(orbAction a, cell *dest, eItem byWhat, int bonuskill IS(0), eMonster dashmon IS(moNone)) { +EX bool jumpTo(orbAction a, cell *dest, eItem byWhat, int bonuskill IS(0), eMonster dashmon IS(moNone), cell *phasecell IS(nullptr)) { if(byWhat != itStrongWind) playSound(dest, "orb-frog"); cell *from = cwt.at; changes.value_keep(cwt); @@ -683,7 +683,10 @@ EX bool jumpTo(orbAction a, cell *dest, eItem byWhat, int bonuskill IS(0), eMons if(byWhat == itOrbPhasing) { useupOrb(itOrbPhasing, 5); - addMessage(XLAT("You jump!")); + if(phasecell->monst) + addMessage(XLAT("You phase through %the1!", phasecell->monst)); + else + addMessage(XLAT("You phase through %the1!", phasecell->wall)); } movecost(from, dest, 1); @@ -1523,7 +1526,7 @@ EX eItem targetRangedOrb(cell *c, orbAction a) { } if(phasestate == 3) { - if(jumpTo(a, c, itOrbPhasing)) phasestate = 4; + if(jumpTo(a, c, itOrbPhasing, 0, moNone, jumpthru)) phasestate = 4; else wouldkill_there = true; } else changes.rollback();