Maximum Weapon Damage?

正在查看此主题的用户

bluefalcon

Recruit
I'm trying to make tournament ranged combat like "laser tag," i.e. one arrow/bolt/javelin hit = knocked out. (The theory is that there's a tournament master calling "hits" if you will) So I increased practice_bow, practice_crossbow, and practice_javelins damage to over 100 (blunt), but still not quite effective. So after a few tries I finally got mad and set it to 9999. To my surprise, all shots did virtually nothing. What gives?
 
you dont need to give big damage, just capture on_agent_hit trigger and knockdown the troop there
 
as ibf_damage_mask is 0x3ff and 2 bits are for damage type, then I think max damage is 255
 
dunde 说:
as ibf_damage_mask is 0x3ff and 2 bits are for damage type, then I think max damage is 255
Yep, and the module system does damage & 0xFF to avoid the value leaking into the damage type bits, so

0010 0111 0000 1111 (9999)
&
0000 0000 1111 1111 (0xFF)
=
0000 0000 0000 1111 (15)

9999 damage is effectively cut down to 15 damage.
 
dunde 说:
you dont need to give big damage, just capture on_agent_hit trigger and knockdown the troop there

So, like:
插入代码块:
myedit_instakill = (ti_on_agent_hit, 3, 0, [], [troop_set_health, ":inflicted_agent", 0])
?

Edit: That was a question.
 
Close enough

插入代码块:
(ti_on_agent_hit, 0, 0, [], 
[
(store_trigger_param_1, ":inflicted_agent"),
(agent_set_hit_points, ":inflicted_agent", 0),
]),

 
后退
顶部 底部