diff --git a/.gitignore b/.gitignore index 7b74e8a71..3a5813b60 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ *.bak #fixme *.o +/.vs +/cmds/.vs diff --git a/cmds/cavalier/charge.c b/cmds/cavalier/charge.c index 19c2efd42..96e772166 100644 --- a/cmds/cavalier/charge.c +++ b/cmds/cavalier/charge.c @@ -268,8 +268,7 @@ void do_trample(int damage,object targ,object play) { "towards "+targ->QCN+"!%^RESET%^"); tell_room(environment(tp),"%^BOLD%^%^BLUE%^"+tp->QCN+" tramples over "+attackers[i]->QCN+" " "as "+tp->QS+" charges towards "+targ->QCN+"!%^RESET%^",({targ,tp})); -// attackers[i]->do_damage(attackers[i]->return_target_limb(),dam); - tp->cause_damage_to(attackers[i],attackers[i]->return_target_limb(),dam); + attackers[i]->cause_typed_damage(attackers[i], attackers[i]->return_target_limb(), dam, weapon[0]->query_damage_type()); } } diff --git a/cmds/feats/b/_body_fuel.c b/cmds/feats/b/_body_fuel.c index c48b0543f..603b2573c 100644 --- a/cmds/feats/b/_body_fuel.c +++ b/cmds/feats/b/_body_fuel.c @@ -90,7 +90,7 @@ void execute_attack() dmg = roll_dice(clevel, die); tell_object(caster,"%^BOLD%^%^WHITE%^A wave of pain pierces through your body as you extend your focus."); - caster->do_damage(caster, dmg); + caster->cause_typed_damage(caster, 0, dmg, "untyped"); caster->add_mp(dmg / 10); caster->set_property("magic", -1); diff --git a/cmds/feats/c/_channel.c b/cmds/feats/c/_channel.c index 556328e99..cea3bc495 100644 --- a/cmds/feats/c/_channel.c +++ b/cmds/feats/c/_channel.c @@ -135,7 +135,7 @@ void execute_attack() continue; } - ally->cause_typed_damage(ally, ally->query_target_limb(), dam, energy_type); + ally->cause_typed_damage(ally, ally->return_target_limb(), dam, energy_type); tell_object(ally, "%^BOLD%^" + color + "Waves of divine energy wash over you, healing your wounds!"); } @@ -155,7 +155,7 @@ void execute_attack() continue; } - attacker->cause_typed_damage(attacker, attacker->query_target_limb(), dam, energy_type); + attacker->cause_typed_damage(attacker, attacker->return_target_limb(), dam, energy_type); tell_object(attacker, "%^BOLD%^" + color + "Waves of divine energy wash over you, wounding you!"); } diff --git a/cmds/feats/c/_crit.c b/cmds/feats/c/_crit.c index 10353b8fe..2026493cc 100644 --- a/cmds/feats/c/_crit.c +++ b/cmds/feats/c/_crit.c @@ -154,12 +154,12 @@ void execute_feat() } else{ todamage = roll_dice(flevel + BONUS_D->query_stat_bonus(caster, "intelligence"), 10); } - target->cause_typed_damage(target, target->query_target_limb(), todamage, "untyped"); + target->cause_typed_damage(target, target->return_target_limb(), todamage, "untyped"); } else { tell_object(target, "%^BOLD%^%^WHITE%^Wait, what?! How did it happen?!%^RESET%^"); tell_room(place, "%^BOLD%^%^WHITE%^You almost didn't see a shadow behind " + target->QCN + "'s back!", ({ target, caster })); tell_object(caster, "%^BOLD%^%^WHITE%^You phase quickly behind " + target->QCN + " and put an end to them with a swift motion."); - target->cause_typed_damage(target, target->query_target_limb(), target->query_max_hp() * 2, "untyped"); + target->cause_typed_damage(target, target->return_target_limb(), target->query_max_hp() * 2, "untyped"); } spell_kill(target,caster); return; diff --git a/cmds/feats/c/_crushingstrike.c b/cmds/feats/c/_crushingstrike.c index 21e3cd7eb..d4c3fd0fa 100644 --- a/cmds/feats/c/_crushingstrike.c +++ b/cmds/feats/c/_crushingstrike.c @@ -170,7 +170,6 @@ void execute_attack() dam = (clevel / 8 + 1) * dam; dam = roll_dice(2, dam); - tell_object(caster, "%^RED%^You bring your " + weapons[0]->query_short() + " down in a brutal " "strike, maiming " + target->QCN + "!%^RESET%^"); tell_object(target, "%^RED%^" + caster->QCN + " brings " + caster->QP + " " + weapons[0]->query_short() + "" @@ -178,7 +177,7 @@ void execute_attack() tell_room(place, "%^RED%^" + caster->QCN + " brings " + caster->QP + " " + weapons[0]->query_short() + " down " "on " + target->QCN + ", striking " + target->QO + " brutally!%^RESET%^", ({ target, caster })); - target->do_damage("head", dam); + target->cause_typed_damage(target, "head", dam, weapons[0]->query_damage_type()); if (!objectp(target)) { dest_effect(); diff --git a/cmds/feats/d/_death_arrow.c b/cmds/feats/d/_death_arrow.c index 832955faa..e80499fd5 100644 --- a/cmds/feats/d/_death_arrow.c +++ b/cmds/feats/d/_death_arrow.c @@ -186,12 +186,12 @@ void execute_attack() if ((string)target->query_property("no death") || do_save(target, -bonusdc)) { tell_object(target, "%^BOLD%^The struggle for your soul is won, yet at a %^BOLD%^%^BLUE%^price%^WHITE%^."); tell_room(place, "%^BOLD%^The soul survives, yet the coil %^BLACK%^suffers%^WHITE%^!", target); - target->do_damage(target->query_target_limb(), roll_dice(clevel, 8)); + target->cause_typed_damage(target, target->return_target_limb(), roll_dice(clevel, 8), myweapon->query_damage_type()); } else { tell_room(place, "%^BOLD%^%^WHITE%^The soul is pushed beyond %^MAGENTA%^the veil%^WHITE%^ from its coil!"); tell_room(place, "%^BOLD%^%^WHITE%^The lifeless husk of " + target->QCN + " drops to the ground!", target); tell_object(target, "%^BOLD%^%^MAGENTA%^Your soul is ripped from you body!\n"); - target->do_damage(target, target->query_target_limb(), target->query_max_hp() * 2); + target->cause_typed_damage(target, target->return_target_limb(), target->query_max_hp() * 2, myweapon->query_damage_type()); } spell_kill(target, caster); diff --git a/cmds/feats/d/_death_touch.c b/cmds/feats/d/_death_touch.c index 779635a09..fbd9bfd7f 100644 --- a/cmds/feats/d/_death_touch.c +++ b/cmds/feats/d/_death_touch.c @@ -179,12 +179,12 @@ void execute_attack() { tell_object(target,"%^BOLD%^Your soul struggles, but manages to survive."); tell_room(place,"%^BOLD%^%^BLUE%^"+target->QCN+" is harmed but manages to survive the death!",target); - target->cause_typed_damage(target, target->query_target_limb(),roll_dice(clevel,10),"negative energy"); + target->cause_typed_damage(target, target->return_target_limb(),roll_dice(clevel,10),"negative energy"); } else { tell_room(place,"%^BOLD%^%^WHITE%^The soul is pushed beyond %^MAGENTA%^the veil%^WHITE%^ from its coil!"); tell_room(place,"%^BOLD%^%^WHITE%^The lifeless husk of "+target->QCN+" drops to the ground!",target); tell_object(target,"%^BOLD%^%^MAGENTA%^Your soul is ripped from you body!\n"); - target->cause_typed_damage(target, target->query_target_limb(),target->query_max_hp()*2,"negative energy"); + target->cause_typed_damage(target, target->return_target_limb(),target->query_max_hp()*2,"negative energy"); } dest_effect(); diff --git a/cmds/feats/d/_defenders_presence.c b/cmds/feats/d/_defenders_presence.c index bafb68b76..44164df93 100644 --- a/cmds/feats/d/_defenders_presence.c +++ b/cmds/feats/d/_defenders_presence.c @@ -151,7 +151,7 @@ void execute_attack() if (party[i]->query_hp_percent() < 100) { // token amount of healing while in combat and below full health - party[i]->cause_typed_damage(party[i], party[i]->query_target_limb(), -(roll_dice(clevel, 2) + 10), "untyped"); + party[i]->cause_typed_damage(party[i], party[i]->return_target_limb(), -(roll_dice(clevel, 2) + 10), "untyped"); if (party[i] != caster) { tell_object(party[i], "%^RESET%^%^BOLD%^%^GREEN%^You feel inspired by " + caster->QCN + "'s " "extraodinary defense and your courage lends strength to your wounds!%^RESET%^"); diff --git a/cmds/feats/k/_knockdown.c b/cmds/feats/k/_knockdown.c index 3e927e573..4273b09fb 100644 --- a/cmds/feats/k/_knockdown.c +++ b/cmds/feats/k/_knockdown.c @@ -3,6 +3,7 @@ inherit FEAT; int fired, in_shapeshift; +string damtype; void timer(object tp); @@ -88,6 +89,7 @@ void execute_feat() "at you!"); tell_room(place,"%^GREEN%^"+caster->QCN+" exhales and releases a precisely aimed shot at " +target->QCN+"!%^RESET%^",({target,caster})); + damtype = weapons[0]->query_damage_type(); } else { tell_object(caster,"%^RESET%^%^BOLD%^%^GREEN%^You slip inside "+target->QCN+"'s reach and try to " @@ -96,6 +98,7 @@ void execute_feat() "tries to knock you to the ground!"); tell_room(place,"%^GREEN%^"+caster->QCN+" slips inside "+target->QCN+"'s reach and tries to " "knock "+target->QO+" to the ground!%^RESET%^",({target,caster})); + damtype = "bludgeoning"; } caster->use_stamina(roll_dice(1,6)); caster->set_property("using instant feat",1); @@ -169,7 +172,7 @@ void execute_attack() // put a heartbeat cap on the trip so people aren't chain-stunned - maximum duration half of the timer. Nienne, 08/09. target->set_tripped(1,"%^YELLOW%^You're scrambling to get your feet under you again!%^RESET%^",(random(3)+1)); //changed duration of trip after discussions with Tsera, Ares, and Saide - was 15 ~Circe~ 4/9/13 - target->do_damage("torso",roll_dice(1,clevel)); + target->cause_typed_damage(target, "torso", roll_dice(1, clevel), damtype); timer(caster); // dest_effect(); return; diff --git a/cmds/feats/s/_shield_of_whirling_steel.c b/cmds/feats/s/_shield_of_whirling_steel.c index 89ce6afbe..689d46a01 100644 --- a/cmds/feats/s/_shield_of_whirling_steel.c +++ b/cmds/feats/s/_shield_of_whirling_steel.c @@ -120,8 +120,9 @@ void execute_feat() void execute_attack() { - object *attackers = ({}); + object* attackers; int i,count; + object* weapons; if(!objectp(caster) || !objectp(environment(caster))) { @@ -131,6 +132,7 @@ void execute_attack() place = environment(caster); attackers = caster->query_attackers(); + weapons = caster->query_wielded(); if(!check_my_status(caster)) { @@ -170,7 +172,7 @@ void execute_attack() if(attackers[i]->is_wielding("lrweapon")) { continue; } tell_object(attackers[i], cm("As you get close to "+caster->QCN+", "+caster->QP+" spinning weapons strike you painfully!")); - attackers[i]->do_damage(attackers[i]->return_target_limb(), roll_dice(clevel,5)); + attackers[i]->cause_typed_damage(attackers[i], attackers[i]->return_target_limb(), roll_dice(clevel, 5), weapons[0]->query_damage_type()); count++; } diff --git a/cmds/feats/t/_true_judgement.c b/cmds/feats/t/_true_judgement.c index 100b1f2b7..dccfb7edb 100644 --- a/cmds/feats/t/_true_judgement.c +++ b/cmds/feats/t/_true_judgement.c @@ -180,7 +180,7 @@ void execute_attack() tell_room(place,"%^BOLD%^%^MAGENTA%^The soul is pushed beyond %^MAGENTA%^the veil%^MAGENTA%^ from its coil!"); tell_room(place,"%^BOLD%^%^MAGENTA%^The lifeless husk of "+target->QCN+" drops to the ground!",target); tell_object(target,"%^BOLD%^%^MAGENTA%^Your soul is ripped from you body!\n"); - target->cause_typed_damage(target, target->query_target_limb(),target->query_max_hp()*2,"untyped"); + target->cause_typed_damage(target, target->return_target_limb(),target->query_max_hp()*2,"untyped"); } dest_effect(); diff --git a/cmds/fighter/_flash.c b/cmds/fighter/_flash.c index 61dc00a69..bbe3e6351 100644 --- a/cmds/fighter/_flash.c +++ b/cmds/fighter/_flash.c @@ -143,11 +143,10 @@ int cmd_flash() { "to the ground!%^RESET%^",({TP,ob})); break; } -// ob->do_damage(ob->return_target_limb(),diff); if(level > 20){ - TP->cause_damage_to(ob,ob->return_target_limb(),diff+random(16)); + ob->cause_typed_damage(ob, ob->return_target_limb(), diff + random(16), weapon[0]->query_damage_type()); } - TP->cause_damage_to(ob,ob->return_target_limb(),diff); + ob->cause_typed_damage(ob, ob->return_target_limb(), diff, weapon[0]->query_damage_type()); } if(which == 1) { switch(mystyle){ @@ -475,7 +474,6 @@ int cmd_flash() { "%^RESET%^",({TP,ob})); break; } -// ob->do_damage(ob->return_target_limb(),diff+random(6)); TP->cause_damage_to(ob,ob->return_target_limb(),diff+random(24)); ob->set_paralyzed(random(6)+6+bonus,"You are stunned from the blow!"); } diff --git a/cmds/fighter/rush.c b/cmds/fighter/rush.c index 2b741a3d6..fedd2de44 100644 --- a/cmds/fighter/rush.c +++ b/cmds/fighter/rush.c @@ -78,7 +78,7 @@ void cmd_rush(string str){ write("%^BOLD%^You successfully slam your weapon with all your weight behind it into "+ob->query_cap_name()+"!"); tell_room(ETP,"%^BOLD%^"+TPQCN+" slams full force into "+ob->query_cap_name()+"!",({ob,TP})); tell_object(ob,"%^BOLD%^"+TPQCN+" slams full force into you dealing damage and knocking the wind out of you!\n"); - ob->do_damage(ob->return_target_limb(),damage); + ob->cause_typed_damage(ob, ob->return_target_limb(), damage, weapon[0]->query_damage_type()); ob->set_paralyzed(8,"Your recovering from that last hit"); return 1; } diff --git a/cmds/mortal/_struggle.c b/cmds/mortal/_struggle.c index 9317ed42b..7fa904862 100644 --- a/cmds/mortal/_struggle.c +++ b/cmds/mortal/_struggle.c @@ -71,7 +71,7 @@ int cmd_struggle(string what) { break; case 1..10 : write("You fight against the gag but only manage to hurt yourself!"); - TP->do_damage("head", random(3)); + TP->cause_typed_damage(TP, "head", random(3), "untyped"); break; default : break; } @@ -104,7 +104,7 @@ int cmd_struggle(string what) { message("my_environment",ETP->query_long(), ({TP})); TP->set_blindfolded(blindwas); } - if(random(3)) TP->do_damage("head", random(3)); + if(random(3)) TP->cause_typed_damage(TP, "head", random(3), "untyped"); break; default : break; } @@ -117,33 +117,33 @@ int cmd_struggle(string what) { case 0: write("You pull a muscle trying to loosen your bonds."); if(random(3)) tell_room(ETP,"You notice "+TPQCN+" wince in pain.", TP); - TP->do_damage("torso", random(4)); + TP->cause_typed_damage(TP, "torso", random(4), "untyped"); break; case 1: write("The ropes %^RED%^cut into your wrists %^RESET%^as you " "struggle."); if(random(3)) tell_room(ETP,"You notice "+TPQCN+"'s %^RED%^wrist bleeding" "%^RESET%^ as "+TP->query_subjective()+" struggles.", TP); - TP->do_damage("right arm", random(5)); + TP->cause_typed_damage(TP, "right arm", random(5), "untyped"); break; case 2: write("The ropes cause %^BOLD%^blisters %^RESET%^as you struggle."); if(random(2)) tell_room(ETP,TPQCN+" seems to be struggling against the " "ropes.", TP); - TP->do_damage("left arm", random(3)); + TP->cause_typed_damage(TP, "left arm", random(3), "untyped"); break; case 3: write("%^ORANGE%^The ropes tighten around your neck and choke " "you as you struggle to free yourself."); if(random(2)) tell_room(ETP,TPQCN+" coughs and seems to be choking.", TP); - TP->do_damage("neck", random(5)+2); + TP->cause_typed_damage(TP, "neck", random(5)+2, "untyped"); break; case 4: write("The ropes chafe against your skin as you struggle. " "Some of the blisters break open and begin to bleed."); if(random(3)) tell_room(ETP,TPQCN+" winces as "+TP->query_subjective()+ " struggles against the ropes.", TP); - TP->do_damage("torso", random(4)); + TP->cause_typed_damage(TP, "torso", random(4), "untyped"); break; case 10: write("You pray your captors don't return or notice before " "you manage to break free."); diff --git a/cmds/mortal/_throw.c b/cmds/mortal/_throw.c index c16c74eba..eba430144 100644 --- a/cmds/mortal/_throw.c +++ b/cmds/mortal/_throw.c @@ -244,7 +244,7 @@ int cmd_throw(string str) damage+= distance; foe->add_attacker(TP); //foe->bow_hit(TO, damage); - foe->do_damage(foe->query_target_limb(), damage); + foe->cause_typed_damage(foe, foe->return_target_limb(), damage, what_ob->query_damage_type()); if(objectp(what_ob)) { if(objectp(foe)) { if(what_ob->move(foe) != MOVE_OK){ diff --git a/cmds/mortal/obj/digob.c b/cmds/mortal/obj/digob.c index 1656863c6..e2186a1ca 100644 --- a/cmds/mortal/obj/digob.c +++ b/cmds/mortal/obj/digob.c @@ -92,7 +92,7 @@ void move_rubble(string ext, object tp) if (tp->query_stats("constitution") < random(25)) { tell_object(tp, "You hurt your back moving the stone."); - tp->do_damage("torso", random(5) + 1); + tp->cause_typed_damage(tp, "torso", roll_dice(1, 5), "untyped"); } tell_object(tp, "You slowly move the rubble out of the way."); @@ -124,4 +124,4 @@ void move_rubble(string ext, object tp) tim = 10 / tim; call_out("move_rubble", tim, ext, tp); } -} +} \ No newline at end of file diff --git a/cmds/priest/backup/_dictum.c b/cmds/priest/backup/_dictum.c index eeb390e9a..38c16c472 100644 --- a/cmds/priest/backup/_dictum.c +++ b/cmds/priest/backup/_dictum.c @@ -84,7 +84,7 @@ spell_effect(int prof) "bolt!",({target,caster})); damage = roll_dice(clevel,6)/2; } - target->do_damage(target->return_target_limb(),damage); + damage_targ(target, target->return_target_limb(), damage, "divine"); spell_kill(target,caster); dest_effect(); } diff --git a/cmds/priest/backup/_moonfire.c b/cmds/priest/backup/_moonfire.c index 56327df03..93216bd82 100644 --- a/cmds/priest/backup/_moonfire.c +++ b/cmds/priest/backup/_moonfire.c @@ -65,7 +65,7 @@ void spell_effect(int prof) attackers[i]->set_paralyzed(roll_dice(2,6),"%^BOLD%^%^CYAN%^You are unable to move!"); } spell_kill(attackers[i],caster); - attackers[i]->do_damage(attackers[i]->return_target_limb(),damage); + damage_targ(attackers[i], attackers[i]->return_target_limb(), damage, "divine"); } spell_successful(); dest_effect(); diff --git a/cmds/priest/backup/slay_living.saide.5-19.04 b/cmds/priest/backup/slay_living.saide.5-19.04 index e317de735..80e09483a 100644 --- a/cmds/priest/backup/slay_living.saide.5-19.04 +++ b/cmds/priest/backup/slay_living.saide.5-19.04 @@ -83,7 +83,7 @@ void next_step(object caster, object target) { if (SAVING_D->saving_throw(target, "paralyzation_poison_death",0) ) { tell_object(target,"%^BOLD%^%^CYAN%^As the scythes slice into your flesh, you feel a cold chill attempt to\nstop your heart, but it fails to do so.\n%^RED%^The furtive figures vanish back to the land of the dead.%^RESET%^"); tell_room(env,"%^BOLD%^%^CYAN%^The scythes slice deep into "+it+"'s flesh!\n%^RED%^However, the furtive figures vanish back to the land of \nthe dead leaving "+it+" standing among the living.%^RESET%^",target); - damage_targ(target, target->query_target_limb(),(roll_dice(2,8))+1); + damage_targ(target, target->return_target_limb(),(roll_dice(2,8))+1); if (!spell_kill(target, caster)) return 1; target->set_property("no death", 1); dest_effect(); @@ -92,7 +92,7 @@ void next_step(object caster, object target) { tell_room(env, "%^RESET%^%^RED%^The furtive figures slice their scythes deep into "+it+"'s flesh!\n%^BOLD%^%^WHITE%^"+him+" grins as the figures drag "+it+" into the land of the dead!%^RESET%^",({caster,target})); tell_object(target,"%^RESET%^%^RED%^The furtive figures slice their scythes deep into your flesh!\n%^BOLD%^%^WHITE%^"+him+" grins as the figures drag you into the land of the dead!%^RESET%^"); tell_object(caster,"%^RESET%^%^RED%^The furtive figures slice their scythes deep into "+it+"'s flesh!\n%^BOLD%^%^WHITE%^You grin as the figures drag "+it+" into the land of the dead!%^RESET%^"); - damage_targ(target,target->query_target_limb(),(int)target->query_max_hp() + 10); + damage_targ(target,target->return_target_limb(),(int)target->query_max_hp() + 10); if (objectp(target)) if (!spell_kill(target, caster)) return 1; dest_effect(); diff --git a/cmds/priest/godspells/_holy_star.c b/cmds/priest/godspells/_holy_star.c index 2c7270fcf..f6b0672ce 100644 --- a/cmds/priest/godspells/_holy_star.c +++ b/cmds/priest/godspells/_holy_star.c @@ -49,7 +49,7 @@ void spell_effect(int prof) { ""+target->QCN+"!",({caster, target}) ); } //} - damage_targ(target, target->query_target_limb(), numdarts); + damage_targ(target, target->return_target_limb(), numdarts); dest_effect(); } diff --git a/cmds/skills/bak/_lockpick.c b/cmds/skills/bak/_lockpick.c index c6f1991ab..17a491957 100644 --- a/cmds/skills/bak/_lockpick.c +++ b/cmds/skills/bak/_lockpick.c @@ -42,7 +42,7 @@ int cmd_lockpick(string str) { write("You fail to pick the lock.\n"); if((int)this_player()->query_stats("dexterity") < random(101)) { write("You cut yourself on the lock!\n"); - this_player()->do_damage((string)this_player()->return_limb(), random(10)); + this_player()->cause_typed_damage(this_player(), this_player()->return_target_limb(), random(10), "untyped"); say(this_player()->query_cap_name()+" gets cut picking the lock.\n"); this_player()->add_skill_points("locks", random(5)); return 1; diff --git a/cmds/spells/a/_acid_splash.c b/cmds/spells/a/_acid_splash.c index 752d0eb12..32bb77235 100644 --- a/cmds/spells/a/_acid_splash.c +++ b/cmds/spells/a/_acid_splash.c @@ -21,7 +21,7 @@ spell_effect(int prof) { tell_object(caster,"%^BOLD%^%^GREEN%^You open a portal above "+target->QCN+" and some acid splashes through it!"); tell_room(place,"%^BOLD%^%^GREEN%^A portal opens above "+target->QCN+" and some acid pours through it!", ({caster}) ); } - damage_targ(target, target->query_target_limb(), sdamage,"acid"); + damage_targ(target, target->return_target_limb(), sdamage,"acid"); TO->dest_effect(); } diff --git a/cmds/spells/a/_apopsi.c b/cmds/spells/a/_apopsi.c index 561b8ccba..8a4f43b95 100644 --- a/cmds/spells/a/_apopsi.c +++ b/cmds/spells/a/_apopsi.c @@ -72,7 +72,7 @@ void spell_effect(int prof) tell_object(caster, "%^BOLD%^Your psychic attack causes your opponent intense mental pain!"); tell_object(target, "%^BOLD%^You suffer intense mental pain from " + caster->QCN + "'s psychic assault!"); amount = sdamage / 2; - damage_targ(target, target->query_target_limb(), amount, "mental"); + damage_targ(target, target->return_target_limb(), amount, "mental"); } spell_successful(); diff --git a/cmds/spells/b/_banshee_blast.c b/cmds/spells/b/_banshee_blast.c index 0781bc490..d410f990f 100644 --- a/cmds/spells/b/_banshee_blast.c +++ b/cmds/spells/b/_banshee_blast.c @@ -56,7 +56,7 @@ void spell_effect(int prof) "/std/effect/status/panicked"->apply_effect(foe, clevel / 12 + 1); } } - damage_targ(foe, foe->query_target_limb(), dam, "sonic"); + damage_targ(foe, foe->return_target_limb(), dam, "sonic"); } } diff --git a/cmds/spells/b/_black_tentacles.c b/cmds/spells/b/_black_tentacles.c index 5b24fadb2..1d39cde9f 100644 --- a/cmds/spells/b/_black_tentacles.c +++ b/cmds/spells/b/_black_tentacles.c @@ -171,7 +171,7 @@ void do_tentacles() { tell_object(caught[i],"%^CYAN%^The tentacle squeezes the life from you!"); tell_room(place,"%^CYAN%^The tentacle squeezes around "+caught[i]->QCN+"!",caught[i]); - damage_targ(caught[i], caught[i]->query_target_limb(), mydam,"bludgeoning"); + damage_targ(caught[i], caught[i]->return_target_limb(), mydam,"bludgeoning"); } else { diff --git a/cmds/spells/b/_boneshaker.c b/cmds/spells/b/_boneshaker.c index 402a8b1fe..ad49882d6 100644 --- a/cmds/spells/b/_boneshaker.c +++ b/cmds/spells/b/_boneshaker.c @@ -25,7 +25,7 @@ void spell_effect(int prof) tell_object(caster,"%^BOLD%^%^WHITE%^You will the crushing of "+target->QCN+"'s internals!"); tell_room(place,"%^BOLD%^%^WHITE%^"+target->QCN+" staggers in pain!", ({caster, target}) ); tell_object(target,"%^BOLD%^%^WHITE%^Your bones ache painfully as the spell hits you!"); - damage_targ(target, target->query_target_limb(), sdamage,"untyped"); + damage_targ(target, target->return_target_limb(), sdamage,"untyped"); spell_successful(); TO->dest_effect(); } diff --git a/cmds/spells/b/_boneshatter.c b/cmds/spells/b/_boneshatter.c index dcd8e4900..ef959e2c2 100644 --- a/cmds/spells/b/_boneshatter.c +++ b/cmds/spells/b/_boneshatter.c @@ -30,7 +30,7 @@ void spell_effect(int prof) tell_object(caster,"%^BOLD%^%^WHITE%^You will the crushing of "+target->QCN+"'s internals!"); tell_room(place,"%^BOLD%^%^WHITE%^"+target->QCN+" staggers as you hear a crushing sound!", ({caster, target}) ); tell_object(target,"%^BOLD%^%^WHITE%^Your bones ache painfully as the spell hits you!"); - damage_targ(target, target->query_target_limb(), sdamage,"untyped"); + damage_targ(target, target->return_target_limb(), sdamage,"untyped"); duration = clevel/4+1; if(do_save(target,0)) diff --git a/cmds/spells/c/_cacophonic_shield.c b/cmds/spells/c/_cacophonic_shield.c index eca8190a0..929e55ae6 100644 --- a/cmds/spells/c/_cacophonic_shield.c +++ b/cmds/spells/c/_cacophonic_shield.c @@ -61,7 +61,7 @@ void execute_attack(){ tell_room(environment(caster),"%^YELLOW%^"+baddie+" gets a little too close and is knocked aside by the rippling barrier of sound surrounding "+caster->QCN+"!",({caster,ppl})); tell_object(caster,"%^YELLOW%^"+baddie+" gets a little too close to you, and is knocked aside by your defensive barrier of sonic!"); tell_object(ppl,"%^YELLOW%^You get a little too close to "+caster->QCN+", and the rippling barrier of sound surrounding "+caster->QO+" knocks you aside!"); - damage_targ(ppl,ppl->query_target_limb(),extra,"sonic"); + damage_targ(ppl,ppl->return_target_limb(),extra,"sonic"); counter++; if (counter > clevel) { dest_effect(); diff --git a/cmds/spells/c/_circle_of_death.c b/cmds/spells/c/_circle_of_death.c index 9f5393cbd..f4309bcc9 100644 --- a/cmds/spells/c/_circle_of_death.c +++ b/cmds/spells/c/_circle_of_death.c @@ -49,7 +49,7 @@ void spell_effect(int prof) tell_object(foe, "%^BLUE%^%^BOLD%^Your life ends, as negative energy destroys your very soul!"); tell_room(place, "%^BLUE%^%^BOLD%^" + foe->QCN + " crumbles to dust!", foe); - damage_targ(foe, foe->query_target_limb(), foe->query_max_hp() * 2, "negative energy"); + damage_targ(foe, foe->return_target_limb(), foe->query_max_hp() * 2, "negative energy"); max -= foe->query_level(); } diff --git a/cmds/spells/c/_clashing_rocks.c b/cmds/spells/c/_clashing_rocks.c index 3968ede78..117ca9f82 100644 --- a/cmds/spells/c/_clashing_rocks.c +++ b/cmds/spells/c/_clashing_rocks.c @@ -59,11 +59,11 @@ void spell_effect(int prof) // Ray of ending, WOK and this one should share disadvantage value if (combat_death_save(target, 0)) { tell_object(target, "%^BOLD%^%^BLACK%^You barely make an escape from being crushed to dust!"); - damage_targ(target, target->query_target_limb(), sdamage, "bludgeoning"); + damage_targ(target, target->return_target_limb(), sdamage, "bludgeoning"); } else { tell_object(target, "%^BOLD%^%^BLACK%^You are crushed by the rocks, and die."); tell_room(place, "%^BOLD%^%^BLACK%^" + target->QCN + " dies being crushed by the rocks.", target); - damage_targ(target, target->query_target_limb(), target->query_max_hp() * 2, "bludgeoning"); + damage_targ(target, target->return_target_limb(), target->query_max_hp() * 2, "bludgeoning"); target->die(); } } diff --git a/cmds/spells/d/_destruction.c b/cmds/spells/d/_destruction.c index 7ee09b4bc..c93406c67 100644 --- a/cmds/spells/d/_destruction.c +++ b/cmds/spells/d/_destruction.c @@ -29,7 +29,7 @@ spell_effect() tell_object(caster,"%^BOLD%^%^BLUE%^You simply unmake some of "+target->QCN+"!"); tell_room(place,"%^BOLD%^%^BLUE%^"+caster->QCN+" unmakes some of "+target->QCN+" with "+caster->QP+" spell!", ({caster}) ); } - damage_targ(target, target->query_target_limb(), sdamage,"divine"); + damage_targ(target, target->return_target_limb(), sdamage,"divine"); if(target->query_hp()<0) target->die(); TO->dest_effect(); diff --git a/cmds/spells/d/_dictum.c b/cmds/spells/d/_dictum.c index f2decbaa1..ea8ad6e57 100644 --- a/cmds/spells/d/_dictum.c +++ b/cmds/spells/d/_dictum.c @@ -55,7 +55,7 @@ void spell_effect() if (!combat_death_save(target, 6)) { tell_room(place, "%^BOLD%^Upon hearing the words, " + target->QCN + " simply dies!", target); tell_object(target, "%^BOLD%^YOU OBEY AND DIE."); - damage_targ(target, target->query_target_limb(), target->query_max_hp() * 2, "mental"); + damage_targ(target, target->return_target_limb(), target->query_max_hp() * 2, "mental"); } } diff --git a/cmds/spells/d/_disrupt_undead.c b/cmds/spells/d/_disrupt_undead.c index 1927aacaa..6b76038ba 100644 --- a/cmds/spells/d/_disrupt_undead.c +++ b/cmds/spells/d/_disrupt_undead.c @@ -32,6 +32,6 @@ spell_effect(int prof) { tell_room(place,"%^YELLOW%^"+caster->QCN+" chants sonorously and directs a ray of light at "+target->QCN+"!", ({caster}) ); } tell_object(place,"%^YELLOW%^A ray of light scorches "+target->QP+"!"); - damage_targ(target, target->query_target_limb(), sdamage,"positive energy"); + damage_targ(target, target->return_target_limb(), sdamage,"positive energy"); TO->dest_effect(); } diff --git a/cmds/spells/d/_dissonance.c b/cmds/spells/d/_dissonance.c index 90b99f99a..8e00abe07 100644 --- a/cmds/spells/d/_dissonance.c +++ b/cmds/spells/d/_dissonance.c @@ -42,7 +42,7 @@ void spell_effect(int prof) spell_successful(); "/std/effect/status/sickened"->apply_effect(target,roll_dice(2,4)); - damage_targ(target,target->query_target_limb(),sdamage,"mental"); + damage_targ(target,target->return_target_limb(),sdamage,"mental"); dest_effect(); } diff --git a/cmds/spells/d/_dissonant_whispers.c b/cmds/spells/d/_dissonant_whispers.c index ce7c80f61..ce11a2ff6 100644 --- a/cmds/spells/d/_dissonant_whispers.c +++ b/cmds/spells/d/_dissonant_whispers.c @@ -25,7 +25,7 @@ spell_effect(int prof) tell_room(place,"%^BOLD%^%^WHITE%^"+caster->QCN+" whispers a song towards "+target->QCN+".", ({target}) ); tell_object(target,"%^BOLD%^%^WHITE%^"+caster->QCN+"'s whispers are just maddening, mean and hurtful!"+target->QCN+".", ({caster}) ); } - damage_targ(target, target->query_target_limb(), sdamage,"mental"); + damage_targ(target, target->return_target_limb(), sdamage,"mental"); TO->dest_effect(); } diff --git a/cmds/spells/d/_divine_power.c b/cmds/spells/d/_divine_power.c index a504792fd..dff004100 100644 --- a/cmds/spells/d/_divine_power.c +++ b/cmds/spells/d/_divine_power.c @@ -68,7 +68,8 @@ void berserk() } if ((!caster->is_in_combat()) && (!random(10))) { - caster->do_damage("torso", random(2) + 1); + //caster->do_damage("torso", random(2) + 1); + damage_targ(caster, "torso", roll_dice(1,2), "untyped"); tell_object(caster, "%^BOLD%^%^RED%^You hurt yourself in your lust for battle and victory."); } call_out("berserk", ROUND_LENGTH); diff --git a/cmds/spells/e/_energy_retort.c b/cmds/spells/e/_energy_retort.c index b397b35ae..8bedfb2ea 100644 --- a/cmds/spells/e/_energy_retort.c +++ b/cmds/spells/e/_energy_retort.c @@ -84,7 +84,7 @@ void execute_attack(){ "energy lashes out at "+baddie+"!"); tell_object(ppl,"%^YELLOW%^A sudden surge of energy from "+ ""+caster->QCN+" lashes out at you!"); - damage_targ(ppl,ppl->query_target_limb(),sdamage,"mental"); + damage_targ(ppl,ppl->return_target_limb(),sdamage,"mental"); counter++; if (counter > clevel) { dest_effect(); diff --git a/cmds/spells/f/_finger_of_death.c b/cmds/spells/f/_finger_of_death.c index 193c5ff79..d65f3b572 100644 --- a/cmds/spells/f/_finger_of_death.c +++ b/cmds/spells/f/_finger_of_death.c @@ -43,13 +43,13 @@ void spell_effect(int prof) if (combat_death_save(target, 6)) { tell_object(target, "%^BOLD%^The struggle is won, yet at a price."); tell_room(place, "%^BOLD%^The soul survives, yet at a price.", target); - damage_targ(target, target->query_target_limb(), sdamage, "negative energy"); + damage_targ(target, target->return_target_limb(), sdamage, "negative energy"); target->set_property("no_slay", ({ caster->query_name() })); } else { tell_room(place, "%^BOLD%^%^BLUE%^The soul is cleaved from its body and left to drift homelessly!"); tell_room(place, "%^BOLD%^%^MAGENTA%^The lifeless, soulless, body of " + target->QCN + " drops to the ground!", target); tell_object(target, "%^BOLD%^%^RED%^You sense a few last things as your soul is ripped from you body!\n"); - damage_targ(target, target->query_target_limb(), target->query_max_hp() * 2, "negative energy"); + damage_targ(target, target->return_target_limb(), target->query_max_hp() * 2, "negative energy"); target->die(); } dest_effect(); diff --git a/cmds/spells/f/_flaming_sphere.c b/cmds/spells/f/_flaming_sphere.c index 6507fa473..86905042f 100644 --- a/cmds/spells/f/_flaming_sphere.c +++ b/cmds/spells/f/_flaming_sphere.c @@ -93,14 +93,14 @@ spell_effect(int prof){ effect = to_int(effect/2); tell_room(place, "%^RED%^The sphere scorches "+hits[i]->QCN+" as it passes!%^RESET%^",({hits[i]}) ); tell_object(hits[i], "%^RED%^The burns you as it passes!%^RESET%^"); - damage_targ(hits[i], hits[i]->query_target_limb(), effect,"fire"); + damage_targ(hits[i], hits[i]->return_target_limb(), effect,"fire"); if (!size) { break; } } tell_object(target,"%^YELLOW%^The sphere crashes into you, and you burn in agony!%^RESET%^"); tell_room(place,"%^YELLOW%^The sphere crashes into "+HIM+", making "+target->QO+" writhe in agony!%^RESET%^", target); - damage_targ(target, target->query_target_limb(), sdamage,"fire"); + damage_targ(target, target->return_target_limb(), sdamage,"fire"); dest_effect(); } diff --git a/cmds/spells/f/_fold_space.c b/cmds/spells/f/_fold_space.c index e36ca2a83..b9b26368c 100644 --- a/cmds/spells/f/_fold_space.c +++ b/cmds/spells/f/_fold_space.c @@ -48,7 +48,7 @@ void spell_effect(int prof) { "passage and the power backfires."); tell_room(place,caster->QCN+" "+ "looks startled.",caster); - damage_targ(caster, caster->query_target_limb(), sdamage, "mental"); + damage_targ(caster, caster->return_target_limb(), sdamage, "mental"); dest_effect(); return; } diff --git a/cmds/spells/f/_form_of_doom.c b/cmds/spells/f/_form_of_doom.c index a2a0d2201..6bbc5a131 100644 --- a/cmds/spells/f/_form_of_doom.c +++ b/cmds/spells/f/_form_of_doom.c @@ -114,7 +114,7 @@ void execute_attack(){ "%^RESET%^t%^BOLD%^%^BLACK%^a%^RESET%^c%^RED%^l%^BOLD%^e%^BLACK%^s surrounding " ""+caster->QCN+" lash out at you with a sickening %^RESET%^%^RED%^sm%^BOLD%^a" "%^RESET%^%^RED%^ck%^BOLD%^%^BLACK%^!%^RESET%^"); - damage_targ(ppl,ppl->query_target_limb(),extra,"mental"); + damage_targ(ppl,ppl->return_target_limb(),extra,"mental"); } room = environment(caster); party = (string)caster->query_party(); diff --git a/cmds/spells/f/_frigid_touch.c b/cmds/spells/f/_frigid_touch.c index b5f784c83..5face25df 100644 --- a/cmds/spells/f/_frigid_touch.c +++ b/cmds/spells/f/_frigid_touch.c @@ -72,7 +72,7 @@ spell_effect(int prof) tell_room(place, "%^BOLD%^%^CYAN%^" + caster->QCN + " reaches out and touches " + target->QCN + "'s " + target_limb + "...", ({ caster, target })); spell_successful(); - damage_targ(target, target->query_target_limb(), sdamage, "cold"); + damage_targ(target, target->return_target_limb(), sdamage, "cold"); target->set_tripped(roll_dice(1, 6), "%^BOLD%^%^CYAN%^You are staggered by the cold!%^RESET%^"); target->use_stamina(sdamage / 6); diff --git a/cmds/spells/f/_frost_breath.c b/cmds/spells/f/_frost_breath.c index fe952a7c0..8384b38d9 100644 --- a/cmds/spells/f/_frost_breath.c +++ b/cmds/spells/f/_frost_breath.c @@ -76,9 +76,9 @@ void spell_effect(int prof){ spell_kill(attackers[i],caster); if(!do_save(attackers[i],0)) //if(!SAVING_D->saving_throw(attackers[i],"spell",0)) - attackers[i]->do_damage(attackers[i]->return_target_limb(),damage,"cold"); + damage_targ(attackers[i], attackers[i]->return_target_limb(), damage, "cold"); else - attackers[i]->do_damage(attackers[i]->return_target_limb(),damage/2,"cold"); + damage_targ(attackers[i], attackers[i]->return_target_limb(), damage/2, "cold"); } else { @@ -87,13 +87,13 @@ void spell_effect(int prof){ tell_room(place,"%^BOLD%^%^CYAN%^"+attackers[i]->QCN+" is chilled by the " "shards of ice!",attackers[i]); tell_object(attackers[i],"%^BOLD%^%^CYAN%^You are chilled by the ice."); - attackers[i]->do_damage(attackers[i]->return_target_limb(),damage,"cold"); + damage_targ(attackers[i], attackers[i]->return_target_limb(), damage, "cold"); spell_kill(attackers[i],caster); }else{ tell_room(place,"%^CYAN%^"+attackers[i]->QCN+" jumps out of the way just"+ " as the frosty breath about to hit!",attackers[i]); tell_object(attackers[i],"%^CYAN%^You are only slightly chilled by the cold."); - attackers[i]->do_damage(attackers[i]->return_target_limb(),damage/2,"cold"); + damage_targ(attackers[i], attackers[i]->return_target_limb(), damage/2, "cold"); spell_kill(attackers[i],caster); } } diff --git a/cmds/spells/g/_glacier.c b/cmds/spells/g/_glacier.c index b4940fe2e..23cb374e3 100644 --- a/cmds/spells/g/_glacier.c +++ b/cmds/spells/g/_glacier.c @@ -26,7 +26,7 @@ spell_effect() tell_object(target, "%^BOLD%^%^CYAN%^A humongous pl%^CYAN%^a%^BLUE%^t%^WHITE%^f%^CYAN%^o%^BLUE%^r%^CYAN%^m %^BLUE%^o%^WHITE%^f i%^CYAN%^c%^BLUE%^e%^WHITE%^ appears by " + caster->QCN + "'s side and propels towards " + target->QCN + " with force.%^RESET%^", ({ caster, target })); } define_base_damage(2); - damage_targ(target, target->query_target_limb(), sdamage / 2, "cold"); - damage_targ(target, target->query_target_limb(), sdamage / 2, "bludgeoning"); + damage_targ(target, target->return_target_limb(), sdamage / 2, "cold"); + damage_targ(target, target->return_target_limb(), sdamage / 2, "bludgeoning"); dest_effect(); } diff --git a/cmds/spells/g/_greater_ruin.c b/cmds/spells/g/_greater_ruin.c index a6b1c27a7..9d5ea1bdc 100644 --- a/cmds/spells/g/_greater_ruin.c +++ b/cmds/spells/g/_greater_ruin.c @@ -27,7 +27,7 @@ spell_effect(int prof) tell_object(caster,"%^BOLD%^%^WHITE%^You simply unmake some of "+target->QCN+"!"); tell_room(place,"%^BOLD%^%^WHITE%^"+caster->QCN+" unmakes some of "+target->QCN+" with "+caster->QP+" spell!", ({caster}) ); } - damage_targ(target, target->query_target_limb(), sdamage,"untyped"); + damage_targ(target, target->return_target_limb(), sdamage,"untyped"); TO->dest_effect(); } diff --git a/cmds/spells/g/_greater_teleport.c b/cmds/spells/g/_greater_teleport.c index 9d80e385d..b8a7a2dc6 100644 --- a/cmds/spells/g/_greater_teleport.c +++ b/cmds/spells/g/_greater_teleport.c @@ -39,7 +39,7 @@ void spell_effect(int prof) if(!TELEPORT->object_can_be_teleported(caster,endplace,clevel)) { tell_object(caster,"You sense something is wrong with your spell and it backfires."); - damage_targ(caster, caster->query_target_limb(), sdamage / 4, "mental"); + damage_targ(caster, caster->return_target_limb(), sdamage / 4, "mental"); tell_room(place,caster->QCN+" "+ "looks startled.",caster); dest_effect(); diff --git a/cmds/spells/h/_hellfire_ray.c b/cmds/spells/h/_hellfire_ray.c index 6d53b341b..9e32ae3cd 100644 --- a/cmds/spells/h/_hellfire_ray.c +++ b/cmds/spells/h/_hellfire_ray.c @@ -31,8 +31,8 @@ spell_effect(int prof) tell_room(place,"%^BOLD%^%^WHITE%^"+caster->QCN+" opens "+caster->QP+" hands and releases %^RED%^ray of %^ORANGE%^hell%^BLACK%^fire%^WHITE%^ at "+caster->QP+"!", ({caster}) ); tell_object(target,"%^BOLD%^%^WHITE%^It burns your very soul!%^RESET%^"); } - damage_targ(target, target->query_target_limb(), sdamage/2,"fire"); - damage_targ(target, target->query_target_limb(), sdamage/2,"divine"); + damage_targ(target, target->return_target_limb(), sdamage/2,"fire"); + damage_targ(target, target->return_target_limb(), sdamage/2,"divine"); TO->dest_effect(); } diff --git a/cmds/spells/i/_implosion.c b/cmds/spells/i/_implosion.c index 74ed9f186..e07120701 100644 --- a/cmds/spells/i/_implosion.c +++ b/cmds/spells/i/_implosion.c @@ -28,7 +28,7 @@ spell_effect(int prof) tell_object(caster, "%^BOLD%^%^WHITE%^You extend your hand and will to crush " + target->QCN + "!"); tell_room(place, "%^BOLD%^%^WHITE%^" + caster->QCN + " extends hand and wills to crush " + target->QCN + " with " + caster->QP + " spell!", ({ caster })); } - damage_targ(target, target->query_target_limb(), sdamage, "untyped"); + damage_targ(target, target->return_target_limb(), sdamage, "untyped"); TO->dest_effect(); } diff --git a/cmds/spells/l/_life_blast.c b/cmds/spells/l/_life_blast.c index ab5d7de4b..fab9a88cd 100644 --- a/cmds/spells/l/_life_blast.c +++ b/cmds/spells/l/_life_blast.c @@ -56,7 +56,7 @@ void spell_effect(int prof) tell_object(foe, "%^ORANGE%^%^BOLD%^Your unlife ends, as positive energy destroys your essence!"); tell_room(place, "%^ORANGE%^%^BOLD%^" + foe->QCN + " crumbles to dust!", foe); - damage_targ(foe, foe->query_target_limb(), foe->query_max_hp() * 2, "positive energy"); + damage_targ(foe, foe->return_target_limb(), foe->query_max_hp() * 2, "positive energy"); } spell_successful(); diff --git a/cmds/spells/l/_lions_charge.c b/cmds/spells/l/_lions_charge.c index db37a59ab..7fbcb52b3 100644 --- a/cmds/spells/l/_lions_charge.c +++ b/cmds/spells/l/_lions_charge.c @@ -107,7 +107,7 @@ void spell_effect(int prof) { "into you, knocking you unconscious.\n"); } } - damage_targ(target, target->query_target_limb(), damage, "force"); + damage_targ(target, target->return_target_limb(), damage, "force"); spell_successful(); dest_effect(); return; diff --git a/cmds/spells/m/_magic_missile.c b/cmds/spells/m/_magic_missile.c index 480c42709..77d892ec8 100644 --- a/cmds/spells/m/_magic_missile.c +++ b/cmds/spells/m/_magic_missile.c @@ -80,7 +80,7 @@ spell_effect(int prof) { tell_object(target,"%^BOLD%^%^RED%^A dart of energy shoots from "+caster->QCN+"'s hand and "+hardness+"s you!"); tell_room(place,"%^BOLD%^%^RED%^A dart of energy shoots from "+caster->QCN+"'s hand and "+hardness+"s "+target->QO+"!",({caster, target}) ); } - damage_targ(target, target->query_target_limb(), sdamage,"force"); + damage_targ(target, target->return_target_limb(), sdamage,"force"); spell_successful(); dest_effect(); return; diff --git a/cmds/spells/m/_mind_thrust.c b/cmds/spells/m/_mind_thrust.c index 36f76e3af..8356b1129 100644 --- a/cmds/spells/m/_mind_thrust.c +++ b/cmds/spells/m/_mind_thrust.c @@ -50,7 +50,7 @@ spell_effect(int prof) { "head snaps back suddenly, leaving "+target->QO+" "+ "looking confused!",({caster, target}) ); } - damage_targ(target, target->query_target_limb(), damage,"mental"); + damage_targ(target, target->return_target_limb(), damage,"mental"); TO->dest_effect(); } diff --git a/cmds/spells/n/_necrophage.c b/cmds/spells/n/_necrophage.c index 402de51a0..c56579aec 100644 --- a/cmds/spells/n/_necrophage.c +++ b/cmds/spells/n/_necrophage.c @@ -33,7 +33,7 @@ spell_effect(int prof) tell_room(place,"%^BOLD%^%^GREEN%^"+caster->QCN+" completes the spell and releases acidic slime at "+target->QCN+".",target); tell_object(target,"%^BOLD%^%^GREEN%^"+caster->QCN+" and releases the acidic slime at.",target); - damage_targ(target, target->query_target_limb(), sdamage,"acid"); + damage_targ(target, target->return_target_limb(), sdamage,"acid"); if (target->is_undead()) { undeadt = 1; } @@ -93,7 +93,7 @@ void rot_again() define_base_damage(0); tell_room(ENV(target),"%^BOLD%^%^GREEN%^The acidic slime continues to rot away "+target->QCN+"'s essence!%^RESET%^",target); tell_object(target,"%^BOLD%^%^GREEN%^The acidic slime burns through you!%^RESET%^"); - damage_targ(target, target->query_target_limb(), dam,"acid"); + damage_targ(target, target->return_target_limb(), dam,"acid"); if(num-- < 0) { diff --git a/cmds/spells/n/_nightmare.c b/cmds/spells/n/_nightmare.c index 03c1d80c2..21ac13646 100644 --- a/cmds/spells/n/_nightmare.c +++ b/cmds/spells/n/_nightmare.c @@ -35,7 +35,7 @@ spell_effect() "/std/effect/status/fatigued"->apply_effect(target, clevel / 4 + 1); } - damage_targ(target, target->query_target_limb(), sdamage, "mental"); + damage_targ(target, target->return_target_limb(), sdamage, "mental"); tell_object(target, "%^BLUE%^A heavy nightmarish vision descends upon you as " + caster->QCN + " completes the spell."); tell_room(ENV(target), "%^BLUE%^" + target->QCN + " shudders and staggers as feeling of dread swipes by the area.", target); diff --git a/cmds/spells/n/_nightmare_maw.c b/cmds/spells/n/_nightmare_maw.c index 584a89377..b1a454dad 100644 --- a/cmds/spells/n/_nightmare_maw.c +++ b/cmds/spells/n/_nightmare_maw.c @@ -30,7 +30,7 @@ spell_effect(int prof) tell_room(place,"%^BOLD%^%^BLACK%^As "+caster->QCN+" completes the chant, giant maw floats towards "+target->QCN+" and plunges its teeth into them.",target); tell_object(target,"%^BOLD%^%^BLACK%^As "+caster->QCN+" completes the chant, giant maw floats towards you and plunges its teeth into them.",target); - damage_targ(target, target->query_target_limb(), sdamage,"slashing"); + damage_targ(target, target->return_target_limb(), sdamage,"slashing"); num = clevel / 8 + 1; if(do_save(target,0)) num/=2; @@ -55,7 +55,7 @@ void bite_again() define_base_damage(0); tell_room(ENV(target),"%^BOLD%^%^BLACK%^The maw continues to nibble on "+target->QCN+"!%^RESET%^",target); tell_object(target,"%^BOLD%^%^BLACK%^The maw nibbles on you!%^RESET%^"); - damage_targ(target, target->query_target_limb(), sdamage/6,"slashing"); + damage_targ(target, target->return_target_limb(), sdamage/6,"slashing"); if(num-- < 0) { diff --git a/cmds/spells/o/_orders_wrath.c b/cmds/spells/o/_orders_wrath.c index 9054231ae..5a488d9f6 100644 --- a/cmds/spells/o/_orders_wrath.c +++ b/cmds/spells/o/_orders_wrath.c @@ -48,7 +48,7 @@ void spell_effect(int prof) tell_object(caster,"%^BOLD%^The power of your voice manifests into three-dimensional grid and it slams into "+target->QCN+"!"); tell_object(target,"%^BOLD%^The power of "+caster->QCN+" voice manifests into three-dimensional grid and it slams into you!"); tell_room(place,"%^BOLD%^The power of your voice manifests into three-dimensional grid and it slams into "+target->QCN+"!",({caster,target})); - damage_targ(target, target->query_target_limb(), sdamage,"sonic" ); + damage_targ(target, target->return_target_limb(), sdamage,"sonic" ); dest_effect(); return; } diff --git a/cmds/spells/p/_planar_apotheosis.c b/cmds/spells/p/_planar_apotheosis.c index ada97067a..c3d37ec65 100644 --- a/cmds/spells/p/_planar_apotheosis.c +++ b/cmds/spells/p/_planar_apotheosis.c @@ -125,7 +125,7 @@ void execute_attack(){ "light%^WHITE%^ beams from "+caster->QCN+"%^BOLD%^%^WHITE%^'s eyes, striking " "you!%^RESET%^"); } - damage_targ(ppl,ppl->query_target_limb(),extra,"mental"); + damage_targ(ppl,ppl->return_target_limb(),extra,"mental"); counter++; if (counter > mylevel) { dest_effect(); diff --git a/cmds/spells/p/_psychic_crush.c b/cmds/spells/p/_psychic_crush.c index 082d2e936..c7c12fcea 100644 --- a/cmds/spells/p/_psychic_crush.c +++ b/cmds/spells/p/_psychic_crush.c @@ -65,7 +65,7 @@ void spell_effect() { tell_room(place,sprintf("The psychic assault crushes %s's mind completely and %s drops dead!",target->QCN,target->query_subjective())); tell_object(target,"You die as your mind is crushed!"); - damage_targ(target,target->query_target_limb(),target->query_max_hp()*2,"mental"); + damage_targ(target,target->return_target_limb(),target->query_max_hp()*2,"mental"); } } diff --git a/cmds/spells/r/_rage.c b/cmds/spells/r/_rage.c index 56b4c106f..b60b0a10d 100644 --- a/cmds/spells/r/_rage.c +++ b/cmds/spells/r/_rage.c @@ -82,7 +82,8 @@ void rage(){ } if ((!caster->is_in_combat()) && (!random(10))){ - caster->do_damage("torso",random(2)+1); + //caster->do_damage("torso",random(2)+1); + damage_targ(caster, "torso", roll_dice(1, 2), "untyped"); tell_object(caster,"%^BOLD%^%^RED%^You hurt yourself as your rage overwhelms you."); } call_out("rage",ROUND_LENGTH); diff --git a/cmds/spells/r/_ray_of_ending.c b/cmds/spells/r/_ray_of_ending.c index aa39d1e25..15c776858 100644 --- a/cmds/spells/r/_ray_of_ending.c +++ b/cmds/spells/r/_ray_of_ending.c @@ -50,11 +50,11 @@ void spell_effect(int prof) // WOK, clasing rocks and this one share disadvantage value. if (combat_death_save(target, 0)) { tell_object(target,"%^BOLD%^%^BLACK%^You sigh with relief as you endure the unmaking."); - damage_targ(target, target->query_target_limb(), sdamage, "untyped"); + damage_targ(target, target->return_target_limb(), sdamage, "untyped"); } else { tell_object(target,"%^BOLD%^%^BLACK%^You are no more."); tell_room(place, "%^BOLD%^%^BLACK%^" + target->QCN + " turns into a black smoke.", target); - damage_targ(target, target->query_target_limb(), target->query_max_hp() * 2, "untyped"); + damage_targ(target, target->return_target_limb(), target->query_max_hp() * 2, "untyped"); target->die(); } } diff --git a/cmds/spells/r/_ray_of_frost.c b/cmds/spells/r/_ray_of_frost.c index 5971f9c95..67b216fdf 100644 --- a/cmds/spells/r/_ray_of_frost.c +++ b/cmds/spells/r/_ray_of_frost.c @@ -28,7 +28,7 @@ spell_effect(int prof) { tell_room(place,"%^BOLD%^%^CYAN%^"+caster->QCN+" opens "+caster->QP+" hands and directs a ray of frost at "+target->QCN+"!", ({caster}) ); } tell_object(target,"%^BOLD%^%^CYAN%^You feel very cold!"); - damage_targ(target, target->query_target_limb(), sdamage,"cold"); + damage_targ(target, target->return_target_limb(), sdamage,"cold"); TO->dest_effect(); } diff --git a/cmds/spells/r/_recall_agony.c b/cmds/spells/r/_recall_agony.c index 298c43c4b..4e940b09a 100644 --- a/cmds/spells/r/_recall_agony.c +++ b/cmds/spells/r/_recall_agony.c @@ -46,7 +46,7 @@ void spell_effect(int prof) tell_object(target, "%^YELLOW%^You scream in pain as you feel your future and past pain all at once!%^RESET%^"); tell_room(place, sprintf("%s screams in pain as %s feels pain, both past and future!", target->QCN, target->QP)); - damage_targ(target, target->query_target_limb(), damage,"mental"); + damage_targ(target, target->return_target_limb(), damage,"mental"); this_object()->dest_effect(); } diff --git a/cmds/spells/r/_ruin.c b/cmds/spells/r/_ruin.c index d5c7f6267..ffd30b169 100644 --- a/cmds/spells/r/_ruin.c +++ b/cmds/spells/r/_ruin.c @@ -29,7 +29,7 @@ spell_effect(int prof) tell_object(caster,"%^BOLD%^%^WHITE%^You simply unmake some of "+target->QCN+"!"); tell_room(place,"%^BOLD%^%^WHITE%^"+caster->QCN+" unmakes some of "+target->QCN+" with "+caster->QP+" spell!", ({caster}) ); } - damage_targ(target, target->query_target_limb(), sdamage,"untyped"); + damage_targ(target, target->return_target_limb(), sdamage,"untyped"); TO->dest_effect(); } diff --git a/cmds/spells/s/_scorcher.c b/cmds/spells/s/_scorcher.c index bc7d87e20..f4c1d2a08 100644 --- a/cmds/spells/s/_scorcher.c +++ b/cmds/spells/s/_scorcher.c @@ -132,7 +132,7 @@ void spell_effect(int prof) { tell_room(place, "%^RED%^The fire blazes through "+hits[i]->QCN+"!",hits[i]); break; } - damage_targ(hits[i], hits[i]->query_target_limb(), sdamage,element); + damage_targ(hits[i], hits[i]->return_target_limb(), sdamage,element); } if(evade_splash(target)) { dest_effect(); return; } @@ -158,7 +158,7 @@ void spell_effect(int prof) { tell_room(place,"%^BOLD%^%^RED%^The infernal blaze burns into "+HIM+", blanketing "+target->QO+" in flames!", target); break; } - damage_targ(target, target->query_target_limb(), sdamage,element); + damage_targ(target, target->return_target_limb(), sdamage,element); dest_effect(); } diff --git a/cmds/spells/s/_serac.c b/cmds/spells/s/_serac.c index a8a0b09f5..ecc310953 100644 --- a/cmds/spells/s/_serac.c +++ b/cmds/spells/s/_serac.c @@ -25,7 +25,7 @@ spell_effect() tell_object(target, "%^BOLD%^%^CYAN%^A platform of ice appears by " + caster->QCN + "'s side and propels towards you with force.%^RESET%^"); tell_object(target, "%^BOLD%^%^CYAN%^A platform of ice appears by " + caster->QCN + "'s side and propels towards " + target->QCN + " with force.%^RESET%^", ({ caster, target })); } - damage_targ(target, target->query_target_limb(), sdamage / 2, "cold"); - damage_targ(target, target->query_target_limb(), sdamage / 2, "bludgeoning"); + damage_targ(target, target->return_target_limb(), sdamage / 2, "cold"); + damage_targ(target, target->return_target_limb(), sdamage / 2, "bludgeoning"); dest_effect(); } diff --git a/cmds/spells/s/_slay_living.c b/cmds/spells/s/_slay_living.c index e94ba7e2a..3689fd774 100644 --- a/cmds/spells/s/_slay_living.c +++ b/cmds/spells/s/_slay_living.c @@ -46,7 +46,7 @@ void spell_effect(int prof) tell_object(target, "%^BOLD%^The struggle is won, yet at a price."); tell_room(place, "%^BOLD%^The soul survives, yet at a price.", target); damage = roll_dice(clevel, 6); - damage_targ(target, target->query_target_limb(), damage, "negative energy"); + damage_targ(target, target->return_target_limb(), damage, "negative energy"); target->set_property("no_slay", ({ caster->query_name() })); } else { tell_room(place, "%^BOLD%^%^BLUE%^The soul is cleaved from its body and left to drift homelessly!"); diff --git a/cmds/spells/s/_snowball.c b/cmds/spells/s/_snowball.c index 1ce0f58cf..02c151a2e 100644 --- a/cmds/spells/s/_snowball.c +++ b/cmds/spells/s/_snowball.c @@ -37,7 +37,7 @@ spell_effect(int prof) { target->set_tripped(1, "You are staggered byt the painfully thrown snoball!"); } - damage_targ(target, target->query_target_limb(), dam, "bludgeoning"); + damage_targ(target, target->return_target_limb(), dam, "bludgeoning"); TO->dest_effect(); } diff --git a/cmds/spells/s/_solar_siege_shot.c b/cmds/spells/s/_solar_siege_shot.c index 892108f19..0dd584f2a 100644 --- a/cmds/spells/s/_solar_siege_shot.c +++ b/cmds/spells/s/_solar_siege_shot.c @@ -28,7 +28,7 @@ spell_effect(int prof) spell_successful(); tell_room(place,"%^BOLD%^%^WHITE%^The ballista makes a shot at "+target->QCN+" and then disappears!"); tell_room(place,"%^BOLD%^%^ORANGE%^A bolt made of light pierces "+target->QCN+"!"); - damage_targ(target, target->query_target_limb(), dam,"divine"); + damage_targ(target, target->return_target_limb(), dam,"divine"); TO->dest_effect(); } diff --git a/cmds/spells/s/_sound_burst.c b/cmds/spells/s/_sound_burst.c index afc326e39..3ec968d76 100644 --- a/cmds/spells/s/_sound_burst.c +++ b/cmds/spells/s/_sound_burst.c @@ -59,7 +59,7 @@ void spell_effect(int prof) "staggers back and clutches "+target->QP+" ears!"); tell_object(target, "%^CYAN%^%^BOLD%^"+caster->QCN+" snaps "+caster->QP+" fingers clearly in a gesture towards you, " "and the sound echoes in your ears magnified a hundred times!"); - damage_targ(target, target->query_target_limb(), damage,"sonic"); + damage_targ(target, target->return_target_limb(), damage,"sonic"); inven = all_inventory(environment(caster)); inven = filter_array(inven, "is_non_immortal",FILTERS_D); @@ -86,7 +86,7 @@ void spell_effect(int prof) tell_room(place,"%^CYAN%^"+hits[i]->QCN+" winces as echoes of the sound ring in "+hits[i]->QP+" ears!",hits[i]); tell_object(hits[i],"%^CYAN%^An echo of the snap rings in your ears, jarring your senses!"); - damage_targ(hits[i], hits[i]->query_target_limb(), damage,"sonic"); + damage_targ(hits[i], hits[i]->return_target_limb(), damage,"sonic"); if (!size) break; } dest_effect(); diff --git a/cmds/spells/s/_stone_throw.c b/cmds/spells/s/_stone_throw.c index 7ed10c8f5..54f1539cf 100644 --- a/cmds/spells/s/_stone_throw.c +++ b/cmds/spells/s/_stone_throw.c @@ -30,7 +30,7 @@ spell_effect(int prof) tell_object(caster, "%^ORANGE%^You project the stone into direction of " + target->QCN + "!"); tell_room(place, "%^ORANGE%^" + caster->QCN + " forcefully projects the stone at " + target->QCN + "!", ({ caster })); } - damage_targ(target, target->query_target_limb(), sdamage, "bludgeoning"); + damage_targ(target, target->return_target_limb(), sdamage, "bludgeoning"); TO->dest_effect(); } diff --git a/cmds/spells/s/_swarm_of_crystals.c b/cmds/spells/s/_swarm_of_crystals.c index 02ceb0e9f..08013672c 100644 --- a/cmds/spells/s/_swarm_of_crystals.c +++ b/cmds/spells/s/_swarm_of_crystals.c @@ -113,7 +113,7 @@ void spell_effect(int prof) { tell_room(place, "%^RESET%^%^MAGENTA%^The crystals shear into "+ ""+hits[i]->QCN+"!",({hits[i]}) ); tell_object(hits[i], "%^RESET%^%^MAGENTA%^The crystals shear into your flesh!"); - damage_targ(hits[i], hits[i]->query_target_limb(), sdamage,"slashing"); + damage_targ(hits[i], hits[i]->return_target_limb(), sdamage,"slashing"); if (!size) { break; } @@ -122,7 +122,7 @@ void spell_effect(int prof) { "your skin, leaving you in agony!"); tell_room(place,"%^RESET%^%^MAGENTA%^The crystal shards rip into "+ ""+target->QCN+", leaving "+target->QO+" in agony!", target); - damage_targ(target, target->query_target_limb(), sdamage,"slashing"); + damage_targ(target, target->return_target_limb(), sdamage,"slashing"); dest_effect(); } diff --git a/cmds/spells/t/_telekinetic_push.c b/cmds/spells/t/_telekinetic_push.c index 5defac260..63c16c420 100644 --- a/cmds/spells/t/_telekinetic_push.c +++ b/cmds/spells/t/_telekinetic_push.c @@ -36,6 +36,6 @@ spell_effect(int prof) dam /= 2; } tell_object(target,"%^BOLD%^%^WHITE%^Force of the push curshes you!"); - damage_targ(target, target->query_target_limb(), dam,"force"); + damage_targ(target, target->return_target_limb(), dam,"force"); dest_effect(); } diff --git a/cmds/spells/t/_teleport.c b/cmds/spells/t/_teleport.c index 64b24001b..4c63b6feb 100644 --- a/cmds/spells/t/_teleport.c +++ b/cmds/spells/t/_teleport.c @@ -58,7 +58,7 @@ void spell_effect(int prof) { { tell_object(caster,"You sense something is wrong with your spell and it backfires."); tell_room(place,caster->QCN+" "+"looks startled.",caster); - damage_targ(caster, caster->query_target_limb(), sdamage / 4, "mental"); + damage_targ(caster, caster->return_target_limb(), sdamage / 4, "mental"); dest_effect(); } diff --git a/cmds/spells/t/_thorn_spray.c b/cmds/spells/t/_thorn_spray.c index 594121b65..e2c1fdcb9 100644 --- a/cmds/spells/t/_thorn_spray.c +++ b/cmds/spells/t/_thorn_spray.c @@ -27,7 +27,7 @@ void spell_effect(int prof) tell_object(target, "%^ORANGE%^Sharp thorns shoot from " + caster->QCN + "'s hand at you!"); tell_room(place, "%^ORANGE%^Sharp thorns shoot from " + caster->QCN + "'s hand at " + target->QCN + "!", ({ caster, target })); - damage_targ(target, target->query_target_limb(), numdarts, "piercing"); + damage_targ(target, target->return_target_limb(), numdarts, "piercing"); spell_kill(target, caster); dest_effect(); } diff --git a/cmds/spells/t/_typhoon.c b/cmds/spells/t/_typhoon.c index 67d8dbffa..a57e1600b 100644 --- a/cmds/spells/t/_typhoon.c +++ b/cmds/spells/t/_typhoon.c @@ -92,7 +92,7 @@ void execute_attack() } tell_object(targ,"%^BOLD%^%^CYAN%^You are crushed by the strong wings of the typhoon!"); - damage_targ(targ, targ->query_target_limb(), dam, "bludgeoning"); + damage_targ(targ, targ->return_target_limb(), dam, "bludgeoning"); } counter--; diff --git a/cmds/spells/u/_undeath_is_death.c b/cmds/spells/u/_undeath_is_death.c index 60a9476b9..aa3faffe0 100644 --- a/cmds/spells/u/_undeath_is_death.c +++ b/cmds/spells/u/_undeath_is_death.c @@ -58,7 +58,7 @@ void spell_effect(int prof) tell_object(foe, "%^ORANGE%^%^BOLD%^Your unlife ends, as positive energy destroys your essence!"); tell_room(place, "%^ORANGE%^%^BOLD%^" + foe->QCN + " crumbles to dust!", foe); - damage_targ(foe, foe->query_target_limb(), foe->query_max_hp() * 2, "positive energy"); + damage_targ(foe, foe->return_target_limb(), foe->query_max_hp() * 2, "positive energy"); } spell_successful(); diff --git a/cmds/spells/w/_wail_of_the_banshee.c b/cmds/spells/w/_wail_of_the_banshee.c index f3838835e..2c5cae994 100644 --- a/cmds/spells/w/_wail_of_the_banshee.c +++ b/cmds/spells/w/_wail_of_the_banshee.c @@ -47,12 +47,12 @@ void spell_effect(int prof) { if (combat_death_save(foe, 3)) { tell_object(foe, "%^BLUE%^You sigh with relief as your soul withstands a horrid scream!"); - damage_targ(foe, foe->query_target_limb(), sdamage, "sonic"); + damage_targ(foe, foe->return_target_limb(), sdamage, "sonic"); continue; } tell_object(foe, "%^BOLD%^%^BLUE%^You scream as your soul is carved out from the body!"); tell_room(place, "%^BOLD%^%^BLUE%^" + foe->QCN + " screams as " + foe->QP + " soul is carved out from the body!", foe); - damage_targ(foe, foe->query_target_limb(), foe->query_max_hp() * 2, "sonic"); + damage_targ(foe, foe->return_target_limb(), foe->query_max_hp() * 2, "sonic"); max -= foe->query_level(); } } diff --git a/cmds/spells/w/_walk_the_planes.c b/cmds/spells/w/_walk_the_planes.c index 60968a1b5..ce7235adc 100644 --- a/cmds/spells/w/_walk_the_planes.c +++ b/cmds/spells/w/_walk_the_planes.c @@ -45,7 +45,7 @@ void spell_effect(int prof) { if(!TELEPORT->object_can_be_teleported(caster,endplace,clevel)) { tell_object(caster,"You sense something is wrong with your spell and it backfires."); - damage_targ(caster, caster->query_target_limb(), sdamage / 4, "mental"); + damage_targ(caster, caster->return_target_limb(), sdamage / 4, "mental"); tell_room(place,caster->QCN+" "+ "looks startled.",caster); dest_effect(); diff --git a/cmds/spells/w/_word_of_chaos.c b/cmds/spells/w/_word_of_chaos.c index 73f9e7813..739460116 100644 --- a/cmds/spells/w/_word_of_chaos.c +++ b/cmds/spells/w/_word_of_chaos.c @@ -87,7 +87,7 @@ void spell_effect() { tell_room(place,"%^BOLD%^Upon hearing the words "+target->QCN+" simply explodes!",target); tell_object(target,"%^BOLD%^WHAT "+caster->QS+" DID JUST SAY"); - damage_targ(target,target->query_target_limb(),target->query_max_hp()*2,"mental"); + damage_targ(target,target->return_target_limb(),target->query_max_hp()*2,"mental"); } } diff --git a/cmds/spells/w/_word_of_recall.c b/cmds/spells/w/_word_of_recall.c index bac89bc5e..9203b8c14 100644 --- a/cmds/spells/w/_word_of_recall.c +++ b/cmds/spells/w/_word_of_recall.c @@ -41,7 +41,7 @@ void spell_effect(int prof) tell_object(caster, "You sense something is wrong with your spell and it backfires."); tell_room(place, caster->QCN + " " + "looks startled.", caster); - damage_targ(caster, caster->query_target_limb(), sdamage / 4, "mental"); + damage_targ(caster, caster->return_target_limb(), sdamage / 4, "mental"); dest_effect(); } call_out("spell_effect_next", ROUND_LENGTH); diff --git a/d/charucavern/charucavern/mysticcave/ob/crater_specials.c b/d/charucavern/charucavern/mysticcave/ob/crater_specials.c index 85c6c099f..7cd522a73 100644 --- a/d/charucavern/charucavern/mysticcave/ob/crater_specials.c +++ b/d/charucavern/charucavern/mysticcave/ob/crater_specials.c @@ -52,7 +52,7 @@ void special_attack(object ob, object targ, string dam_type) tell_room(EEOB, "%^BOLD%^%^GREEN%^As "+EOB->QCN+"%^BOLD%^%^GREEN%^ strikes "+targ->QCN+" with "+EOB->QP+ " " +tmp+" %^BOLD%^%^GREEN%^acid splashes from it, soaking "+targ->QO+"!%^RESET%^", ({EOB, targ})); - targ->cause_type_damage(targ, limb, roll_dice(4,4), "acid"); + targ->cause_typed_damage(targ, limb, roll_dice(4,4), "acid"); break; case "cold": diff --git a/d/charucavern/mysticcave/ob/crater_specials.c b/d/charucavern/mysticcave/ob/crater_specials.c index 85c6c099f..7cd522a73 100644 --- a/d/charucavern/mysticcave/ob/crater_specials.c +++ b/d/charucavern/mysticcave/ob/crater_specials.c @@ -52,7 +52,7 @@ void special_attack(object ob, object targ, string dam_type) tell_room(EEOB, "%^BOLD%^%^GREEN%^As "+EOB->QCN+"%^BOLD%^%^GREEN%^ strikes "+targ->QCN+" with "+EOB->QP+ " " +tmp+" %^BOLD%^%^GREEN%^acid splashes from it, soaking "+targ->QO+"!%^RESET%^", ({EOB, targ})); - targ->cause_type_damage(targ, limb, roll_dice(4,4), "acid"); + targ->cause_typed_damage(targ, limb, roll_dice(4,4), "acid"); break; case "cold": diff --git a/d/islands/common/eldebaro/eldebaro/ob/charged_skewer.c b/d/islands/common/eldebaro/eldebaro/ob/charged_skewer.c index e569cb519..a85a49c07 100644 --- a/d/islands/common/eldebaro/eldebaro/ob/charged_skewer.c +++ b/d/islands/common/eldebaro/eldebaro/ob/charged_skewer.c @@ -129,14 +129,14 @@ int hit_func(object targ) "the way just in time and is only struck by "+myBolts+ " of electricity!", targ); tell_object(targ, "%^BOLD%^%^WHITE%^You manage to move out of the way "+ "just in time and are only struck by "+myBolts+" of electricity!"); - targ->cause_type_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); + targ->cause_typed_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); return 0; } tell_room(EETO, targ->QCN+"%^BOLD%^%^YELLOW%^ is UNABLE to move out of the way "+ "in time and is %^BOLD%^%^BLACK%^CHARRED%^BOLD%^%^YELLOW%^ by the electricity!%^RESET%^", targ); tell_object(targ, "%^BOLD%^%^YELLOW%^You are UNABLE to move out of the way in "+ "time and are %^BOLD%^%^BLACK%^CHARRED%^BOLD%^%^YELLOW%^ by the electricity!%^RESET%^"); - targ->cause_type_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); + targ->cause_typed_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); return 0; break; case 11..17: diff --git a/d/islands/common/eldebaro/eldebaro/ob/electrified_sword.c b/d/islands/common/eldebaro/eldebaro/ob/electrified_sword.c index 0b06a063c..12840da79 100644 --- a/d/islands/common/eldebaro/eldebaro/ob/electrified_sword.c +++ b/d/islands/common/eldebaro/eldebaro/ob/electrified_sword.c @@ -119,14 +119,14 @@ int hit_func(object targ) "the way just in time and is only struck by "+myBolts+ " of electricity!", targ); tell_object(targ, "%^BOLD%^%^WHITE%^You manage to move out of the way "+ "just in time and are only struck by "+myBolts+" of electricity!"); - targ->cause_type_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); + targ->cause_typed_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); return 0; } tell_room(EETO, targ->QCN+"%^BOLD%^%^YELLOW%^ is UNABLE to move out of the way "+ "in time and is %^BOLD%^%^BLACK%^CHARRED%^BOLD%^%^YELLOW%^ by the electricity!%^RESET%^", targ); tell_object(targ, "%^BOLD%^%^YELLOW%^You are UNABLE to move out of the way in "+ "time and are %^BOLD%^%^BLACK%^CHARRED%^BOLD%^%^YELLOW%^ by the electricity!%^RESET%^"); - targ->cause_type_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); + targ->cause_typed_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); return 0; } return 0; diff --git a/d/islands/common/eldebaro/ob/charged_skewer.c b/d/islands/common/eldebaro/ob/charged_skewer.c index e569cb519..a85a49c07 100644 --- a/d/islands/common/eldebaro/ob/charged_skewer.c +++ b/d/islands/common/eldebaro/ob/charged_skewer.c @@ -129,14 +129,14 @@ int hit_func(object targ) "the way just in time and is only struck by "+myBolts+ " of electricity!", targ); tell_object(targ, "%^BOLD%^%^WHITE%^You manage to move out of the way "+ "just in time and are only struck by "+myBolts+" of electricity!"); - targ->cause_type_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); + targ->cause_typed_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); return 0; } tell_room(EETO, targ->QCN+"%^BOLD%^%^YELLOW%^ is UNABLE to move out of the way "+ "in time and is %^BOLD%^%^BLACK%^CHARRED%^BOLD%^%^YELLOW%^ by the electricity!%^RESET%^", targ); tell_object(targ, "%^BOLD%^%^YELLOW%^You are UNABLE to move out of the way in "+ "time and are %^BOLD%^%^BLACK%^CHARRED%^BOLD%^%^YELLOW%^ by the electricity!%^RESET%^"); - targ->cause_type_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); + targ->cause_typed_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); return 0; break; case 11..17: diff --git a/d/islands/common/eldebaro/ob/electrified_sword.c b/d/islands/common/eldebaro/ob/electrified_sword.c index b097a7172..07ef88fbb 100644 --- a/d/islands/common/eldebaro/ob/electrified_sword.c +++ b/d/islands/common/eldebaro/ob/electrified_sword.c @@ -119,14 +119,14 @@ int hit_func(object targ) "the way just in time and is only struck by "+myBolts+ " of electricity!", targ); tell_object(targ, "%^BOLD%^%^WHITE%^You manage to move out of the way "+ "just in time and are only struck by "+myBolts+" of electricity!"); - targ->cause_type_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); + targ->cause_typed_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); return 0; } tell_room(EETO, targ->QCN+"%^BOLD%^%^YELLOW%^ is UNABLE to move out of the way "+ "in time and is %^BOLD%^%^BLACK%^CHARRED%^BOLD%^%^YELLOW%^ by the electricity!%^RESET%^", targ); tell_object(targ, "%^BOLD%^%^YELLOW%^You are UNABLE to move out of the way in "+ "time and are %^BOLD%^%^BLACK%^CHARRED%^BOLD%^%^YELLOW%^ by the electricity!%^RESET%^"); - targ->cause_type_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); + targ->cause_typed_damage(targ, "torso", roll_dice(bolts, 8), "electricity"); return 0; } return 0; diff --git a/d/laerad/lgnolls/obj/warbow.c b/d/laerad/lgnolls/obj/warbow.c index 9cd9b10db..6c2686208 100644 --- a/d/laerad/lgnolls/obj/warbow.c +++ b/d/laerad/lgnolls/obj/warbow.c @@ -89,7 +89,7 @@ int extra_lrhit(object targi){ tell_room(EETO,ETO->QCN+" %^ORANGE%^fires a p%^RED%^o%^ORANGE%^w%^RED%^e%^ORANGE%^rf%^RED%^u%^ORANGE%^l shot, burrowing the "+ "%^BOLD%^%^BLACK%^arrows shaft %^RESET%^%^RED%^deep %^ORANGE%^in %^WHITE%^"+targi->QCN+"%^ORANGE%^'s body!",({ETO,targi})); set_property("magic",1); - targi->do_damage(targi->query_target_limb(),random(5)+5); + targi->do_damage(targi->return_target_limb(),random(5)+5); remove_property("magic"); return 1; break; } @@ -104,7 +104,7 @@ int extra_lrhit(object targi){ "%^CYAN%^twists the bow and %^RED%^slashes %^WHITE%^"+targi->QCN+" %^CYAN%^with the "+ "%^BOLD%^%^BLACK%^bow-blades%^RESET%^%^CYAN%^!%^WHITE%^%^RESET%^",ETO); set_property("magic",1); - targi->do_damage(targi->query_target_limb(),(random(8)+5)); + targi->do_damage(targi->return_target_limb(),(random(8)+5)); remove_property("magic"); return 1; break; diff --git a/d/laerad/obj/sun_star.c b/d/laerad/obj/sun_star.c index 7c88f7d5f..252c98212 100644 --- a/d/laerad/obj/sun_star.c +++ b/d/laerad/obj/sun_star.c @@ -86,7 +86,7 @@ int extra_hit(object ob){ if(align == 3 || align == 6 || align == 9){ tell_object(ob,"%^BOLD%^RED%^The morning star singes your evil skin!"); tell_room(environment(query_wielded()),"%^BOLD%^RED%^The morning star singes "+ob->query_cap_name()+"'s evil skin!",ob); - ob->do_damge(ob->query_target_limb(),roll_dice(2,6)); + ob->do_damge(ob->return_target_limb(),roll_dice(2,6)); if(!"daemon/saving_d"->saving_throw(ob,"spell")){ ob->set_paralyzed(10,"You are reeling in pain."); return roll_dice(1,4); diff --git a/d/shadow/room/farm/mon/flower.c b/d/shadow/room/farm/mon/flower.c index f838dbfeb..0f539d3ea 100644 --- a/d/shadow/room/farm/mon/flower.c +++ b/d/shadow/room/farm/mon/flower.c @@ -53,7 +53,7 @@ int cut(object targ){ "leaf tears your skin!"); tell_room(ETO,"%^BOLD%^%^RED%^The serrated edge of the flower's "+ "leaf tears "+targ->QCN+"'s skin!",targ); - targ->do_damage(targ->query_target_limb(),roll_dice(2,8)); + targ->do_damage(targ->return_target_limb(),roll_dice(2,8)); return 1; } diff --git a/d/tharis/barrow/obj/slayer.c b/d/tharis/barrow/obj/slayer.c index 0f6a21b91..03328d132 100644 --- a/d/tharis/barrow/obj/slayer.c +++ b/d/tharis/barrow/obj/slayer.c @@ -67,7 +67,7 @@ int extra_hit(object ob) { "%^RESET%^",(({ETO, ob}))); tell_object(ob,"%^BLUE%^The sword wielded by "+ETO->QCN+" cackles as it "+ "lashes yet again into your flesh!%^RESET%^"); - ob->do_damage(ob->query_target_limb(),random(dam) + 3); + ob->do_damage(ob->return_target_limb(),random(dam) + 3); } return 1; } diff --git a/d/undead/obj/aspbow.c b/d/undead/obj/aspbow.c index e00571f7a..8f5d73c36 100644 --- a/d/undead/obj/aspbow.c +++ b/d/undead/obj/aspbow.c @@ -91,7 +91,7 @@ int extra_lrhit(object targi){ tell_object(targi,ETO->QCN+"'s%^BOLD%^%^GREEN%^ arrow siphons the lifeforce from you!%^RESET%^"); tell_room(EETO,ETO->QCN+"'s%^BOLD%^%^GREEN%^ bows tremors slightly as the arrow hits "+targi->QCN+"!",({ETO,targi})); set_property("magic",1); - targi->do_damage(targi->query_target_limb(),random(10)+5); + targi->do_damage(targi->return_target_limb(),random(10)+5); ETO->do_damage("torso",random(10)*(-1)); remove_property("magic"); return 1; diff --git a/daemon/combat_d.c b/daemon/combat_d.c index c5e1a8918..95c83cff0 100644 --- a/daemon/combat_d.c +++ b/daemon/combat_d.c @@ -888,7 +888,7 @@ int damage_done(object attacker, object weap, int damage, int isranged) } if (prof < 0) { damage = absolute_value((damage * prof) / 100 + 1); - attacker->do_damage("torso", damage); + attacker->cause_typed_damage(attacker, "torso", damage, weap->query_damage_type()); tell_object(attacker, "You hurt yourself with your weapon because of your inexperience."); tell_room(environment(attacker), attacker->QCN + " hurts " + attacker->QO + "self with " + attacker->QP + " weapon.", attacker); return 0; diff --git a/std/flying_mount.c b/std/flying_mount.c index b049ea423..ebd46af27 100644 --- a/std/flying_mount.c +++ b/std/flying_mount.c @@ -577,7 +577,7 @@ void do_flight(mapping info) rider->force_me("look"); TO->set_property("magic",1); rider->add_attacker(TO); - rider->do_damage("torso",altitude); + rider->cause_typed_damage(rider, "torso", altitude, "bludgeoning"); rider->continue_attack(); rider->remove_attacker(TO); FLIGHT = "landed"; diff --git a/std/jail_cell.c b/std/jail_cell.c index b35fde5c1..b25f6de48 100644 --- a/std/jail_cell.c +++ b/std/jail_cell.c @@ -208,7 +208,7 @@ void __Feed_em() { tell_room(TO, inven[i]->query_cap_name()+" doubles over in pain and " "begins to %^BOLD%^%^MAGENTA%^vomit %^RESET%^uncontrollably. " "The sight and stench are sickening.",inven[i]); - inven[i]->do_damage("torso",roll_dice(4,4)); + inven[i]->cause_typed_damage(inven[i], "torso", roll_dice(4, 4), "untyped"); inven[i]->use_stamina(20); } if(!(temp1 < (temp2*3))) continue; diff --git a/std/jailer.c b/std/jailer.c index a4f603a1a..e60c95822 100644 --- a/std/jailer.c +++ b/std/jailer.c @@ -228,7 +228,7 @@ void headlock(object targ) tell_room(ETO, "%^BOLD%^BLUE%^The jailer slips in behind " + targ->query_cap_name() + " and puts " + targ->query_objective() + " in " "a headlock!", targ); - targ->do_damage(targ->return_target_limb(), roll_dice(3, 5) + 10); + targ->cause_typed_damage(targ, targ->return_target_limb(), roll_dice(3, 5) + 10, "untyped"); targ->set_paralyzed(50, "You are in a headlock."); return 1; } @@ -250,7 +250,7 @@ void key_swipe(object targ) "key across your throat, nearly crushing it!"); tell_room(ETO, "%^BOLD%^RED%^The jailer deftly swings the heavy key " "across " + targ->QCN + "'s throat, nearly crushing it!", targ); - targ->do_damage(targ->return_target_limb(), roll_dice(5, 10) + 10); + targ->cause_typed_damage(targ, targ->return_target_limb(), roll_dice(5, 10) + 10, "bludgeoning"); return 1; } tell_object(targ, "%^GREEN%^The jailer swings the heavy key at your " @@ -258,7 +258,7 @@ void key_swipe(object targ) tell_room(ETO, "%^GREEN%^The jailer swings the heavy key at " + targ->QCN + "'s throat and " + targ->query_subjective() + " ducks but still gets badly bruised by it!", targ); - targ->do_damage(targ->return_target_limb(), roll_dice(3, 5) + 10); + targ->cause_typed_damage(targ, targ->return_target_limb(), roll_dice(3, 5) + 10, "bludgeoning"); return 1; } diff --git a/std/riding_animal.c b/std/riding_animal.c index 60ba2e5d1..8fe7177d0 100644 --- a/std/riding_animal.c +++ b/std/riding_animal.c @@ -538,7 +538,7 @@ int kill_intercept(string str) write("The " + orig_short + " throws you off!"); tell_room(ETP, TPQCN + " is thrown off by " + TP->QP + " " + orig_short + "!", TP); exit(orig_short); - TP->do_damage("torso", query_stats("strength") / 2); + TP->cause_typed_damage(TP, "torso", query_stats("strength") / 2, "bludgeoning"); return 0; } return 0; @@ -797,7 +797,7 @@ int do_throw(int diff){ tell_room(ETP,"%^BOLD%^The "+query_short()+" refuses to follow "+TPQCN+"'s commands. It rears up, bucks, and throws "+TP->query_objective()+" from the saddle.",TP); write("%^BOLD%^You hit the ground hard from being thrown."); exit(orig_short); - TP->do_damage("torso",random(((int)TP->query_max_hp())/4)); + TP->cause_typed_damage(TP, "torso", random(((int)TP->query_max_hp()) / 4), "bludgeoning"); TP->add_attacker(TO); TP->check_death(); TP->remove_attacker(TO); @@ -808,7 +808,7 @@ int do_throw(int diff){ tell_room(ETP,"%^BOLD%^The "+query_short()+" refuses to follow "+TPQCN+"'s commands. It rears up, bucks and throws "+TP->query_objective()+" from the saddle.",TP); exit(orig_short); write("%^BOLD%^You hit the ground hard from being thrown."); - TP->do_damage("torso",random(((int)TP->query_max_hp())/4)); + TP->cause_typed_damage(TP, "torso", random(((int)TP->query_max_hp()) / 4), "bludgeoning"); write("%^BOLD%^The enraged animal turns and attacks you!"); tell_room(ETO,"The enraged animal turns and attacks "+TPQCN+"!",TP); TO->kill_ob(TP,1); diff --git a/std/room/exits.c b/std/room/exits.c index 0d8905cbd..ca655d551 100644 --- a/std/room/exits.c +++ b/std/room/exits.c @@ -729,7 +729,7 @@ int climb_ok(string verb) damage += random(climb_exits[verb][2]); } damage += random(climb_exits[verb][2]) + 1; - this_player()->do_damage(this_player()->return_target_limb(), damage); + this_player()->cause_typed_damage(this_player(), this_player()->return_target_limb(), damage, "bludgeoning"); this_player()->add_attacker(this_object()); this_player()->continue_attack(); this_player()->remove_attacker(this_object()); diff --git a/std/room/lexits.c b/std/room/lexits.c index 114b4a7ae..53c71a316 100644 --- a/std/room/lexits.c +++ b/std/room/lexits.c @@ -730,7 +730,7 @@ int climb_ok(string verb) { for (inc2 = loop;inc2 > inc; inc2 --) damage += random(climb_exits[verb][2]); damage += random(climb_exits[verb][2]) + 1; - this_player()->do_damage(this_player()->return_target_limb(),damage); + this_player()->cause_typed_damage(this_player(), this_player()->return_target_limb(), damage, "bludgeoning"); this_player()->add_attacker(this_object()); this_player()->continue_attack(); this_player()->remove_attacker(this_object());