Switch to edit mode.
Name(s): do_throw1: "Copied from Generic Throwable-Pie (#4990):throw by DA (#4341) Aug 7 23:19:51 1995"
2: "Hacked by manta(#7165) Aug 7 23:19:51 1995"
3: if ((victim = args[1]) == player)
4: return player:tell("Now that wouldn't be very smart, now would it?")
5: elseif (this.f || children(this))
6: return player:tell("This looks like a generic pie, not an actual pie. @create one, then throw it.")
7: endif
8: $msg:mtell("throw", player:title(), victim:title())
9: prevloc = this.location
10: this:moveto(victim.location)
11: victim in this.safe ? victim:tell("Quack!!! Engaging autoduck system! !!!kcauQ") | victim:tell(">>>>> 'duck " + tostr(this) + "' fast! <<<<<")
12: if (victim in this.gonna_get_pied)
13: $msg:mtell("throw_failed", victim:title())
14: else
15: delay = this.flight_time / 2 + (random(this.flight_time / 4) - this.flight_time / 2)
16: this.gonna_get_pied = setadd(this.gonna_get_pied, victim)
17: suspend(this.flight_time / 2)
18: victim in this.safe && this:duck(victim)
19: suspend(delay)
20: if (victim in this.gonna_get_pied)
21: $msg:mtell(victim, "hit", victim:title())
22: this.gonna_get_pied = setremove(this.gonna_get_pied, victim)
23: endif
24: endif
25: this:moveto(prevloc)
26: "Last modified by Dax (#789) on Thu Dec 13 20:40:15 2001 MST."