From 3c8bcba6b540f5cb84572994d9ec2426dd348a93 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Thu, 5 Jun 2025 02:00:10 -0300 Subject: finish `magic.cc` --- src/crcombat.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/crcombat.cc') diff --git a/src/crcombat.cc b/src/crcombat.cc index 2843cd3..e1bf72f 100644 --- a/src/crcombat.cc +++ b/src/crcombat.cc @@ -715,14 +715,13 @@ void TCombat::WandAttack(TCreature *Target){ int AttackStrength = WandType.getAttribute(WANDATTACKSTRENGTH); int AttackVariation = (int)WandType.getAttribute(WANDATTACKVARIATION); - // NOTE(fusion): Oof... try{ CheckMana(Master, ManaConsumption, 0, 0); - }catch(RESULT err){ - if(err == NOTENOUGHMANA){ + }catch(RESULT r){ + if(r == NOTENOUGHMANA){ throw OUTOFAMMO; }else{ - throw err; + throw r; } } @@ -836,7 +835,7 @@ void TCombat::DistanceAttack(TCreature *Target){ int Damage = ComputeDamage(Master, 0, EffectStrength, EffectStrength); TDamageImpact Impact(Master, DAMAGE_PHYSICAL, Damage, false); CircleShapeSpell(Master, DropX, DropY, DropZ, -1, - ANIMATION_NONE, 2, &Impact, EFFECT_BURST_ARROW); + ANIMATION_NONE, 2, &Impact, EFFECT_FIRE); } try{ @@ -845,10 +844,10 @@ void TCombat::DistanceAttack(TCreature *Target){ }else{ Move(0, this->Ammo, DropCon, 1, false, NONE); } - }catch(RESULT err){ - if(err != DESTROYED){ + }catch(RESULT r){ + if(r != DESTROYED){ error("TCombat::RangeAttack: Konnte Ammo nicht verschieben/löschen" - " (Exception %d, [%d,%d,%d].\n", err, DropX, DropY, DropZ); + " (Exception %d, [%d,%d,%d].\n", r, DropX, DropY, DropZ); } } -- cgit v1.2.3