From cd59f8d74e0facd13fb30344217bee077ff5122e Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 18 Jul 2021 14:09:24 +0200 Subject: [PATCH] feat: add homming attack --- .../gamedata/characters/sonic/skills.lua | 2 +- .../datas/gamedata/skills/homming.lua | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 sonic-radiance.love/datas/gamedata/skills/homming.lua diff --git a/sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua b/sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua index 4a5b1bb..a627801 100644 --- a/sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua +++ b/sonic-radiance.love/datas/gamedata/characters/sonic/skills.lua @@ -2,7 +2,7 @@ return { --{attack_name, level}, {"spindash", 2}, --{"spinjump", 3}, - {"hommingattack", 11}, + {"homming", 8}, {"spinattack", 15}, {"sonicflare", 18}, {"bluetornado", 22}, diff --git a/sonic-radiance.love/datas/gamedata/skills/homming.lua b/sonic-radiance.love/datas/gamedata/skills/homming.lua new file mode 100644 index 0000000..e55b4e1 --- /dev/null +++ b/sonic-radiance.love/datas/gamedata/skills/homming.lua @@ -0,0 +1,48 @@ +-- 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 = "homming", -- unused for this attack, but still usefull sometimes + fullname = "Homming Attack", + cost = 00, -- the pp cost of the attack. Will be ignored if it's set + -- as character default attack + description = "Make consecutive attacks with A", + + targetNumber = 1, -- 0 for targeting all ennemies + targetEnnemies = true, + + choregraphy = { -- the main attack choregraphy + {"setAnimation", "none", "walk", false}, + {'goTo', "none", "start", 5, 0, 0.5, true}, + {"taggedAction", "jumpingHero", {'jump', "none", 5.5, true, false}}, + + {"taggedAction", "hommingQte", {"addQTE", "none", {"simplePrompt", {{"A", 1}}, 0.4}, "target", false}}, + {"waitFor", "none", "actionFinished:hommingQte"}, + + {"taggedAction", "dashToEnnemy", {"goTo3D", "none", "target", 0, 0, 8, 0.2, false}}, + {"setAnimation", "none", "spin", false}, + {'playSFX', "none", 'spinrelease'}, + {"waitFor", "none", "actionFinished:dashToEnnemy"}, + {"sendDamage", "none", 100, "basic", "none", false}, + {'addGFX', "sentDamage", 'hitGFX', "target", 0, 0, true, false}, + {'playSFX', "sentDamage", 'hitconnect'}, + {"taggedAction", "jumpingHero", {'jumpBack', "none", 5.5, 5.5, false}}, + {"wait", "none", 0.1}, + {"setCounter", "none", "spinSpam", 1, true}, + + {"taggedAction", "hommingQte", {"addQTE", {"counter:spinSpam:lt:5", "qteSuccess"}, {"simplePrompt", {{"A", 1}}, 0.3}, "target", false}}, + {"waitFor", "none", {"or", "actionFinished:hommingQte", "actionFinished:jumpingHero"}}, + {"skipTo", {"counter:spinSpam:lt:5", "qteSuccess"}, "dashToEnnemy"}, + + {"waitFor", "none", "actionFinished:jumpingHero"}, + {"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. + }, +}