Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
*.bak
#fixme
*.o
/.vs
/cmds/.vs
3 changes: 1 addition & 2 deletions cmds/cavalier/charge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmds/feats/b/_body_fuel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions cmds/feats/c/_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
}

Expand All @@ -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!");
}

Expand Down
4 changes: 2 additions & 2 deletions cmds/feats/c/_crit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions cmds/feats/c/_crushingstrike.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,14 @@ 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() + ""
"down in a brutal attack, striking you painfully!%^RESET%^");
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();
Expand Down
4 changes: 2 additions & 2 deletions cmds/feats/d/_death_arrow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions cmds/feats/d/_death_touch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion cmds/feats/d/_defenders_presence.c
Original file line number Diff line number Diff line change
Expand Up @@ -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%^");
Expand Down
5 changes: 4 additions & 1 deletion cmds/feats/k/_knockdown.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
inherit FEAT;

int fired, in_shapeshift;
string damtype;

void timer(object tp);

Expand Down Expand Up @@ -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 "
Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions cmds/feats/s/_shield_of_whirling_steel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
{
Expand All @@ -131,6 +132,7 @@ void execute_attack()

place = environment(caster);
attackers = caster->query_attackers();
weapons = caster->query_wielded();

if(!check_my_status(caster))
{
Expand Down Expand Up @@ -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++;
}

Expand Down
2 changes: 1 addition & 1 deletion cmds/feats/t/_true_judgement.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 2 additions & 4 deletions cmds/fighter/_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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!");
}
Expand Down
2 changes: 1 addition & 1 deletion cmds/fighter/rush.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
14 changes: 7 additions & 7 deletions cmds/mortal/_struggle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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.");
Expand Down
2 changes: 1 addition & 1 deletion cmds/mortal/_throw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
4 changes: 2 additions & 2 deletions cmds/mortal/obj/digob.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down Expand Up @@ -124,4 +124,4 @@ void move_rubble(string ext, object tp)
tim = 10 / tim;
call_out("move_rubble", tim, ext, tp);
}
}
}
2 changes: 1 addition & 1 deletion cmds/priest/backup/_dictum.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion cmds/priest/backup/_moonfire.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions cmds/priest/backup/slay_living.saide.5-19.04
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion cmds/priest/godspells/_holy_star.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion cmds/skills/bak/_lockpick.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion cmds/spells/a/_acid_splash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion cmds/spells/a/_apopsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion cmds/spells/b/_banshee_blast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

Expand Down
Loading