From d0a842c48134c6c36d2d597549defea3f2925087 Mon Sep 17 00:00:00 2001 From: Azra Victor Date: Wed, 16 Jun 2021 10:40:46 +0200 Subject: [PATCH 1/2] added blue stand jab and heavy kick moves --- src/gameplay/Characters/Blue/BlueNormals.java | 279 +++++++++++++++++- .../Characters/Blue/CharacterBlue.java | 5 +- src/gameplay/match/match.java | 2 +- 3 files changed, 276 insertions(+), 10 deletions(-) diff --git a/src/gameplay/Characters/Blue/BlueNormals.java b/src/gameplay/Characters/Blue/BlueNormals.java index e66c6d6..c1fcd92 100644 --- a/src/gameplay/Characters/Blue/BlueNormals.java +++ b/src/gameplay/Characters/Blue/BlueNormals.java @@ -13,8 +13,7 @@ import gameplay.input.ButtonIG; import java.util.ArrayList; -import static gameplay.input.ButtonIG.A; -import static gameplay.input.ButtonIG.DOWN; +import static gameplay.input.ButtonIG.*; public class BlueNormals { @@ -27,7 +26,7 @@ public class BlueNormals { phb.add(bStandPHB1); pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList(),pthb,new ArrayList(), - bStandPB1,true,true,true,true,true); + bStandPB1,false,false,false,false,false); blueStandframe1.setSpriteWrap(102,120,102,120); return blueStandframe1; } @@ -41,7 +40,7 @@ public class BlueNormals { phb.add(bStandPHB1); pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList(),pthb,new ArrayList(), - bStandPB1,true,true,true,true,true); + bStandPB1,false,false,false,false,false); blueStandframe1.setSpriteWrap(816,120,102,120); return blueStandframe1; } @@ -55,7 +54,7 @@ public class BlueNormals { phb.add(bStandPHB1); pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList(),pthb,new ArrayList(), - bStandPB1,true,true,true,true,true); + bStandPB1,false,true,false,false,false); blueStandframe1.setSpriteWrap(102,120,102,120); return blueStandframe1; } @@ -81,7 +80,7 @@ public class BlueNormals { private static attackPart blueCrouchAactive() { Frame[] f = new Frame[3]; - f[0] = crouchAFrame3(); + f[0] = crouchAFrame2(); f[1] = crouchAFrame2(); f[2] = crouchAFrame2(); return(new attackPart(15,0,4,4,8,3,f,false,false,false)); @@ -91,7 +90,273 @@ public class BlueNormals { ButtonIG[][] cmd = {{DOWN,A}}; boolean isSpecial = false; Status rS = Status.NORMAL; - attackPart[] parts = {blueCrouchAstartup(),blueCrouchAactive(),blueCrouchAstartup()}; + attackPart[] parts = {blueCrouchAstartup(),blueCrouchAactive(),blueCrouchArecovery()}; return new Attack(isSpecial,rS,cmd,parts); } + + private static Frame standAFrame1(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(102,0,102,120); + return f; + } + + private static Frame standAFrame2(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,true,false,false,false); + f.setSpriteWrap(510,120,102,120); + return f; + } + + private static Frame standAFrame3(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,true,false,false,false); + f.setSpriteWrap(102,0,102,120); + return f; + } + + private static attackPart blueStandAstartup() { + Frame[] f = new Frame[3]; + f[0] = standAFrame1(); + f[1] = standAFrame1(); + f[2] = standAFrame1(); + f[3] = standAFrame3(); + return(new attackPart(f)); + } + + private static attackPart blueStandArecovery() { + Frame[] f = new Frame[5]; + f[0] = standAFrame3(); + f[1] = standAFrame3(); + f[2] = standAFrame3(); + f[3] = standAFrame3(); + f[4] = standAFrame3(); + return(new attackPart(f)); + } + + private static attackPart blueStandAactive() { + Frame[] f = new Frame[3]; + f[0] = standAFrame2(); + f[1] = standAFrame2(); + f[2] = standAFrame2(); + return(new attackPart(20,0,4,4,8,3,f,false,false,false)); + } + + public static Attack blueStandJab() { + ButtonIG[][] cmd = {{A}}; + boolean isSpecial = false; + Status rS = Status.NORMAL; + attackPart[] parts = {blueStandAstartup(),blueStandAactive(),blueStandArecovery()}; + return new Attack(isSpecial,rS,cmd,parts); + } + + private static Frame standDFrame1(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(0.0,3.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(408,0,102,120); + return f; + } + + private static Frame standDFrame2(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(1632,120,102,120); + return f; + } + + private static Frame standDFrame3(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(102,0,102,120); + return f; + } + + private static attackPart blueStandDstartup() { + Frame[] f = new Frame[8]; + for(int i = 0; i < f.length; i++) { + f[i] = standDFrame1(); + } + return(new attackPart(f)); + } + + private static attackPart blueStandDactive() { + Frame[] f = new Frame[5]; + for(int i = 0; i < f.length; i++) { + f[i] = standDFrame2(); + } + return(new attackPart(100,0,20,18,16,14,f,false,false,false)); + } + + private static attackPart blueStandDrecovery() { + Frame[] f = new Frame[18]; + for(int i = 0; i < f.length; i++) { + f[i] = standDFrame3(); + } + return(new attackPart(f)); + } + + public static Attack blueStandHeavyKick() { + ButtonIG[][] cmd = {{D}}; + boolean isSpecial = false; + Status rS = Status.NORMAL; + attackPart[] parts = {blueStandDstartup(),blueStandDactive(),blueStandDrecovery()}; + return new Attack(isSpecial,rS,cmd,parts); + } + } diff --git a/src/gameplay/Characters/Blue/CharacterBlue.java b/src/gameplay/Characters/Blue/CharacterBlue.java index e5ffda7..ca859f3 100644 --- a/src/gameplay/Characters/Blue/CharacterBlue.java +++ b/src/gameplay/Characters/Blue/CharacterBlue.java @@ -3,11 +3,12 @@ package gameplay.Characters.Blue; import gameplay.actions.*; import gameplay.entities.Character; import gameplay.frames.Frame; -import gameplay.Characters.Blue.BlueBaseFrames; +import gameplay.Characters.Blue.BlueBaseFrames.*; import gameplay.input.ButtonIG; import java.util.ArrayList; +import static gameplay.Characters.Blue.BlueNormals.*; import static gameplay.input.ButtonIG.*; public class CharacterBlue { @@ -29,7 +30,7 @@ public class CharacterBlue { Jump nJ = new Jump(njcmd,nJumpF); Jump bJ = new Jump(bjcmd,bJumpF); - Attack[] atks = {BlueNormals.blueCrouchJab()}; + Attack[] atks = {blueCrouchJab(),blueStandJab(),blueStandHeavyKick()}; /* * Temporary values to change later diff --git a/src/gameplay/match/match.java b/src/gameplay/match/match.java index 0eb08a3..4472f6e 100644 --- a/src/gameplay/match/match.java +++ b/src/gameplay/match/match.java @@ -320,7 +320,7 @@ public class match { c.setStatus(Status.JUMPING); } else if (input.commandRecognized(c.getBackJump().getCommand())) { c.clearNextFrames(); - c.addNextFramesList(c.getForwardJump().getFrame()); + c.addNextFramesList(c.getBackJump().getFrame()); actionSet = true; c.setStatus(Status.JUMPING); } else if (input.commandRecognized(c.getNeutralJump().getCommand())) { From 6863b399da49eb01fd0e8f698ed21b1d94bde562 Mon Sep 17 00:00:00 2001 From: Azra Victor Date: Wed, 16 Jun 2021 11:04:20 +0200 Subject: [PATCH 2/2] Added blue light rising punch special. --- .../Characters/Blue/BlueSpecials.java | 256 ++++++++++++++++++ .../Characters/Blue/CharacterBlue.java | 3 +- 2 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 src/gameplay/Characters/Blue/BlueSpecials.java diff --git a/src/gameplay/Characters/Blue/BlueSpecials.java b/src/gameplay/Characters/Blue/BlueSpecials.java new file mode 100644 index 0000000..b802537 --- /dev/null +++ b/src/gameplay/Characters/Blue/BlueSpecials.java @@ -0,0 +1,256 @@ +package gameplay.Characters.Blue; + +import engine.Engine; +import engine.math.Vector3f; +import engine.object.Hitbox; +import engine.object.ObjectGl; +import gameplay.actions.Attack; +import gameplay.actions.attackPart; +import gameplay.entities.Status; +import gameplay.frames.Frame; +import gameplay.hitboxes.*; +import gameplay.input.ButtonIG; + +import java.util.ArrayList; + +import static gameplay.input.ButtonIG.*; + +public class BlueSpecials { + private static Frame lDPFrame1(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(102,0,102,120); + return f; + } + private static Frame lDPFrame2(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(306,0,102,120); + return f; + } + private static Frame lDPFrame3(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(3.0,3.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(714,0,102,120); + return f; + } + + private static Frame lDPFrame4(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(3.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(714,0,102,120); + return f; + } + + private static Frame lDPFrame5(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(-3.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(714,0,102,120); + return f; + } + + private static Frame lDPFrame6(){ + + /* + Hitboxes lists creation + */ + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + + /* + Individual hitboxes creation + */ + Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox pushB = new Push_HitBox(70,70,150,500); + + /* + adding hitboxes to lists + */ + phb.add(phb1); + pthb.add(pthb1); + + /* + frame creation + */ + Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, + //cancels (in order : normal, special, jump, move, dash) + false,false,false,false,false); + f.setSpriteWrap(112,0,102,120); + return f; + } + + private static attackPart lDPStartup() { + Frame[] f = new Frame[3]; + f[0] = lDPFrame1(); + f[1] = lDPFrame2(); + f[2] = lDPFrame3(); + return(new attackPart(f)); + } + + private static attackPart lDPRecovery() { + Frame[] f = new Frame[29]; + for(int i = 0; i < 11; i++) { + f[i] = lDPFrame5(); + } + for(int i = 11; i < f.length; i++) { + f[i] = lDPFrame6(); + } + return(new attackPart(f)); + } + + private static attackPart lDPActive() { + Frame[] f = new Frame[11]; + for(int i = 0; i < 5; i++) { + f[i] = lDPFrame3(); + } + + for(int i = 5; i < f.length; i++) { + f[i] = lDPFrame4(); + } + + return(new attackPart(100,4,20,18,16,14,f,false,false,true)); + } + + protected static Attack blueLDP() { + ButtonIG[][] cmd = {{FORWARD},{DOWN},{DOWN,FORWARD},{A}}; + boolean isSpecial = true; + Status rS = Status.NORMAL; + attackPart[] parts = {lDPStartup(),lDPActive(),lDPRecovery()}; + return new Attack(isSpecial,rS,cmd,parts); + } + + +} diff --git a/src/gameplay/Characters/Blue/CharacterBlue.java b/src/gameplay/Characters/Blue/CharacterBlue.java index ca859f3..4320ea0 100644 --- a/src/gameplay/Characters/Blue/CharacterBlue.java +++ b/src/gameplay/Characters/Blue/CharacterBlue.java @@ -9,6 +9,7 @@ import gameplay.input.ButtonIG; import java.util.ArrayList; import static gameplay.Characters.Blue.BlueNormals.*; +import static gameplay.Characters.Blue.BlueSpecials.blueLDP; import static gameplay.input.ButtonIG.*; public class CharacterBlue { @@ -30,7 +31,7 @@ public class CharacterBlue { Jump nJ = new Jump(njcmd,nJumpF); Jump bJ = new Jump(bjcmd,bJumpF); - Attack[] atks = {blueCrouchJab(),blueStandJab(),blueStandHeavyKick()}; + Attack[] atks = {blueLDP(),blueCrouchJab(),blueStandHeavyKick(),blueStandJab()}; /* * Temporary values to change later