Skip to content

Commit

Permalink
add some values
Browse files Browse the repository at this point in the history
  • Loading branch information
ttwings authored and ttwings committed Oct 23, 2018
1 parent 8467d81 commit 373ff9f
Show file tree
Hide file tree
Showing 14 changed files with 585 additions and 212 deletions.
380 changes: 233 additions & 147 deletions .idea/workspace.xml

Large diffs are not rendered by default.

95 changes: 94 additions & 1 deletion Actor.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
-- id string 角色ID
-- name string 名称
-- fname string 姓
-- lname string 名
-- nickname string 绰号
-- title string 头衔
-- unique boolean 独特
-- country string 国家
-- description string 描述
-- gender string 性别
-- sect string 门派
-- age int 年龄
-- turn int 回合
-- exp int 历练
-- faith string 信仰
-- moral int 道德
-- attitude string 态度
-- reputation int 声望
-- force int 内力
-- strike int 攻击
-- dodge int 躲闪
-- parry int 招架
-- skill tableString[k:#1(string)|v:#2(int)] 技能
-- mapSkill tableString[k:#1(string)|v:#2(string)] 装备技能
-- Str int 臂力
-- Con int 根骨
-- Dex int 身法
-- Int int 悟性
-- Wis int 五感
-- Cha int 容貌
-- Luc int 福源
-- maxHP int 最大气血
-- maxMP int 最大真气
-- maxAP int 最大精力
-- maxEP int 最大精神
-- hp int 气血
-- mp int 真气
-- ap int 体力
-- ep int 精神
-- weapon string 武器
-- armor tableString[k:#seq|v:#1(string)] 防具
-- misc tableString[k:#seq|v:#1(string)] 杂物
-- state string 状态
-- action string 动作
-- region string 区域
-- room string 房间
-- obj string 发现物品
-- target string 遇见角色
-- food string 食物
-- water string 饮水
-- money int 金钱
-- x int 坐标x
-- y int 坐标y
-- tx int tiled坐标x
-- ty int tiled坐标y
-- actorImg string 行走图
-- anim tableString[k:#1(string)|v:#2(int)] 动画
-- image tableString[k:#1(string)|v:#2(int)] 图像
-- faceImg string 头像
-- toward string 朝向
-- condition tableString[k:#1(string)|v:#2(int)] 状态
-- isBusy boolean 忙碌中
-- isFighting boolean 战斗中
-- jobName mapString[name=string,number=int,state=string,obj=string] 工作名称
-- mark tableString[k:#1(string)|v:#2(int)] 标记
-- encumbrance int 负重
-- message tableString[k:#seq|v:#1(string)] 讯息






Class = require "lib/middleclass"
local anim8 = require "lib/anim8"
require("keymap")
Expand All @@ -12,6 +85,15 @@ require("objects.Food")
GameObject = require("objects.GameObject")
--- 角色数据
--- @class Actor
--- @param area Area
--- @param x number
--- @param y number
--- @param opts table
--- @field id string
--- @field fname string
--- @field lname string
--- @field name string 姓名

Actor = Class("Actor",GameObject)
function Actor:init(area,x,y,opts)
--GameObject.init(self,area,x,y,opts)
Expand All @@ -20,7 +102,18 @@ function Actor:init(area,x,y,opts)
self.grid_x = math.ceil(self.x / 32)
self.grid_y = math.ceil(self.y / 32)
self.actorImg = assets.graphics.characters.actor_001
self:getAnims(self["actorImg"] or "actor (1)")
--self:getAnims(self["actorImg"] or "actor (1)")
self.id = UUID()
self.fname = ""
self.lname = ""
self.name = ""
self.gender = ""
self.age = 16
self.nickname = ""
self.country = ""
self.family = ""
self.sect = ""
self.title = ""
self.turn = 0
self.cd = 1
self.sleep = false
Expand Down
29 changes: 0 additions & 29 deletions GameObject.lua

This file was deleted.

80 changes: 80 additions & 0 deletions assets/data/actorData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,86 @@
-- debuff tableString[k:#1(string)|v:#2(int)] 有害状态

return {
["actor_base"] = {
id = "",
region = "",
room = "",
name = "",
fname = "",
lname = "",
epithet = "",
clan = "",
country = "",
description = "",
sex = "",
sect = "",
age = 16,
turn = 0,
exp = 0,
faith = "",
moral = 0,
reputation = 0,
Str = 8,
Con = 8,
Dex = 8,
Int = 8,
Wis = 8,
Cha = 8,
Luc = 8,
maxHP = 80,
maxMP = 0,
maxAP = 80,
hp = 80,
mp = 0,
ap = 80,
skills = {
长拳 = 123,
},
mainHand = "长拳",
offHand = "",
parry = "",
dodge = "",
force = "",
head = "",
face = "",
shoulder = "",
body = "",
waist = "",
hand = "",
arms = "",
leg = "",
feet = "",
misc = {
[1] = "碎银",
},
state = "",
action = "",
target = "",
foodBag = {
干粮 = 20,
},
waterBag = {
清水 = 10,
},
food = "100",
water = "100",
pain = "0",
money = "0",
actorImg = "actor (1)",
faceImg = "1",
birth = "",
youth = "",
adult = "",
midage = "",
oldage = "",
x = 0,
y = 0,
tx = 0,
ty = 0,
toward = "S",
buff = nil,
debuff = nil,
},
["言达平"] = {
id = "言达平",
region = "襄阳武馆",
Expand Down
70 changes: 70 additions & 0 deletions assets/data/actorDataNew.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,77 @@
-- encumbrance int 负重
-- message tableString[k:#seq|v:#1(string)] 讯息

-- id xxx xxxx ,region id + index
return {
[1000000] = {
id = 1000000,
name = "",
fname = "",
lname = "",
nickname = "",
title = "",
unique = true,
country = "",
description = "",
gender = "",
sect = "",
age = 16,
turn = 0,
exp = 0,
faith = "",
moral = 0,
attitude = "",
reputation = 0,
force = 10,
strike = 10,
dodge = 10,
parry = 10,
skill = {},
mapSkill = {},
Str = 8,
Con = 8,
Dex = 8,
Int = 8,
Wis = 8,
Cha = 8,
Luc = 8,
maxHP = 40,
maxMP = 0,
maxAP = 40,
maxEP = 40,
hp = 40,
mp = 0,
ap = 40,
ep = 40,
weapon = "",
armor = nil,
misc = nil,
state = "",
action = "",
region = "",
room = "",
obj = "",
target = "",
food = "100",
water = "100",
money = 0,
x = 0,
y = 0,
tx = 0,
ty = 0,
actorImg = "actor (1)",
anim = nil,
image = nil,
faceImg = "1",
toward = "S",
condition = nil,
isBusy = false,
isFighting = false,
jobName = nil,
mark = nil,
encumbrance = 1000,
message = nil,
},
["YanDaPing"] = {
id = "YanDaPing",
name = "言达平",
Expand Down
4 changes: 2 additions & 2 deletions assets/data/objs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ return {
["chai_dao"] = {ID="柴刀",type="工具",name="柴刀",weight=500,unit="",description="这是一柄沉甸甸的砍柴刀,普通百姓的日常用品。",value=50,material="",water=0,food=0,pice=0,actionA="",actionB="",actionX="",actionY="",messageA="",messageB="$N「唰」的一声抽出一柄$n握在手中。",messageC="$N将手中的$n插回腰间。",messageD="",},
["chu_tou"]={ID="锄头",type="工具",name="锄头",weight=500,unit="",description="这是一把锄头,普通百姓的日常务农用品。",value=50,material="",water=0,food=0,pice=0,actionA="",actionB="",actionX="",actionY="",messageA="",messageB="$N「唰」的一声抽出一柄$n握在手中。",messageC="$N将手中的$n抗在肩上。",messageD="",},
["da_wan_cha"]={ID="大碗茶",type="water",name="大碗茶",weight=50,unit="",description="一杯大碗茶,悠悠地冒着热气~~~",value=0,material="",water=30,food=0,pice=3,actionA="",actionB="",actionX="",actionY="",messageA="$N端起杯茶,有滋有味地品了几口。一股香气直入心脾,$N觉得精神好多了。",messageB="",messageC="",messageD="",},
["麻婆豆腐"]={ID="麻婆豆腐",type="food",name="麻婆豆腐",weight=200,unit="",description="在雪白细嫩的豆腐上、点缀着棕红色的牛肉末和油绿的青蒜苗,外围一圈透亮的红油,如玉镶琥珀,具有麻、辣、烫、嫩、酥、香、鲜的独特风味。",value=60,material="",water=0,food=50,pice=3,actionA="",actionB="",actionX="",actionY="",messageA="",messageB="",messageC="",messageD="",},
["锦缎"]={ID="锦缎",type="衣服",name="锦缎",weight=3000,unit="",description="华贵的锦缎",value=10000,material="丝绸",water=0,food=0,pice=0,actionA="",actionB="",actionX="穿",actionY="",messageA="",messageB="",messageC="",messageD="",},
["ma_po_dou_fu"]={ID="麻婆豆腐",type="food",name="麻婆豆腐",weight=200,unit="",description="在雪白细嫩的豆腐上、点缀着棕红色的牛肉末和油绿的青蒜苗,外围一圈透亮的红油,如玉镶琥珀,具有麻、辣、烫、嫩、酥、香、鲜的独特风味。",value=60,material="",water=0,food=50,pice=3,actionA="",actionB="",actionX="",actionY="",messageA="",messageB="",messageC="",messageD="",},
["jin_duan"]={ID="锦缎",type="衣服",name="锦缎",weight=3000,unit="",description="华贵的锦缎",value=10000,material="丝绸",water=0,food=0,pice=0,actionA="",actionB="",actionX="穿",actionY="",messageA="",messageB="",messageC="",messageD="",},
["锯子"]={ID="锯子",type="工具",name="锯子",weight=500,unit="",description="这是一用来锯木头的锯子,普通百姓的日常用品。",value=50,material="",water=0,food=0,pice=0,actionA="",actionB="",actionX="",actionY="",messageA="",messageB="$N拿出一把$n握在手中。",messageC="$N将手中的扛在肩上。",messageD="",},
["馒头"]={ID="馒头",type="food",name="馒头",weight=50,unit="",description="一个刚从蒸笼里拿出来的白馒头,还冒着热气~~~",value=120,material="",water=0,food=40,pice=5,actionA="",actionB="",actionX="",actionY="",messageA="",messageB="",messageC="",messageD="",},
[""]={ID="",type="工具",name="",weight=500,unit="",description="这是一个用老葫芦劈开做成的瓢,普通百姓的日常务农用品。",value=50,material="",water=0,food=0,pice=0,actionA="",actionB="浇水",actionX="",actionY="",messageA="",messageB="$N拿出一把$n握在手中。",messageC="$N将手中的$n插在腰上。",messageD="",},
Expand Down
Binary file removed assets/data/simsun.ttf
Binary file not shown.
File renamed without changes
21 changes: 21 additions & 0 deletions globle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,27 @@ quality_labels[3] = '【超三品】'
quality_labels[2] = '【绝二品】'
quality_labels[1] = '【天一品】'

--- 武器
weapons = {"手套","","","","","","","","奇门"}
--- 材质
materials = {"麻布","皮革","丝绸","软木","硬木","铁木","玉石","金铁","炼化"}
--- 功法类型
gongfas = {"拳掌","指爪","剑法","刀法","长兵","暗器","奇门","乐器","内功","绝技"}
--- 技能类型
skills = {"音律","弈棋","诗书","绘画","厨艺","品鉴","术数","杂学","锻造","制木","医术","毒术","织锦","巧匠","佛学","道法","儒学"}
--- 内功类型
forces = {"混元","玄阴","纯阳","调和"}

--- 国家
countries = {"大宋","大元","大夏","大金","大理"}

--- 家族
families = {"参合庄","曼陀山庄","白陀山庄","聚贤庄","一品堂","药王庄","万兽山庄","绿柳山庄"}

--- 门派
sects = {"少林寺","大理寺","金轮寺","武当派","全真教","太乙教","百草帮","丐帮","五毒教","峨眉派","玄女派"}


--- 绘制
--- @type func love.graphics.rectangleArcPanel
function love.graphics.rectangleArcPanel(x,y,w,h,r,line_width,line_color,panel_color,isLine)
Expand Down
10 changes: 10 additions & 0 deletions lib/gooi/component.lua
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,16 @@ function component:draw()-- Every component has the same base:
self.style.radius,
self.style.radius,
circleRes)

--love.graphics.rectangleCN(
-- math.floor(self.x),
-- math.floor(self.y),
-- math.floor(self.w),
-- math.floor(self.h),
-- 10
-- --self.style.radius,
-- --circleRes
--)
end, "replace", 1)
love.graphics.setStencilTest("greater", 0)
local scaleY = 1
Expand Down
2 changes: 1 addition & 1 deletion lib/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ function recursiveEnumerate( folder,file_list )
local items = love.filesystem.getDirectoryItems(folder)
for _,item in ipairs(items) do
local file = folder .. '/' .. item
if love.filesystem.isFile(file) then
if love.filesystem.getInfo(file).type == "file" then
table.insert(file_list,file)
elseif love.filesystem.isDirectory(file) then
recursiveEnumerate(file,file_liset)
Expand Down
Loading

0 comments on commit 373ff9f

Please sign in to comment.