This commit is contained in:
Léo 2021-06-23 20:25:10 +02:00
commit e0b0850af5
6 changed files with 189 additions and 103 deletions

View File

@ -1022,7 +1022,7 @@ public class BlueBaseFrames {
String path = "textures/Sprite_sans_grille_9comp.png"; String path = "textures/Sprite_sans_grille_9comp.png";
String pathToBG = "textures/arena1.png"; String pathToBG = "textures/arena1.png";
Frame f = BlueMisc.blueCrouchGuard(); Frame f = BlueNormals.ForwardDFrame0();
ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null); ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null);

View File

@ -17,7 +17,7 @@ import static gameplay.input.ButtonIG.*;
public class BlueNormals { public class BlueNormals {
private static Frame crouchAFrame1(){ protected static Frame crouchAFrame1(){
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -50,7 +50,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame crouchAFrame2(){ protected static Frame crouchAFrame2(){
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -87,7 +87,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame crouchAFrame3(){ protected static Frame crouchAFrame3(){
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -120,7 +120,7 @@ public class BlueNormals {
return f; return f;
} }
private static attackPart blueCrouchAstartup() { protected static attackPart blueCrouchAstartup() {
Frame[] f = new Frame[4]; Frame[] f = new Frame[4];
f[0] = crouchAFrame1(); f[0] = crouchAFrame1();
f[1] = crouchAFrame1(); f[1] = crouchAFrame1();
@ -129,7 +129,7 @@ public class BlueNormals {
return(new attackPart(f)); return(new attackPart(f));
} }
private static attackPart blueCrouchArecovery() { protected static attackPart blueCrouchArecovery() {
Frame[] f = new Frame[5]; Frame[] f = new Frame[5];
f[0] = crouchAFrame3(); f[0] = crouchAFrame3();
f[1] = crouchAFrame3(); f[1] = crouchAFrame3();
@ -139,7 +139,7 @@ public class BlueNormals {
return(new attackPart(f)); return(new attackPart(f));
} }
private static attackPart blueCrouchAactive() { protected static attackPart blueCrouchAactive() {
Frame[] f = new Frame[3]; Frame[] f = new Frame[3];
f[0] = crouchAFrame2(); f[0] = crouchAFrame2();
f[1] = crouchAFrame2(); f[1] = crouchAFrame2();
@ -155,7 +155,7 @@ public class BlueNormals {
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame crouchCFrame1() { protected static Frame crouchCFrame1() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -221,7 +221,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame crouchCFrame3() { protected static Frame crouchCFrame3() {
Passive_HitBox bStandPHB1 = new Passive_HitBox(300,-200,150,500); Passive_HitBox bStandPHB1 = new Passive_HitBox(300,-200,150,500);
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(200,-600,280,100); Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(200,-600,280,100);
Push_HitBox bStandPB1 = new Push_HitBox(270,-170,180,540); Push_HitBox bStandPB1 = new Push_HitBox(270,-170,180,540);
@ -238,7 +238,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame crouchCFrame4() { protected static Frame crouchCFrame4() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -271,7 +271,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame crouchCFrame5() { protected static Frame crouchCFrame5() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -304,7 +304,7 @@ public class BlueNormals {
return f; return f;
} }
private static attackPart blueCrouchCstartup() { protected static attackPart blueCrouchCstartup() {
Frame[] f = new Frame[5]; Frame[] f = new Frame[5];
f[0] = crouchCFrame1(); f[0] = crouchCFrame1();
f[1] = crouchCFrame1(); f[1] = crouchCFrame1();
@ -314,7 +314,7 @@ public class BlueNormals {
return(new attackPart(f)); return(new attackPart(f));
} }
private static attackPart blueCrouchCrecovery() { protected static attackPart blueCrouchCrecovery() {
Frame[] f = new Frame[19]; Frame[] f = new Frame[19];
int i; int i;
for(i = 0; i < 10; i++) { for(i = 0; i < 10; i++) {
@ -326,7 +326,7 @@ public class BlueNormals {
return(new attackPart(f)); return(new attackPart(f));
} }
private static attackPart blueCrouchCactive() { protected static attackPart blueCrouchCactive() {
Frame[] f = new Frame[5]; Frame[] f = new Frame[5];
for(int i = 0; i < f.length; i++) { for(int i = 0; i < f.length; i++) {
f[i] = crouchCFrame3(); f[i] = crouchCFrame3();
@ -341,7 +341,7 @@ public class BlueNormals {
attackPart[] parts = {blueCrouchCstartup(),blueCrouchCactive(),blueCrouchCrecovery()}; attackPart[] parts = {blueCrouchCstartup(),blueCrouchCactive(),blueCrouchCrecovery()};
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame crouchBFrame1() { private static Frame crouchBFrame1() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -369,7 +369,7 @@ public class BlueNormals {
f.setSpriteWrap((138*2),0,138,138); f.setSpriteWrap((138*2),0,138,138);
return f; return f;
} }
private static Frame crouchBFrame2() { private static Frame crouchBFrame2() {
//movement data //movement data
double moveX = 8.0; double moveX = 8.0;
@ -397,7 +397,7 @@ public class BlueNormals {
f.setSpriteWrap((138*4),(138*14),138,138); f.setSpriteWrap((138*4),(138*14),138,138);
return f; return f;
} }
private static Frame crouchBFrame3() { private static Frame crouchBFrame3() {
//movement data //movement data
double moveX = 8.0; double moveX = 8.0;
@ -425,7 +425,7 @@ public class BlueNormals {
f.setSpriteWrap((138*2),0,138,138); f.setSpriteWrap((138*2),0,138,138);
return f; return f;
} }
private static attackPart blueCrouchBstartup() { private static attackPart blueCrouchBstartup() {
Frame[] f = new Frame[3]; Frame[] f = new Frame[3];
f[0] = crouchBFrame1(); f[0] = crouchBFrame1();
@ -459,7 +459,7 @@ public class BlueNormals {
attackPart[] parts = {blueCrouchBstartup(),blueCrouchBactive(),blueCrouchBrecovery()}; attackPart[] parts = {blueCrouchBstartup(),blueCrouchBactive(),blueCrouchBrecovery()};
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame crouchDFrame1() { private static Frame crouchDFrame1() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -487,7 +487,7 @@ public class BlueNormals {
f.setSpriteWrap((138*7),(138*5),138,138); f.setSpriteWrap((138*7),(138*5),138,138);
return f; return f;
} }
private static Frame crouchDFrame2() { private static Frame crouchDFrame2() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -515,7 +515,7 @@ public class BlueNormals {
f.setSpriteWrap((138*7),(138*6),138,138); f.setSpriteWrap((138*7),(138*6),138,138);
return f; return f;
} }
private static Frame crouchDFrame3() { private static Frame crouchDFrame3() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -543,7 +543,7 @@ public class BlueNormals {
f.setSpriteWrap((138*7),(138*7),138,138); f.setSpriteWrap((138*7),(138*7),138,138);
return f; return f;
} }
private static Frame crouchDFrame4() { private static Frame crouchDFrame4() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -571,7 +571,7 @@ public class BlueNormals {
f.setSpriteWrap((138*7),(138*8),138,138); f.setSpriteWrap((138*7),(138*8),138,138);
return f; return f;
} }
private static attackPart blueCrouchDstartup() { private static attackPart blueCrouchDstartup() {
Frame[] f = new Frame[4]; Frame[] f = new Frame[4];
f[0] = crouchDFrame1(); f[0] = crouchDFrame1();
@ -599,7 +599,7 @@ public class BlueNormals {
} }
return(new attackPart(120,0,31,10,30,15,f,true,false,true)); return(new attackPart(120,0,31,10,30,15,f,true,false,true));
} }
protected static Attack blueCrouchRoundHouse() { protected static Attack blueCrouchRoundHouse() {
ButtonIG[][] cmd = {{DOWN,D}}; ButtonIG[][] cmd = {{DOWN,D}};
boolean isSpecial = false; boolean isSpecial = false;
@ -607,8 +607,8 @@ public class BlueNormals {
attackPart[] parts = {blueCrouchDstartup(),blueCrouchDactive(),blueCrouchDrecovery()}; attackPart[] parts = {blueCrouchDstartup(),blueCrouchDactive(),blueCrouchDrecovery()};
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame standAFrame1(){ protected static Frame standAFrame1(){
/* /*
Hitboxes lists creation Hitboxes lists creation
@ -647,7 +647,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame standAFrame2(){ protected static Frame standAFrame2(){
/* /*
Hitboxes lists creation Hitboxes lists creation
@ -688,7 +688,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame standAFrame3(){ protected static Frame standAFrame3(){
Passive_HitBox bStandPHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f); Passive_HitBox bStandPHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,75*1.25f,150*1.25f); Passive_HitBox bStandPHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,75*1.25f,150*1.25f);
@ -709,7 +709,7 @@ public class BlueNormals {
return blueStandframe1; return blueStandframe1;
} }
private static attackPart blueStandAstartup() { protected static attackPart blueStandAstartup() {
Frame[] f = new Frame[3]; Frame[] f = new Frame[3];
f[0] = standAFrame1(); f[0] = standAFrame1();
f[1] = standAFrame1(); f[1] = standAFrame1();
@ -717,7 +717,7 @@ public class BlueNormals {
return(new attackPart(f)); return(new attackPart(f));
} }
private static attackPart blueStandArecovery() { protected static attackPart blueStandArecovery() {
Frame[] f = new Frame[5]; Frame[] f = new Frame[5];
f[0] = standAFrame3(); f[0] = standAFrame3();
f[1] = standAFrame3(); f[1] = standAFrame3();
@ -727,7 +727,7 @@ public class BlueNormals {
return(new attackPart(f)); return(new attackPart(f));
} }
private static attackPart blueStandAactive() { protected static attackPart blueStandAactive() {
Frame[] f = new Frame[3]; Frame[] f = new Frame[3];
f[0] = standAFrame2(); f[0] = standAFrame2();
f[1] = standAFrame2(); f[1] = standAFrame2();
@ -742,7 +742,7 @@ public class BlueNormals {
attackPart[] parts = {blueStandAstartup(),blueStandAactive(),blueStandArecovery()}; attackPart[] parts = {blueStandAstartup(),blueStandAactive(),blueStandArecovery()};
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame StandCFrame1() { private static Frame StandCFrame1() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -770,7 +770,7 @@ public class BlueNormals {
f.setSpriteWrap(0,0,138,138); f.setSpriteWrap(0,0,138,138);
return f; return f;
} }
private static Frame StandCFrame2() { private static Frame StandCFrame2() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -798,7 +798,7 @@ public class BlueNormals {
f.setSpriteWrap((138*3),(138*2),138,138); f.setSpriteWrap((138*3),(138*2),138,138);
return f; return f;
} }
private static Frame StandCFrame3() { private static Frame StandCFrame3() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -826,7 +826,7 @@ public class BlueNormals {
f.setSpriteWrap(138,(138*6),138,138); f.setSpriteWrap(138,(138*6),138,138);
return f; return f;
} }
private static Frame StandCFrame4() { private static Frame StandCFrame4() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -854,7 +854,7 @@ public class BlueNormals {
f.setSpriteWrap(138,(138*7),138,138); f.setSpriteWrap(138,(138*7),138,138);
return f; return f;
} }
private static attackPart blueStandCstartup() { private static attackPart blueStandCstartup() {
Frame[] f = new Frame[6]; Frame[] f = new Frame[6];
for(int i = 0; i < 3; i++) { for(int i = 0; i < 3; i++) {
@ -890,7 +890,7 @@ public class BlueNormals {
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame standDFrame1(){ protected static Frame standDFrame1(){
/* /*
Hitboxes lists creation Hitboxes lists creation
@ -903,16 +903,23 @@ public class BlueNormals {
/* /*
Individual hitboxes creation Individual hitboxes creation
*/ */
Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); Passive_HitBox pHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); Passive_HitBox pHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
Push_HitBox pushB = new Push_HitBox(70,70,150,500); Passive_HitBox pHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
Passive_HitBox pHB4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
Push_HitBox pushB = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
/* /*
adding hitboxes to lists adding hitboxes to lists
*/ */
phb.add(phb1); phb.add(pHB1);
phb.add(pHB4);
phb.add(pHB3);
phb.add(pHB2);
pthb.add(pthb1); pthb.add(pthb1);
/* /*
frame creation frame creation
*/ */
@ -923,7 +930,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame standDFrame2(){ protected static Frame standDFrame2(){
/* /*
Hitboxes lists creation Hitboxes lists creation
@ -933,19 +940,26 @@ public class BlueNormals {
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>(); ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>(); ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
/* Passive_HitBox pHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
Individual hitboxes creation Passive_HitBox pHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
*/ Passive_HitBox pHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); Passive_HitBox pHB4 = new Passive_HitBox(250*1.25f,-130*1.25f,50*1.25f,70*1.25f);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); Passive_HitBox pHB5 = new Passive_HitBox(350*1.25f,-230*1.25f,50*1.25f,70*1.25f);
Push_HitBox pushB = new Push_HitBox(70,70,150,500); Passive_HitBox pHB6 = new Passive_HitBox(400*1.25f,-180*1.25f,50*1.25f,70*1.25f);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
Push_HitBox pushB = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
/* /*
adding hitboxes to lists adding hitboxes to lists
*/ */
phb.add(phb1); phb.add(pHB1);
phb.add(pHB4);
phb.add(pHB3);
phb.add(pHB2);
phb.add(pHB5);
phb.add(pHB6);
pthb.add(pthb1); pthb.add(pthb1);
/* /*
frame creation frame creation
*/ */
@ -956,7 +970,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame standDFrame3(){ protected static Frame standDFrame3(){
/* /*
Hitboxes lists creation Hitboxes lists creation
@ -969,15 +983,28 @@ public class BlueNormals {
/* /*
Individual hitboxes creation Individual hitboxes creation
*/ */
Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); Passive_HitBox phb1 = new Passive_HitBox(300,-150,150,550);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); Passive_HitBox phb2 = new Passive_HitBox(150,-180,250,350);
Push_HitBox pushB = new Push_HitBox(70,70,150,500); Passive_HitBox phb3 = new Passive_HitBox(450,-250,150,70);
Passive_HitBox phb5 = new Passive_HitBox(450,-320,40,70);
Passive_HitBox phb4 = new Passive_HitBox(550,-180,100,100);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(250,-600,250,100);
Push_HitBox pushB = new Push_HitBox(300,-200,150,500);
Active_HitBox ahb1 = new Active_HitBox(500,-110,220,220);
Active_HitBox ahb2 = new Active_HitBox(400,-300,120,120);
/* /*
adding hitboxes to lists adding hitboxes to lists
*/ */
phb.add(phb1); phb.add(phb1);
phb.add(phb3);
phb.add(phb2);
phb.add(phb5);
phb.add(phb4);
pthb.add(pthb1); pthb.add(pthb1);
ahb.add(ahb1);
ahb.add(ahb2);
/* /*
frame creation frame creation
@ -989,7 +1016,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame standDFrame4(){ protected static Frame standDFrame4(){
/* /*
Hitboxes lists creation Hitboxes lists creation
@ -999,19 +1026,26 @@ public class BlueNormals {
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>(); ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>(); ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
/* Passive_HitBox pHB1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
Individual hitboxes creation Passive_HitBox pHB2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
*/ Passive_HitBox pHB3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); Passive_HitBox pHB4 = new Passive_HitBox(250*1.25f,-130*1.25f,50*1.25f,70*1.25f);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); Passive_HitBox pHB5 = new Passive_HitBox(350*1.25f,-230*1.25f,50*1.25f,70*1.25f);
Push_HitBox pushB = new Push_HitBox(70,70,150,500); Passive_HitBox pHB6 = new Passive_HitBox(400*1.25f,-180*1.25f,50*1.25f,70*1.25f);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
Push_HitBox pushB = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
/* /*
adding hitboxes to lists adding hitboxes to lists
*/ */
phb.add(phb1); phb.add(pHB1);
phb.add(pHB4);
phb.add(pHB3);
phb.add(pHB2);
phb.add(pHB5);
phb.add(pHB6);
pthb.add(pthb1); pthb.add(pthb1);
/* /*
frame creation frame creation
*/ */
@ -1021,7 +1055,7 @@ public class BlueNormals {
f.setSpriteWrap((138*10),138,138,138); f.setSpriteWrap((138*10),138,138,138);
return f; return f;
} }
private static Frame standDFrame5(){ private static Frame standDFrame5(){
/* /*
@ -1055,7 +1089,7 @@ public class BlueNormals {
return f; return f;
} }
private static attackPart blueStandDstartup() { protected static attackPart blueStandDstartup() {
Frame[] f = new Frame[8]; Frame[] f = new Frame[8];
for(int i = 0; i < 5; i++) { for(int i = 0; i < 5; i++) {
f[i] = standDFrame1(); f[i] = standDFrame1();
@ -1066,7 +1100,7 @@ public class BlueNormals {
return(new attackPart(f)); return(new attackPart(f));
} }
private static attackPart blueStandDactive() { protected static attackPart blueStandDactive() {
Frame[] f = new Frame[5]; Frame[] f = new Frame[5];
for(int i = 0; i < f.length; i++) { for(int i = 0; i < f.length; i++) {
f[i] = standDFrame3(); f[i] = standDFrame3();
@ -1074,7 +1108,7 @@ public class BlueNormals {
return(new attackPart(100,0,20,18,16,14,f,false,false,false)); return(new attackPart(100,0,20,18,16,14,f,false,false,false));
} }
private static attackPart blueStandDrecovery() { protected static attackPart blueStandDrecovery() {
Frame[] f = new Frame[18]; Frame[] f = new Frame[18];
for(int i = 0; i < 10; i++) { for(int i = 0; i < 10; i++) {
f[i] = standDFrame4(); f[i] = standDFrame4();
@ -1092,7 +1126,7 @@ public class BlueNormals {
attackPart[] parts = {blueStandDstartup(),blueStandDactive(),blueStandDrecovery()}; attackPart[] parts = {blueStandDstartup(),blueStandDactive(),blueStandDrecovery()};
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame StandBFrame1() { private static Frame StandBFrame1() {
//movement data //movement data
double moveX = 3.0; double moveX = 3.0;
@ -1120,7 +1154,7 @@ public class BlueNormals {
f.setSpriteWrap((138*5),(138*5),138,138); f.setSpriteWrap((138*5),(138*5),138,138);
return f; return f;
} }
private static Frame StandBFrame2() { private static Frame StandBFrame2() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1148,7 +1182,7 @@ public class BlueNormals {
f.setSpriteWrap((138*6),(138*5),138,138); f.setSpriteWrap((138*6),(138*5),138,138);
return f; return f;
} }
private static Frame StandBFrame3() { private static Frame StandBFrame3() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1176,7 +1210,7 @@ public class BlueNormals {
f.setSpriteWrap((138*7),(138*5),138,138); f.setSpriteWrap((138*7),(138*5),138,138);
return f; return f;
} }
private static attackPart blueStandBstartup() { private static attackPart blueStandBstartup() {
Frame[] f = new Frame[6]; Frame[] f = new Frame[6];
for(int i = 0; i < 6; i++) { for(int i = 0; i < 6; i++) {
@ -1200,7 +1234,7 @@ public class BlueNormals {
} }
return(new attackPart(f)); return(new attackPart(f));
} }
protected static Attack blueStandShort() { protected static Attack blueStandShort() {
ButtonIG[][] cmd = {{B}}; ButtonIG[][] cmd = {{B}};
boolean isSpecial = false; boolean isSpecial = false;
@ -1208,9 +1242,9 @@ public class BlueNormals {
attackPart[] parts = {blueStandBstartup(),blueStandBactive(),blueStandBrecovery()}; attackPart[] parts = {blueStandBstartup(),blueStandBactive(),blueStandBrecovery()};
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame ForwardDFrame0() { private static Frame ForwardDFrame0() {
//movement data //movement data
double moveX = 3.0; double moveX = 3.0;
@ -1238,7 +1272,7 @@ public class BlueNormals {
f.setSpriteWrap((138*5),(138*4),138,138); f.setSpriteWrap((138*5),(138*4),138,138);
return f; return f;
} }
private static Frame ForwardDFrame1(){ protected static Frame ForwardDFrame1(){
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -1266,7 +1300,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame ForwardDFrame2(){ protected static Frame ForwardDFrame2(){
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -1294,7 +1328,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame ForwardDFrame3(){ protected static Frame ForwardDFrame3(){
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -1322,7 +1356,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame ForwardDFrame4(){ protected static Frame ForwardDFrame4(){
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -1350,7 +1384,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame ForwardDFrame5(){ protected static Frame ForwardDFrame5(){
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -1378,7 +1412,7 @@ public class BlueNormals {
return f; return f;
} }
private static attackPart blueForwardDstartup() { protected static attackPart blueForwardDstartup() {
Frame[] f = new Frame[18]; Frame[] f = new Frame[18];
for (int i = 0; i < 3 ; i++) { for (int i = 0; i < 3 ; i++) {
f[i] = ForwardDFrame0(); f[i] = ForwardDFrame0();
@ -1392,7 +1426,7 @@ public class BlueNormals {
return (new attackPart(f)); return (new attackPart(f));
} }
private static attackPart blueForwardDrecovery() { protected static attackPart blueForwardDrecovery() {
Frame[] f = new Frame[8]; Frame[] f = new Frame[8];
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
f[i] = ForwardDFrame4(); f[i] = ForwardDFrame4();
@ -1403,7 +1437,7 @@ public class BlueNormals {
return (new attackPart(f)); return (new attackPart(f));
} }
private static attackPart blueForwardDactive() { protected static attackPart blueForwardDactive() {
Frame[] f = new Frame[4]; Frame[] f = new Frame[4];
for (int i = 0; i < f.length; i++) { for (int i = 0; i < f.length; i++) {
f[i] = ForwardDFrame3(); f[i] = ForwardDFrame3();
@ -1411,7 +1445,7 @@ public class BlueNormals {
return(new attackPart(30,0,5,5,0,0,f,false,true,false)); return(new attackPart(30,0,5,5,0,0,f,false,true,false));
} }
private static attackPart blueForwardDactive2() { protected static attackPart blueForwardDactive2() {
Frame[] f = new Frame[3]; Frame[] f = new Frame[3];
for (int i = 0; i < f.length; i++) { for (int i = 0; i < f.length; i++) {
f[i] = ForwardDFrame4(); f[i] = ForwardDFrame4();
@ -1426,7 +1460,7 @@ public class BlueNormals {
attackPart[] parts = {blueForwardDstartup(),blueForwardDactive(),blueForwardDactive2(),blueForwardDrecovery()}; attackPart[] parts = {blueForwardDstartup(),blueForwardDactive(),blueForwardDactive2(),blueForwardDrecovery()};
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame JumpAFrame1() { private static Frame JumpAFrame1() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1454,7 +1488,7 @@ public class BlueNormals {
f.setSpriteWrap((138*12),(138*3),138,138); f.setSpriteWrap((138*12),(138*3),138,138);
return f; return f;
} }
private static Frame JumpAFrame2() { private static Frame JumpAFrame2() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1482,7 +1516,7 @@ public class BlueNormals {
f.setSpriteWrap((138*13),(138*3),138,138); f.setSpriteWrap((138*13),(138*3),138,138);
return f; return f;
} }
private static Frame JumpAFrame3() { private static Frame JumpAFrame3() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1510,7 +1544,7 @@ public class BlueNormals {
f.setSpriteWrap((138*14),(138*3),138,138); f.setSpriteWrap((138*14),(138*3),138,138);
return f; return f;
} }
private static attackPart blueJumpAstartup() { private static attackPart blueJumpAstartup() {
Frame[] f = new Frame[3]; Frame[] f = new Frame[3];
for(int i = 0; i < 3; i++) { for(int i = 0; i < 3; i++) {
@ -1534,7 +1568,7 @@ public class BlueNormals {
} }
return(new attackPart(f)); return(new attackPart(f));
} }
protected static Attack blueJumpJab() { protected static Attack blueJumpJab() {
ButtonIG[][] cmd = {{A}}; ButtonIG[][] cmd = {{A}};
boolean isSpecial = false; boolean isSpecial = false;
@ -1542,7 +1576,7 @@ public class BlueNormals {
attackPart[] parts = {blueJumpAstartup(),blueJumpAactive(),blueJumpArecovery()}; attackPart[] parts = {blueJumpAstartup(),blueJumpAactive(),blueJumpArecovery()};
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame JumpCFrame1() { private static Frame JumpCFrame1() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1570,7 +1604,7 @@ public class BlueNormals {
f.setSpriteWrap((138*12),(138*3),138,138); f.setSpriteWrap((138*12),(138*3),138,138);
return f; return f;
} }
private static Frame JumpCFrame2() { private static Frame JumpCFrame2() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1598,7 +1632,7 @@ public class BlueNormals {
f.setSpriteWrap((138*13),(138*3),138,138); f.setSpriteWrap((138*13),(138*3),138,138);
return f; return f;
} }
private static Frame JumpCFrame3() { private static Frame JumpCFrame3() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1626,7 +1660,7 @@ public class BlueNormals {
f.setSpriteWrap((138*14),(138*3),138,138); f.setSpriteWrap((138*14),(138*3),138,138);
return f; return f;
} }
private static attackPart blueJumpCstartup() { private static attackPart blueJumpCstartup() {
Frame[] f = new Frame[4]; Frame[] f = new Frame[4];
for(int i = 0; i < f.length; i++) { for(int i = 0; i < f.length; i++) {
@ -1650,7 +1684,7 @@ public class BlueNormals {
} }
return(new attackPart(f)); return(new attackPart(f));
} }
protected static Attack blueJumpFierce() { protected static Attack blueJumpFierce() {
ButtonIG[][] cmd = {{C}}; ButtonIG[][] cmd = {{C}};
boolean isSpecial = false; boolean isSpecial = false;
@ -1658,7 +1692,7 @@ public class BlueNormals {
attackPart[] parts = {blueJumpCstartup(),blueJumpCactive(),blueJumpCrecovery()}; attackPart[] parts = {blueJumpCstartup(),blueJumpCactive(),blueJumpCrecovery()};
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame JumpBFrame1() { private static Frame JumpBFrame1() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1686,7 +1720,7 @@ public class BlueNormals {
f.setSpriteWrap((138*14),138,138,138); f.setSpriteWrap((138*14),138,138,138);
return f; return f;
} }
private static Frame JumpBFrame2() { private static Frame JumpBFrame2() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1714,7 +1748,7 @@ public class BlueNormals {
f.setSpriteWrap((138*13),138,138,138); f.setSpriteWrap((138*13),138,138,138);
return f; return f;
} }
private static Frame JumpBFrame3() { private static Frame JumpBFrame3() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1742,7 +1776,7 @@ public class BlueNormals {
f.setSpriteWrap((138*14),138,138,138); f.setSpriteWrap((138*14),138,138,138);
return f; return f;
} }
private static attackPart blueJumpBstartup() { private static attackPart blueJumpBstartup() {
Frame[] f = new Frame[3]; Frame[] f = new Frame[3];
for(int i = 0; i < f.length; i++) { for(int i = 0; i < f.length; i++) {
@ -1766,7 +1800,7 @@ public class BlueNormals {
} }
return(new attackPart(f)); return(new attackPart(f));
} }
protected static Attack blueJumpShort() { protected static Attack blueJumpShort() {
ButtonIG[][] cmd = {{B}}; ButtonIG[][] cmd = {{B}};
boolean isSpecial = false; boolean isSpecial = false;
@ -1802,7 +1836,7 @@ public class BlueNormals {
f.setSpriteWrap((138*11),(138*6),138,138); f.setSpriteWrap((138*11),(138*6),138,138);
return f; return f;
} }
private static Frame JumpDFrame2() { private static Frame JumpDFrame2() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1830,7 +1864,7 @@ public class BlueNormals {
f.setSpriteWrap((138*10),(138*6),138,138); f.setSpriteWrap((138*10),(138*6),138,138);
return f; return f;
} }
private static Frame JumpDFrame3() { private static Frame JumpDFrame3() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
@ -1858,7 +1892,7 @@ public class BlueNormals {
f.setSpriteWrap((138*11),(138*6),138,138); f.setSpriteWrap((138*11),(138*6),138,138);
return f; return f;
} }
private static attackPart blueJumpDstartup() { private static attackPart blueJumpDstartup() {
Frame[] f = new Frame[4]; Frame[] f = new Frame[4];
for(int i = 0; i < f.length; i++) { for(int i = 0; i < f.length; i++) {
@ -1882,7 +1916,7 @@ public class BlueNormals {
} }
return(new attackPart(f)); return(new attackPart(f));
} }
protected static Attack blueJumpRoundHouse() { protected static Attack blueJumpRoundHouse() {
ButtonIG[][] cmd = {{D}}; ButtonIG[][] cmd = {{D}};
boolean isSpecial = false; boolean isSpecial = false;

View File

@ -138,6 +138,10 @@ public class attackPart {
this.knockbackOnHit = aP.getKnockbackOnHit(); this.knockbackOnHit = aP.getKnockbackOnHit();
this.knockbackOnBlock = aP.getKnockbackOnBlock(); this.knockbackOnBlock = aP.getKnockbackOnBlock();
this.damage = aP.getDamage(); this.damage = aP.getDamage();
this.isLow = aP.isLow();
this.isOverHead = aP.isOverHead();
this.knocksDown = aP.knocksDown();
if(this.frames.length >= 1) {this.frames[this.frames.length -1].setLastFrameOfHit(true);}
} }
public boolean isHasHit() { public boolean isHasHit() {

View File

@ -225,4 +225,22 @@ public class Frame {
public int[] getSprite() { public int[] getSprite() {
return sprite; return sprite;
} }
/**
* This becomes a clone of a given frame, except for the movement data.
* Usueful for jump attack
* @param f the frame to clone
*/
public void cloneWithoutMovement(Frame f) {
this.cloneArray(f); //Il faut cloner individuellement chaque hitbox des differentes listes pour ne pas garder les pointeurs
Push_HitBox phb = f.getPushHitBox();
this.setPushHitBox(new Push_HitBox(phb.getPosX(), phb.getPosY(), phb.getSize_x(), phb.getSize_y()));
this.normalCancellable = f.isNormalCancellable();
this.specialCancellable = f.isSpecialCancellable();
this.jumpCancellable = f.jumpCancellable;
this.moveCancellable = f.isMoveCancellable();
this.isDashCancellable = f.isDashCancellable;
this.lastFrameOfHit = f.islastFrameOfHit();
this.setSpriteWrap(f.sprite[0], f.sprite[1], f.sprite[2], f.sprite[3]);
}
} }

View File

@ -1,5 +1,7 @@
package gameplay.frames; package gameplay.frames;
import java.util.ArrayList;
/** /**
* This will handle the next frames to be played by each entity. * This will handle the next frames to be played by each entity.
* @author Victor Azra * @author Victor Azra
@ -76,4 +78,25 @@ public class nextFrameBuffer {
} }
} }
/**
* Copies the same amount of frames from f in this, as the amount originally present, but keepsoriginal move data
* @param f frames array to copy
*/
public void changeFramesExceptForMove(ArrayList<Frame> f) {
int i = 0;
boolean goOn = true;
nextFrameBuffer fb = new nextFrameBuffer();
fb.clone(this);
this.emptyQueue();
try{fb.goToNext();} catch(IndexOutOfBoundsException e) {goOn = false;}
while(goOn && i < f.size()) {
try{
fb.current.cloneWithoutMovement(f.get(i));
this.addFrameToQueue(fb.current);
fb.goToNext();
i++;
} catch(IndexOutOfBoundsException e) { goOn = false;}
}
}
} }

View File

@ -18,6 +18,7 @@ import gameplay.actions.Throw;
import gameplay.actions.ThrowPart; import gameplay.actions.ThrowPart;
import gameplay.entities.Status; import gameplay.entities.Status;
import gameplay.frames.Frame; import gameplay.frames.Frame;
import gameplay.frames.nextFrameBuffer;
import gameplay.hitboxes.*; import gameplay.hitboxes.*;
import gameplay.input.InputBuffer; import gameplay.input.InputBuffer;
import gameplay.entities.Character; import gameplay.entities.Character;
@ -525,6 +526,12 @@ public class match {
&& ((atk.isSpecial() && c.getCurrentframe().isSpecialCancellable()) && ((atk.isSpecial() && c.getCurrentframe().isSpecialCancellable())
|| (!atk.isSpecial() && c.getCurrentframe().isNormalCancellable())); || (!atk.isSpecial() && c.getCurrentframe().isNormalCancellable()));
if(attackIsPossible) { if(attackIsPossible) {
if(c.getStatus() == Status.JUMPING) {
nextFrameBuffer nJumpFb = new nextFrameBuffer();
nJumpFb.clone(c.getFrames());
nJumpFb.changeFramesExceptForMove(atk.getFrame());
c.setFrames(nJumpFb);
}
c.clearNextFrames(); c.clearNextFrames();
c.addNextFramesList(atk.getFrame()); c.addNextFramesList(atk.getFrame());
c.setAttackPartsArray(atk.getParts()); c.setAttackPartsArray(atk.getParts());