Example #1
0
int take_damage(object tp) {
    if (present(tp)) {
	tell_object(tp, "%^BOLD%^%^BLACK%^A %^YELLOW%^rogue %^RESET%^%^MAGENTA%^li%^BOLD%^%^WHITE%^gh%^YELLOW%^tn%^BLACK%^in%^RESET%^%^RED%^g b%^BOLD%^%^RED%^ol%^BLACK%^t strikes from under the %^WHITE%^clouds%^BLACK%^, hitting your body so %^RED%^hard %^BLACK%^you begin to sm%^WHITE%^o%^BLACK%^ke.%^RESET%^");
	tp->add_hp(-200+random(50));
	tp->add_sp(-50+random(50));
	tp->add_mp(-50+random(50));
	remove_call_out("take_damage");
	call_out("take_damage", 120, tp);
	return 1;
    }
}
Example #2
0
File: _flirt.c Project: ehershey/pd
void flirt1(object tp, int ppl) {
  int chr=tp->query_stats("charisma");
  int intel=tp->query_stats("intelligence");
  int level=tp->query_level();
  int x;
  
  if (ppl*8 > ((chr/3)+(intel/5)+random(9))) {
    message("info","You suddenly feel uncomfortable and stop flirting.",tp);
    return;
  }
  x= tp->query_stats("charisma")*level/100;
  x+= ppl*3/2;
  tp->add_stat_bonus("charisma",x);
  tp->set_property("flirt",tp->query_stat_bonus("charisma"));
  tp->add_mp(-(10+random(4)));
  call_out("stop_flirt", chr/2+35, tp);
  
}
Example #3
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;
}
Example #4
0
File: _lore.c Project: ehershey/pd
string query_examine(object tp, object tgt) {
  tp->add_mp(-13);
  tp->add_skill_points("conjuring", 13);
  return query_output(tp, tgt);
}