diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-06-05 02:00:10 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-06-05 02:00:10 -0300 |
| commit | 3c8bcba6b540f5cb84572994d9ec2426dd348a93 (patch) | |
| tree | 54af53f02d549951446d5a87845b42d4ee777559 /src/crcombat.cc | |
| parent | 2c91caa1dd4ea53dfeb63751d04170d9a9a61474 (diff) | |
| download | game-3c8bcba6b540f5cb84572994d9ec2426dd348a93.tar.gz game-3c8bcba6b540f5cb84572994d9ec2426dd348a93.zip | |
finish `magic.cc`
Diffstat (limited to 'src/crcombat.cc')
| -rw-r--r-- | src/crcombat.cc | 15 |
1 files changed, 7 insertions, 8 deletions
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); } } |
