Adds Variable Click Delay

Now certain weapons can strike faster or slower than usual. No weapons currently do this as this PR just lays the groundwork for that.
The click delay can also be modified with traits. The slime agility modifier makes attacks happen 25% sooner.
Adds debug test verb to display a weapon's DPS. It's really basic but should be sufficient for future force adjustments I might do in the future.
This commit is contained in:
Neerti
2017-11-28 16:11:56 -05:00
parent 034d5391d7
commit 2f7db506eb
48 changed files with 142 additions and 72 deletions

View File

@@ -101,7 +101,7 @@
user << "<span class='warning'>\The [blocked] is in the way!</span>"
return
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) //puts a limit on how fast people can eat/drink things
user.setClickCooldown(user.get_attack_speed(src)) //puts a limit on how fast people can eat/drink things
self_feed_message(user)
reagents.trans_to_mob(user, issmall(user) ? ceil(amount_per_transfer_from_this/2) : amount_per_transfer_from_this, CHEM_INGEST)
feed_sound(user)
@@ -119,7 +119,7 @@
other_feed_message_start(user, target)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(src))
if(!do_mob(user, target))
return

View File

@@ -68,7 +68,7 @@
user << "<span class='warning'>\The [blocked] is in the way!</span>"
return
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) //puts a limit on how fast people can eat/drink things
user.setClickCooldown(user.get_attack_speed(src)) //puts a limit on how fast people can eat/drink things
if (fullness <= 50)
M << "<span class='danger'>You hungrily chew out a piece of [src] and gobble it!</span>"
if (fullness > 50 && fullness <= 150)
@@ -101,7 +101,7 @@
user.visible_message("<span class='danger'>[user] cannot force anymore of [src] down [M]'s throat.</span>")
return 0
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(src))
if(!do_mob(user, M)) return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")

View File

@@ -51,7 +51,7 @@
user.visible_message("<span class='warning'>[user] attempts to force [M] to swallow \the [src].</span>")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(src))
if(!do_mob(user, M))
return