-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathDoSomeThing.lua
More file actions
53 lines (50 loc) · 1.61 KB
/
DoSomeThing.lua
File metadata and controls
53 lines (50 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by ttwings.
--- DateTime: 2018/3/24 23:48
---
module("DoSomeThing",package.seeall)
require("lib.richtext")
---@param actor
---@param 锄地
function DoSomeThing.chu_di(actor)
local me,weapon
local costj,costq
me = actor
if me.jobName ~= "锄草" then
return "你必须跟馆主领了这工作才能在这里干!"
end
if me.isBusy then
return "你现在正忙着呢!"
end
if me.isFighting then
return "你正在战斗中,无法专心干活!"
end
if me.weapon ~= "锄头" then
return "你想用什么来锄草,用手吗?"
end
if me.target ~= "草" then
return "你要锄什么?"
end
costj = math.random(math.floor(me.Con/3))
costq = math.random(math.floor(me.Str/3))
if me.ap < costj or me.hp < costq then
me.unconcious()
return "$N手一松,不小心锄在自己的脚上。"
end
-- me.receiveDamage("jingli",costj)
me.ap = me.ap - costj
me.hp = me.hp - costq
-- me.add("qi",-costq)
if me.mark["锄"] > 15 + math.random(5) and npcs["CaiYuanGuanShi"].room == me.room then
me.mark["完了"] = true
return "干的不错,好了,你可以到大师兄鲁坤那里去覆命了!"
end
me.startBusy(1)
me.mark["锄"] = me.mark["锄"] + 1
if me.skill.staff < 20 and math.random(10)>6 then
me.skill.staff = me.skill.staff + math.floor(me.int/10)
return "你在锄草中对于杖的用法有些体会!"
end
return "你挥起锄头,对着地上的杂草锄了起来。"
end