From 22a73fd98f7ef806248c47261b75e880f8be959d Mon Sep 17 00:00:00 2001 From: keizaal Date: Thu, 17 Jun 2021 17:28:27 +0200 Subject: [PATCH] Implemented functions for ForwardD in BlueNormals and added the attack in CharacterBlue --- src/gameplay/Characters/Blue/BlueNormals.java | 219 +++++++++++++++++- .../Characters/Blue/CharacterBlue.java | 2 +- 2 files changed, 218 insertions(+), 3 deletions(-) diff --git a/src/gameplay/Characters/Blue/BlueNormals.java b/src/gameplay/Characters/Blue/BlueNormals.java index 8b463be..7b030e6 100644 --- a/src/gameplay/Characters/Blue/BlueNormals.java +++ b/src/gameplay/Characters/Blue/BlueNormals.java @@ -191,7 +191,7 @@ public class BlueNormals { for(int i = 0; i < f.length; i++) { f[i] = crouchCFrame3(); } - return(new attackPart(23,0,13,29,12,5,f,false,false,false)); + return(new attackPart(90,0,13,29,12,5,f,false,false,false)); } public static Attack blueCrouchFierce() { @@ -324,7 +324,7 @@ public class BlueNormals { f[0] = standAFrame2(); f[1] = standAFrame2(); f[2] = standAFrame2(); - return(new attackPart(20,0,4,4,8,3,f,false,false,false)); + return(new attackPart(80,0,4,4,8,3,f,false,false,false)); } public static Attack blueStandJab() { @@ -501,5 +501,220 @@ public class BlueNormals { attackPart[] parts = {blueStandDstartup(),blueStandDactive(),blueStandDrecovery()}; return new Attack(isSpecial,rS,cmd,parts); } + private static Frame ForwardDFrame0() { + //movement data + double moveX = 3.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = false; + boolean jumpC = false; + boolean moveC = false; + boolean dashC = false; + + //hitbox lists + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + + //generate hitboxes here and then use ArrayList add method to add them to the correct list + Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*5),(138*4),138,138); + return f; + } + private static Frame ForwardDFrame1(){ + //movement data + double moveX = 0.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = false; + boolean jumpC = false; + boolean moveC = false; + boolean dashC = false; + + //hitbox lists + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + + //generate hitboxes here and then use ArrayList add method to add them to the correct list + Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*5),(138*4),138,138); + return f; + } + + private static Frame ForwardDFrame2(){ + //movement data + double moveX = 0.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = false; + boolean jumpC = false; + boolean moveC = false; + boolean dashC = false; + + //hitbox lists + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + + //generate hitboxes here and then use ArrayList add method to add them to the correct list + Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*10),138,138,138); + return f; + } + + private static Frame ForwardDFrame3(){ + //movement data + double moveX = 0.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = false; + boolean jumpC = false; + boolean moveC = false; + boolean dashC = false; + + //hitbox lists + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + + //generate hitboxes here and then use ArrayList add method to add them to the correct list + Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*11),138,138,138); + return f; + } + + private static Frame ForwardDFrame4(){ + //movement data + double moveX = 0.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = false; + boolean jumpC = false; + boolean moveC = false; + boolean dashC = false; + + //hitbox lists + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + + //generate hitboxes here and then use ArrayList add method to add them to the correct list + Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*12),138,138,138); + return f; + } + + private static Frame ForwardDFrame5(){ + //movement data + double moveX = 0.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = false; + boolean jumpC = false; + boolean moveC = false; + boolean dashC = false; + + //hitbox lists + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + + //generate hitboxes here and then use ArrayList add method to add them to the correct list + Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*5),(138*4),138,138); + return f; + } + + private static attackPart blueForwardDstartup() { + Frame[] f = new Frame[18]; + for (int i = 0; i < 3 ; i++) { + f[i] = ForwardDFrame0(); + } + for (int i = 3; i < 10; i++) { + f[i] = ForwardDFrame1(); + } + for (int i = 10; i < f.length; i++) { + f[i] = ForwardDFrame2(); + } + return (new attackPart(f)); + } + + private static attackPart blueForwardDrecovery() { + Frame[] f = new Frame[8]; + for (int i = 0; i < 3; i++) { + f[i] = ForwardDFrame4(); + } + for (int i = 3; i < f.length; i++) { + f[i] = ForwardDFrame5(); + } + return (new attackPart(f)); + } + + private static attackPart blueForwardDactive() { + Frame[] f = new Frame[4]; + for (int i = 0; i < f.length; i++) { + f[i] = ForwardDFrame3(); + } + return(new attackPart(30,0,5,5,0,0,f,false,true,false)); + } + + private static attackPart blueForwardDactive2() { + Frame[] f = new Frame[3]; + for (int i = 0; i < f.length; i++) { + f[i] = ForwardDFrame4(); + } + return(new attackPart(70,0,11,3,8.0,4.0,f,false,true,false)); + } + + public static Attack blueFordwardRoundHouse() { + ButtonIG[][] cmd = {{FORWARD,D}}; + boolean isSpecial = false; + Status rS = Status.NORMAL; + attackPart[] parts = {blueForwardDstartup(),blueForwardDactive(),blueForwardDactive2(),blueForwardDrecovery()}; + return new Attack(isSpecial,rS,cmd,parts); + } } diff --git a/src/gameplay/Characters/Blue/CharacterBlue.java b/src/gameplay/Characters/Blue/CharacterBlue.java index c9db4c7..0cce9e3 100644 --- a/src/gameplay/Characters/Blue/CharacterBlue.java +++ b/src/gameplay/Characters/Blue/CharacterBlue.java @@ -31,7 +31,7 @@ public class CharacterBlue { Jump nJ = new Jump(njcmd,nJumpF); Jump bJ = new Jump(bjcmd,bJumpF); - Attack[] atks = {blueLDP(),blueCrouchFierce(),blueCrouchJab(),blueStandHeavyKick(),blueStandJab()}; + Attack[] atks = {blueLDP(),blueCrouchFierce(),blueCrouchJab(),blueStandHeavyKick(),blueStandJab(),blueFordwardRoundHouse()}; /* * Temporary values to change later