Ejemplo n.º 1
0
int special_hit(object atk) {
  object tp = query_wielded();
  int chance;
  int dmg = 0;

  if (tp != owner) return 0;

  chance = 90+(tp->query_stats("dexterity")+tp->query_stats("wisdom"))/9;

  if (random(1000) < chance) {
    dmg = (query_wc()+chance)/(3+random(10));
    message("info", COL+capitalize(query_desc())+" sizzles and crackles as it strikes!"+RES,
      environment(tp) );
    atk->add_sp(-(dmg/2));
    atk->add_mp(-(dmg/2));
    atk->add_bleeding(random(dmg/2)+5);
  }

  return dmg;
}
Ejemplo n.º 2
0
void heart_beat() {
  object tp = query_wielded();
  string this = query_desc();

  if (!owner) {
    message("magic", capitalize(this)+" sizzles away.", environment());
    remove();
    return;
  }
  
  if (tp && tp != owner) {
    message("magic", capitalize(this)+" sizzles away, burning you!", tp);
    message("magic", capitalize(this)+" sizzles away, burning "+
                     tp->query_cap_name()+"!", environment(tp), tp);
    tp->add_hp(-(10+random(25)));
    if (tp->query_hp() < 5)
      tp->set_hp(5);
    remove();
    return;
  }

}
Ejemplo n.º 3
0
int remove_sword() {
    if((string)query_wielded()->query_race() != "elf") return 1;
    write("A strange power binds the scimitar to you.");
    return 0;
}