关卡配置简化示例
[1] = {id = 1,
basic = { health = 1000, attack = 20 }, -- 血量,攻击力
activate = {delay = 0, location = {x = 0.8, y = 0.4}}, -- 位置
resource = {score = 10, gold = 1, goldAnime = true}, -- 金币档次是1
slash = {
[1] = {
number = {
calculation = {"attackAttribute"},
ratioValue = 0.5, -- 招式伤害比例
},
},
},
},
[2] = {id = 2,
basic = { health = 1000, attack = 20 },
activate = {delay = 0, location = {x = 0.9, y = 0.5}},
resource = {score = 10}, -- 不掉金币
slash = {
[1] = {
number = {
calculation = {"attackAttribute"},
ratioValue = 1.2,
},
},
},
},
[3] = {id = 3,
basic = { health = 1000, attack = 20 },
activate = {delay = 0, location = {x = 0.8, y = 0.4}},
resource = {score = 50, gold = 2, goldAnime = true}, -- 金币档次是2
slash = {
[1] = {
number = {
calculation = {"attackAttribute"},
ratioValue = 2,
},
},
},
},
room = {
[1] = {
enemy = {
[1] = {
waveId = 1, -- wave id的数组,取自wave.lua
health = 3, attack = 2, -- 血量倍数,攻击力倍数。一波的配置,优先级更高,配了就不受整关配置的影响,不配就读整关的配置。
offset = {x = 0.1, y = -0.1}, -- 位置偏移
},
},
health = 1.5, attack = 2, -- 血量倍数,攻击力倍数。整关的配置,优先级更低,对所有波生效。
resource = {gold = {20, 155, 420},}, -- 每档金币数量
background = 16,
moveState = "fly",
},
},
[1] = {id = 1,
type = "minion", leastCount = 2, -- type = "minion"/"boss", leastCount是出怪提前时间
bossId = {1, 2, 3}, -- boss id的数组,取自extendBoss.lua和boss.lua
},