forked from DFHack/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrithit.lua
More file actions
22 lines (20 loc) · 709 Bytes
/
crithit.lua
File metadata and controls
22 lines (20 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--Turns the previously readied attack into a super powerful critical hit.
--[====[
crithit
=======
Turns the most recently readied attack into an impossibly accurate and powerful strike.
]====]
local unit = df.global.world.units.active[0]
local attks = unit.actions
for k,v in ipairs(attks) do
if attks[k].type==1 then
attks[k].data.attack.attack_accuracy=1000
attks[k].data.attack.attack_velocity=9999999
end
for i = 0,3 do
unit.body.body_plan.attacks[i].velocity_modifier=2700000
unit.body.body_plan.attacks[i].contact_perc=100000
unit.body.body_plan.attacks[i].penetration_perc=100000
unit.body.body_plan.attacks[i].flags.edge=true
end
end