From d00148c44ed3e6c50ac623b377ebab8d22c74ad3 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 6 Jun 2021 13:19:25 +0200 Subject: [PATCH] improvement: make spin attack the default attack --- .../gamedata/characters/sonic/skills.lua | 3 +- .../datas/gamedata/skills/attack.lua | 84 +++-------------- .../datas/gamedata/skills/hitcombo.lua | 92 +++++++++++++++++++ .../datas/gamedata/skills/spinattack.lua | 35 ------- 4 files changed, 108 insertions(+), 106 deletions(-) create mode 100644 sonic-radiance.love/datas/gamedata/skills/hitcombo.lua delete mode 100644 sonic-radiance.love/datas/gamedata/skills/spinattack.lua diff --git a/sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua b/sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua index 2aed1c1..4a5b1bb 100644 --- a/sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua +++ b/sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua @@ -1,8 +1,7 @@ return { --{attack_name, level}, - {"spinattack", 2}, + {"spindash", 2}, --{"spinjump", 3}, - {"spindash", 8}, {"hommingattack", 11}, {"spinattack", 15}, {"sonicflare", 18}, diff --git a/sonic-radiance.love/datas/gamedata/skills/attack.lua b/sonic-radiance.love/datas/gamedata/skills/attack.lua index 08e5121..0ef4bd0 100644 --- a/sonic-radiance.love/datas/gamedata/skills/attack.lua +++ b/sonic-radiance.love/datas/gamedata/skills/attack.lua @@ -4,42 +4,27 @@ -- Also serve as a tutoriel for how to create a file attack and choregraphy return { - name = "attack", -- unused for this attack, but still usefull sometimes - cost = 00, -- the pp cost of the attack. Will be ignored if it's set - -- as character default attack + name = "attack", -- unused for this attack, but still usefull sometimes + fullname = "Spin Attack", + cost = 00, -- the pp cost of the attack. Will be ignored if it's set + -- as character default attack + description = "Spin to attack. Roll at the right time for more damages", - needTarget = true, targetNumber = 1, -- 0 for targeting all ennemies + targetEnnemies = true, choregraphy = { -- the main attack choregraphy {"setAnimation", "none", "walk", false}, - {'goTo', "none", "target", -1, 0, 0.3, true}, - - {"addQTE", "none", {"simplePrompt", {{"A", 1}}, 0.2}, "target", false}, - {'playSFX', "none", 'hit'}, - {'setAnimation', "none", 'hit1start', true}, - {'sendDamage', "none", 33, "basic", "none", false}, - {'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false}, + {"goTo", "none", "target", 0, 0, 0.6, false}, + {"wait", "none", 0.3}, + {"setAnimation", "none", "spin", false}, + {'playSFX', "none", 'spinrelease'}, + {"waitActorFinished", "none", "goTo"}, + {"sendDamage", "none", 100, "basic", "none", false}, + {'addGFX', "sentDamage", 'hitGFX', "target", 0, 0, true, false}, {'playSFX', "sentDamage", 'hitconnect'}, - {'setAnimation', "none", 'hit1end', true}, - - {"addQTE", "none", {"simplePrompt", {{"A", 1}}, 0.2}, "target", false}, - {'playSFX', "none", 'hit'}, - {'setAnimation', "none", 'hit2start', true}, - {'sendDamage', "none", 33, "basic", "none", false}, - {'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false}, - {'playSFX', "sentDamage", 'hitconnect'}, - {'setAnimation', "none", 'hit2end', true}, - - {"addQTE", "none", {"simplePrompt", {{"A", 1}}, 0.2}, "target", false}, - {'playSFX', "none", 'hit'}, - {'setAnimation', "none", 'hit3start', true}, - {'sendDamage', "none", 33, "basic", "none", false}, - {'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false}, - {'playSFX', "sentDamage", 'hitconnect'}, - {'setAnimation', "none", 'hit3end', true}, - {'setAnimation', "none", 'idle', false}, - {'wait', "none", 0.2}, + {'jumpBack', "none", 0.3, true}, + {"wait", "none", 0.1}, {"setAnimation", "none", "walk", false}, {'goTo', "none", "start", 0, 0, 0.3, true}, {'setAnimation', "none", 'idle', false}, @@ -49,42 +34,3 @@ return { -- specific effect when you touch the ennemy. }, } - ---[[ - CHOREGRAPHY POSSIBLE EFFECTS --- "wait" :: Simply wait before doing the next command --- :: {"wait", condition, duration} - --- "setAnimation" :: Change the animation of the battler --- {"setAnimation", condition, animation, blockProcess} - --- "addGFX" :: Show a GFX relatively to the target position --- :: (player if target is nil) --- :: {"addGFX", condition, "gfxname", x, y, affectedByDirection, blockProcess} - --- "sendDamage" :: Send Damage on the whole target Area --- :: --- :: {"sendDamage", condition, damageEffect, accuracy, isSpecial, isAerial} - --- "sendDamageFromPos" :: Send Damage on a point from Actor position --- :: --- :: {"sendDamageFromPos", condition, dx, dy, damageEffect, accuracy, isSpecial, isAerial, affectedByDirection} - --- "sendDamageFromCursor" :: Send Damage on a point from Cursor final position --- :: --- :: {"sendDamageFromCursor", condition, dx, dy, damageEffect, accuracy, isSpecial, isAerial, affectedByDirection} - - --- "dashForward" :: Dash until your are stopped --- :: {"dashForward", condition, speed, blockProcess} - --- "jumpBack" :: jump to initial position --- :: {"jumpBack", condition, blockProcess} - - CONDITION TYPES --- --- "sentDamage" :: an ennemy have received damage --- --- - -]] diff --git a/sonic-radiance.love/datas/gamedata/skills/hitcombo.lua b/sonic-radiance.love/datas/gamedata/skills/hitcombo.lua new file mode 100644 index 0000000..9b7deee --- /dev/null +++ b/sonic-radiance.love/datas/gamedata/skills/hitcombo.lua @@ -0,0 +1,92 @@ +-- A basic file describing the basic attack, in order to make it customizable one +-- day ? + +-- Also serve as a tutoriel for how to create a file attack and choregraphy + +return { + name = "hitcombo", + fullname = "Hit Combo", + cost = 03, + description = "Chain punches and strike with a final blow", + + needTarget = true, + targetNumber = 1, -- 0 for targeting all ennemies + targetEnnemies = true, + + choregraphy = { -- the main attack choregraphy + {"setAnimation", "none", "walk", false}, + {'goTo', "none", "target", -1, 0, 0.3, false}, + {"wait", "none", 0.15}, + {"addQTE", "none", {"simplePrompt", {{"A", 1}, {"A", 1}, {"B", 1}}, 0.5}, "target", false}, + {"wait", "none", 0.15}, + + {'playSFX', "none", 'hit'}, + {'setAnimation', "none", 'hit1start', true}, + {'sendDamage', "none", 40, "basic", "none", false}, + {'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false}, + {'playSFX', "sentDamage", 'hitconnect'}, + {'setAnimation', "none", 'hit1end', true}, + + {'playSFX', "none", 'hit'}, + {'setAnimation', "none", 'hit2start', true}, + {'sendDamage', "none", 40, "basic", "none", false}, + {'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false}, + {'playSFX', "sentDamage", 'hitconnect'}, + {'setAnimation', "none", 'hit2end', true}, + + {'playSFX', "none", 'hit'}, + {'setAnimation', "none", 'hit3start', true}, + {'sendDamage', "none", 40, "basic", "none", false}, + {'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false}, + {'playSFX', "sentDamage", 'hitconnect'}, + {'setAnimation', "none", 'hit3end', true}, + {'setAnimation', "none", 'idle', false}, + {'wait', "none", 0.2}, + {"setAnimation", "none", "walk", false}, + {'goTo', "none", "start", 0, 0, 0.3, true}, + {'setAnimation', "none", 'idle', false}, + }, + + onContact = { -- if the attack move and touch multiple ennemies, you can add + -- specific effect when you touch the ennemy. + }, +} + +--[[ + CHOREGRAPHY POSSIBLE EFFECTS +-- "wait" :: Simply wait before doing the next command +-- :: {"wait", condition, duration} + +-- "setAnimation" :: Change the animation of the battler +-- {"setAnimation", condition, animation, blockProcess} + +-- "addGFX" :: Show a GFX relatively to the target position +-- :: (player if target is nil) +-- :: {"addGFX", condition, "gfxname", x, y, affectedByDirection, blockProcess} + +-- "sendDamage" :: Send Damage on the whole target Area +-- :: +-- :: {"sendDamage", condition, damageEffect, accuracy, isSpecial, isAerial} + +-- "sendDamageFromPos" :: Send Damage on a point from Actor position +-- :: +-- :: {"sendDamageFromPos", condition, dx, dy, damageEffect, accuracy, isSpecial, isAerial, affectedByDirection} + +-- "sendDamageFromCursor" :: Send Damage on a point from Cursor final position +-- :: +-- :: {"sendDamageFromCursor", condition, dx, dy, damageEffect, accuracy, isSpecial, isAerial, affectedByDirection} + + +-- "dashForward" :: Dash until your are stopped +-- :: {"dashForward", condition, speed, blockProcess} + +-- "jumpBack" :: jump to initial position +-- :: {"jumpBack", condition, blockProcess} + + CONDITION TYPES +-- +-- "sentDamage" :: an ennemy have received damage +-- +-- + +]] diff --git a/sonic-radiance.love/datas/gamedata/skills/spinattack.lua b/sonic-radiance.love/datas/gamedata/skills/spinattack.lua deleted file mode 100644 index a37dd8a..0000000 --- a/sonic-radiance.love/datas/gamedata/skills/spinattack.lua +++ /dev/null @@ -1,35 +0,0 @@ --- A basic file describing the basic attack, in order to make it customizable one --- day ? - --- Also serve as a tutoriel for how to create a file attack and choregraphy - -return { - name = "spinattack", - fullname = "Spin Attack", - cost = 03, - description = "Spin to attack. Roll at the right time for more damages", - - targetNumber = 1, -- 0 for targeting all ennemies - targetEnnemies = true, - - choregraphy = { -- the main attack choregraphy - {"setAnimation", "none", "walk", false}, - {"goTo", "none", "target", 0, 0, 0.6, false}, - {"wait", "none", 0.3}, - {"setAnimation", "none", "spin", false}, - {'playSFX', "none", 'spinrelease'}, - {"waitActorFinished", "none", "goTo"}, - {"sendDamage", "none", 120, "basic", "none", false}, - {'addGFX', "sentDamage", 'hitGFX', "target", 0, 0, true, false}, - {'playSFX', "sentDamage", 'hitconnect'}, - {'jumpBack', "none", 0.3, true}, - {"wait", "none", 0.1}, - {"setAnimation", "none", "walk", false}, - {'goTo', "none", "start", 0, 0, 0.3, true}, - {'setAnimation', "none", 'idle', false}, - }, - - onContact = { -- if the attack move and touch multiple ennemies, you can add - -- specific effect when you touch the ennemy. - }, -}