int cmd_maul(string str) { object tp=this_player(); object tgt; object *weps; string wep, limb; int cost, dmg, rank; int wc=0; if (!abil()) return 0; if (tp->query_disable()) return 1; if (!str) tgt=tp->query_current_attacker(); else tgt=present(str,environment(tp)); weps = filter(tp->query_wielded(), (: $1->query_type() == TYPE :) ); if (!ok_cast(tp,tgt,weps)) return 0; foreach (object w in weps) wc += w->query_wc(); wc = wc / sizeof(weps); if (tp->query_skill(TYPE) >= 160) rank=3; else rank=2; dmg=BALANCE3_D->get_damage(tp, tgt, rank, ({ TYPE, "attack" }),
int cmd_warblade(string str) { object tp=this_player(); object tgt; object *weps; string wep, limb; string *adverbs; int cost, dmg, rank; int wc; if (!abil()) return 0; if (!str) tgt=tp->query_current_attacker(); else tgt=present(str,environment(tp)); weps = filter(tp->query_wielded(), (: $1->query_type() == TYPE :) ); if (!ok_cast(tp,tgt,weps)) return 0; foreach (object w in weps) wc += w->query_wc(); wc = wc / sizeof(weps); if (tp->query_skill("attack") >= 50*6) rank=4; else rank=3; adverbs = ({ "terribly", "severely" });
int cmd_snatch(string str) { object tp=this_player(); object tgt; object item, *inv; int dex, knife, stealing; int tdex, tdef, tsteal; int cost, dmg; string limb; if (!abil()) return 0; if (tp->query_disable()) return 1; if (!str) tgt=tp->query_current_attacker(); else tgt=present(str,environment(tp)); if (!ok_cast(tp,tgt)) return 0; dex=tp->query_stats("dexterity"); knife=tp->query_skill("knife"); stealing=tp->query_skill("stealing"); stealing+=tp->query_skill("stealth")*2/3; tdex=tgt->query_stats("dexterity"); tdef=tgt->query_skill("defense"); tsteal=tgt->query_skill("perception"); tsteal+=tgt->query_property("snatch"); dmg=dex*2+knife*2+random(tp->query_level()+10); dmg-=tdef/3; cost=dmg/9; if (tp->query_sp() < cost) FAIL("You are too tired.\n"); tp->set_disable(1); tp->add_sp(-cost); if (tdex*2/3 > dex) { message("combat",COL+"You take a swing at "+tgt->query_cap_name()+ " with your knife, but miss."+RES,tp); message("combat",COL+tp->query_cap_name()+" swings "+tp->query_possessive()+ " knife at "+tgt->query_cap_name()+", but misses."+RES, environment(tp),({tp,tgt}));
int cmd_fireshot(string str) { object tp=this_player(); object tgt; string howbig; int cost, dmg; if (!abil()) return 0; if (tp->query_disable()) return 1; if (!str) tgt=tp->query_current_attacker(); else tgt=present(str,environment(tp)); if (!ok_cast(tp,tgt)) return 0; if (tp->query_level() >= 60) { dmg=BALANCE3_D->get_damage(tp, tgt, 4, ({"attack", "breath", "breath", "flying"}),
int cmd_iceblast(string str) { object tp=this_player(); object tgt; int cost, dmg; if (!abil()) return 0; if (tp->query_disable()) return 1; if (!str) tgt=tp->query_current_attacker(); else tgt=present(str,environment(tp)); if (!ok_cast(tp,tgt)) return 0; if (tp->query_level() >= 40) dmg=BALANCE_D->get_damage(tp, tgt, 3, ({"faith","faith","breath","breath","breath"}),
int cmd_akkarsa(string str) { object tp=this_player(); int wis, summ, faith; int cost, len; int bad=0; float amt; if (!spell()) return 0; if (tp->query_disable()) return 1; if (!ok_cast(tp)) return 0; wis=tp->query_stats("wisdom"); summ=tp->query_skill("summoning"); faith=tp->query_skill("faith"); amt=0.5+to_float((summ-210)/600); if (amt > 0.7) amt=0.7; len=summ/22+faith/26+wis*3/2; len=len*3/5; cost=len*4+50; if (tp->query_mp() < cost) FAIL("Too low on magic.\n"); tp->set_disable(1); tp->add_mp(-cost); message("magic",COL+"You chant the word %^BOLD%^%^RED%^akkarsa"+RES+COL+".",tp); message("magic",COL+tp->query_cap_name()+" chants something."+RES,environment(tp),tp); if (tp->query_alignment() > -800) { message("magic","A horrible feeling washes over you.",tp); bad=1; } call_out("summon",2,({tp,amt,len,bad}));
int cmd_sunder(string str) { object tp=this_player(); object tgt; string limb; int tpalign, tgtalign, aligndiff; int cost, dmg; int rank; if (!abil()) return 0; if (tp->query_disable()) return 1; if (!str) tgt=tp->query_current_attacker(); else tgt=present(str,environment(tp)); if (!ok_cast(tp,tgt)) return 0; // this ranges from 3000 to 0 now tpalign=tp->query_alignment()+1500; tgtalign=tgt->query_alignment()+1500; aligndiff=tpalign-tgtalign; if (tp->query_skill("tail") == tp->query_skill("claw")) { if (random(100) < 50) limb="tail"; else limb="claw"; } else if (tp->query_skill("tail") > tp->query_skill("claw")) limb="tail"; else limb="claw"; if (tpalign >= 2900) rank=4; else if (tpalign >= 2600) rank=3; else if (tpalign >= 2200) rank=2; else rank=1; dmg=BALANCE_D->get_damage(tp, tgt, rank, ({ limb, limb, "faith", "faith", "faith", "magic attack", "conjuring" }),
int cmd_bash(string str) { object tp=this_player(); object tgt; object *weps; string wep; int cost, dmg, rank; if (!abil()) return 0; if (tp->query_disable()) return 1; if (!str) tgt=tp->query_current_attacker(); else tgt=present(str,environment(tp)); weps = filter(tp->query_wielded(), (: $1->query_type() == TYPE :) ); if (!ok_cast(tp,tgt,weps)) return 0; if (tp->query_skill(TYPE) >= 75) rank=2; else rank=1; dmg=BALANCE3_D->get_damage(tp, tgt, rank, ({ TYPE, "attack" }),