From 7e8c4e373e53e2029a32e87b7d94846d67b5aece Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 4 Aug 2019 18:00:01 +0200 Subject: [PATCH] chore: prepare new character architecture --- .../datas/gamedata/characters/sonic.lua | 70 ------------------ .../gamedata/characters/sonic/actions.lua | 17 +++++ .../datas/gamedata/characters/sonic/init.lua | 13 ++++ .../gamedata/characters/sonic/inventory.lua | 8 ++ .../gamedata/characters/sonic/skills.lua | 16 ++++ .../gamedata/characters/sonic/sprites.lua} | 0 .../gamedata/characters/sonic/sprites.png} | Bin .../datas/gamedata/characters/sonic/stats.lua | 11 +++ .../scenes/test_scene/assets.lua | 2 +- 9 files changed, 66 insertions(+), 71 deletions(-) delete mode 100644 sonic-radiance.love/datas/gamedata/characters/sonic.lua create mode 100644 sonic-radiance.love/datas/gamedata/characters/sonic/actions.lua create mode 100644 sonic-radiance.love/datas/gamedata/characters/sonic/init.lua create mode 100644 sonic-radiance.love/datas/gamedata/characters/sonic/inventory.lua create mode 100644 sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua rename sonic-radiance.love/{assets/sprites/characters/sonic.lua => datas/gamedata/characters/sonic/sprites.lua} (100%) rename sonic-radiance.love/{assets/sprites/characters/sonic.png => datas/gamedata/characters/sonic/sprites.png} (100%) create mode 100644 sonic-radiance.love/datas/gamedata/characters/sonic/stats.lua diff --git a/sonic-radiance.love/datas/gamedata/characters/sonic.lua b/sonic-radiance.love/datas/gamedata/characters/sonic.lua deleted file mode 100644 index 9b3bee1..0000000 --- a/sonic-radiance.love/datas/gamedata/characters/sonic.lua +++ /dev/null @@ -1,70 +0,0 @@ -return { - name = "Default", - name_full = "Default the Character", - class = "Speedster", - startlevel = 100, - isUnlockedAtStart = true, - - base_stats = { - hpmax = 200, -- - ppmax = 50, -- - - attack = 50, -- - power = 50, -- - defense = 50, -- - technic = 50, -- - mind = 50, -- - speed = 50, -- - - turns = 3, -- number of attacks by turn (unused) - move = 3, -- how far the character can get in one turn - }, - - color = {1, 1, 1}, - - skill_list = { - --{attack_name, level}, - {"spinattack", 2}, - {"spinjump", 3}, - {"spindash", 8}, - {"hommingattack", 11}, - {"spinattack", 15}, - {"sonicflare", 18}, - {"bluetornado", 22}, - {"spindash", 26}, - {"soniccracker", 30}, - {"hommingattack", 35}, - {"bluetornado", 40}, - {"boost", 62}, - {"lightspeedattack", 70}, - }, - - flags = { - canGoSuper = true, - }, - - assets = { - charset = {"", 1}, - lifeicon = 1, - spriteset = "sonic", - }, - - inventory = { - haveShoes = true, - haveMechs = false, - haveGlove = true, - haveHammer= false, - accessories_number = 3, - chao_number = 1, - }, - - boost_stats = { - spd = 5, - jmp = 3, - jumpaction = "doublejump", - jumpaction_power = 2, - action = "spinattack", - action_power = 1, - canBreakCraft = false, - } -} diff --git a/sonic-radiance.love/datas/gamedata/characters/sonic/actions.lua b/sonic-radiance.love/datas/gamedata/characters/sonic/actions.lua new file mode 100644 index 0000000..af13095 --- /dev/null +++ b/sonic-radiance.love/datas/gamedata/characters/sonic/actions.lua @@ -0,0 +1,17 @@ +local actions = {} + +actions.aerial = {} + +function actions.aerial.start(n, actor) + +end + +function actions.aerial.update(dt, actor) + +end + +function actions.aerial.onGround(actor) + +end + +return actions diff --git a/sonic-radiance.love/datas/gamedata/characters/sonic/init.lua b/sonic-radiance.love/datas/gamedata/characters/sonic/init.lua new file mode 100644 index 0000000..701f0a5 --- /dev/null +++ b/sonic-radiance.love/datas/gamedata/characters/sonic/init.lua @@ -0,0 +1,13 @@ +return { + name = "Sonic", + fullname = "Sonic the Hedgehog", + class = "speedster", + speed = 5, + jump = 3, + + startlevel = 1, + + isUnlockedAtStart = true, + canGoSuper = true, + canBreakCraft = false, +} diff --git a/sonic-radiance.love/datas/gamedata/characters/sonic/inventory.lua b/sonic-radiance.love/datas/gamedata/characters/sonic/inventory.lua new file mode 100644 index 0000000..af61dc3 --- /dev/null +++ b/sonic-radiance.love/datas/gamedata/characters/sonic/inventory.lua @@ -0,0 +1,8 @@ +return { + haveShoes = true, + haveMechs = false, + haveGlove = true, + haveHammer= false, + accessories_number = 3, + chao_number = 1, +} diff --git a/sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua b/sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua new file mode 100644 index 0000000..b68f655 --- /dev/null +++ b/sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua @@ -0,0 +1,16 @@ +return { +--{attack_name, level}, + {"spinattack", 2}, + {"spinjump", 3}, + {"spindash", 8}, + {"hommingattack", 11}, + {"spinattack", 15}, + {"sonicflare", 18}, + {"bluetornado", 22}, + {"spindash", 26}, + {"soniccracker", 30}, + {"hommingattack", 35}, + {"bluetornado", 40}, + {"boost", 62}, + {"lightspeedattack", 70}, +} diff --git a/sonic-radiance.love/assets/sprites/characters/sonic.lua b/sonic-radiance.love/datas/gamedata/characters/sonic/sprites.lua similarity index 100% rename from sonic-radiance.love/assets/sprites/characters/sonic.lua rename to sonic-radiance.love/datas/gamedata/characters/sonic/sprites.lua diff --git a/sonic-radiance.love/assets/sprites/characters/sonic.png b/sonic-radiance.love/datas/gamedata/characters/sonic/sprites.png similarity index 100% rename from sonic-radiance.love/assets/sprites/characters/sonic.png rename to sonic-radiance.love/datas/gamedata/characters/sonic/sprites.png diff --git a/sonic-radiance.love/datas/gamedata/characters/sonic/stats.lua b/sonic-radiance.love/datas/gamedata/characters/sonic/stats.lua new file mode 100644 index 0000000..f40c858 --- /dev/null +++ b/sonic-radiance.love/datas/gamedata/characters/sonic/stats.lua @@ -0,0 +1,11 @@ +return { + hpmax = 200, -- + ppmax = 50, -- + + attack = 50, -- + power = 50, -- + defense = 50, -- + technic = 50, -- How much items & wisps will be powerfull for this character. + mind = 50, -- Magic defense. + luck = 50, -- Critical hits and stuff like that. +} diff --git a/sonic-radiance.love/scenes/test_scene/assets.lua b/sonic-radiance.love/scenes/test_scene/assets.lua index 712c1c4..d749a61 100644 --- a/sonic-radiance.love/scenes/test_scene/assets.lua +++ b/sonic-radiance.love/scenes/test_scene/assets.lua @@ -3,7 +3,7 @@ return { {"shadow", "assets/sprites/shadow.png"} }, ["sprites"] = { - {"sonic", "assets/sprites/characters/sonic"}, + {"sonic", "datas/gamedata/characters/sonic/sprites"}, {"ring", "assets/sprites/items/ring"} }, ["imagefonts"] = {