Merge remote-tracking branch 'origin/master'

This commit is contained in:
Antoine 2021-06-24 15:00:20 +02:00
commit a5d142332f
4 changed files with 210 additions and 188 deletions

View File

@ -1242,13 +1242,13 @@ public class BlueNormals {
return new Attack(isSpecial,rS,cmd,parts);
}
private static Frame StandBFrame1() {
protected static Frame StandBFrame1() {
//movement data
double moveX = 3.0;
double moveY = 0.0;
//cancelData
boolean normalC = true;
boolean normalC = false;
boolean specialC = false;
boolean jumpC = false;
boolean moveC = false;
@ -1260,8 +1260,24 @@ public class BlueNormals {
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
//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);
/*
Individual hitboxes creation
*/
Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
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 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 bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
/*
adding hitboxes to lists
*/
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
pthb.add(pthb1);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
@ -1270,13 +1286,13 @@ public class BlueNormals {
return f;
}
private static Frame StandBFrame2() {
protected static Frame StandBFrame2() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
//cancelData
boolean normalC = true;
boolean normalC = false;
boolean specialC = false;
boolean jumpC = false;
boolean moveC = false;
@ -1289,7 +1305,25 @@ public class BlueNormals {
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
//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);
/*
Individual hitboxes creation
*/
Passive_HitBox phb1 = new Passive_HitBox(130*1.25f,-200*1.25f,150*1.25f,150*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(150*1.25f,-300*1.25f,100*1.25f,150*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(160*1.25f,-400*1.25f,150*1.25f,150*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(220*1.25f,-150*1.25f,50*1.25f,50*1.25f);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(120*1.25f,-500*1.25f,220*1.25f,70*1.25f);
Push_HitBox bStandPB1 = new Push_HitBox(160*1.25f,-150*1.25f,160*1.25f,400*1.25f);
Active_HitBox ahb1= new Active_HitBox(350,-350,150,220);
/*
adding hitboxes to lists
*/
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
pthb.add(pthb1);
ahb.add(ahb1);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
@ -1298,13 +1332,13 @@ public class BlueNormals {
return f;
}
private static Frame StandBFrame3() {
protected static Frame StandBFrame3() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
//cancelData
boolean normalC = true;
boolean normalC = false;
boolean specialC = false;
boolean jumpC = false;
boolean moveC = false;
@ -1316,8 +1350,24 @@ public class BlueNormals {
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
//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);
/*
Individual hitboxes creation
*/
Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
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 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 bStandPB1 = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
/*
adding hitboxes to lists
*/
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
pthb.add(pthb1);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);

View File

@ -16,7 +16,51 @@ import java.util.ArrayList;
import static gameplay.input.ButtonIG.*;
public class BlueSpecials {
private static Frame lDPFrame1(){
protected static Frame lDPFrame1(){
/*
Hitboxes lists creation
*/
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
//generate hitboxes here and then use ArrayList add method to add them to the correct list
Push_HitBox pB = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f);
/*
frame creation
*/
Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(0,138*5,138,138);
return f;
}
protected static Frame lDPFrame2(){
/*
Hitboxes lists creation
*/
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
//generate hitboxes here and then use ArrayList add method to add them to the correct list
Push_HitBox pB = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f);
/*
frame creation
*/
Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(138*7,138*2,138,138);
return f;
}
protected static Frame lDPFrame3(){
/*
Hitboxes lists creation
@ -29,9 +73,101 @@ public class BlueSpecials {
/*
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);
Push_HitBox pushB = new Push_HitBox(250,-70,150,500);
Active_HitBox ahb1 = new Active_HitBox(350,-0,150,500);
ahb.add(ahb1);
/*
frame creation
*/
Frame f = new Frame(25.0,12.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(138*2,138*5,138,138);
return f;
}
protected static Frame lDPFrame4(){
/*
Hitboxes lists creation
*/
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
/*
Individual hitboxes creation
*/
Push_HitBox pushB = new Push_HitBox(250,-70,150,500);
Active_HitBox ahb1 = new Active_HitBox(350,-0,150,500);
Passive_HitBox phb1 = new Passive_HitBox(250,-70,150,500);
ahb.add(ahb1);
/*
adding hitboxes to lists
*/
phb.add(phb1);
/*
frame creation
*/
Frame f = new Frame(25.0,0.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(138*2,138*5,138,138);
return f;
}
protected static Frame lDPFrame5(){
/*
Hitboxes lists creation
*/
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
/*
Individual hitboxes creation
*/
Push_HitBox pushB = new Push_HitBox(250,-70,150,500);
Passive_HitBox phb1 = new Passive_HitBox(250,-70,250,550);
/*
adding hitboxes to lists
*/
phb.add(phb1);
/*
frame creation
*/
Frame f = new Frame(-25.0,0.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(138*3,138*5,138,138);
return f;
}
protected static Frame lDPFrame6(){
/*
Hitboxes lists creation
*/
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
/*
Individual hitboxes creation
*/
Passive_HitBox phb1 = new Passive_HitBox(270,-70,200,500);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(270,-600,250,100);
Push_HitBox pushB = new Push_HitBox(270,-70,150,550);
/*
adding hitboxes to lists
@ -45,182 +181,19 @@ public class BlueSpecials {
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<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
/*
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<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
/*
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(8.0,5.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);
f.setSpriteWrap(138*4,138*5,138,138);
return f;
}
private static Frame lDPFrame4(){
/*
Hitboxes lists creation
*/
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
/*
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(8.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<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
/*
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(-8.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<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
/*
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() {
protected static attackPart lDPStartup() {
Frame[] f = new Frame[3];
f[0] = lDPFrame1();
f[1] = lDPFrame2();
f[2] = lDPFrame3();
f[2] = lDPFrame2();
return(new attackPart(f));
}
private static attackPart lDPRecovery() {
protected static attackPart lDPRecovery() {
Frame[] f = new Frame[29];
for(int i = 0; i < 11; i++) {
f[i] = lDPFrame5();
@ -231,7 +204,7 @@ public class BlueSpecials {
return(new attackPart(f));
}
private static attackPart lDPActive() {
protected static attackPart lDPActive() {
Frame[] f = new Frame[11];
for(int i = 0; i < 5; i++) {
f[i] = lDPFrame3();

View File

@ -134,10 +134,10 @@ public class Launcher extends Application {
b1.setItems(availablechar);
b2.setItems(availablechar);
// Setting default ChoiceBoxes values to the ones already in the config file
if(setter.getChar1().equals("blue")) {
if(setter.getChar1().equals("blue") || setter.getChar1().equals("default")) {
b1.setValue("Blue");
}
if(setter.getChar2().equals("blue")) {
if(setter.getChar2().equals("blue") || setter.getChar2().equals("default")) {
b2.setValue("Blue");
}
@ -168,9 +168,9 @@ public class Launcher extends Application {
setter.setSettings();
match.main(null);
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
System.out.println("Fill all boxes to launch the game");
}
}
/**

View File

@ -94,7 +94,6 @@ public class Settings {
e.printStackTrace();
System.exit(1);
} catch (ParseException e) {
System.out.println("Invalid config file");
rounds = 3;
p1 = "default";
p2 = "default";