Welcome to Gaia! ::

Reply Statistical Division ( Temporarily closed )
Mech Records and Battle System

Quick Reply

Enter both words below, separated by a space:

Can't read the text? Click here

Submit

cmainer1001

PostPosted: Sun Oct 23, 2005 9:41 pm
This is a sticky created for those that are interested in our Mech Battle System, which is more or less based off of a famous series of videogames in Japan, Super Robot Wars by Banpresto. We apply stats to every unit in this RP with stats based off of the game, scaled to proportion by our judgement, and programmed our own program with each character and units in this RP on Java for us to use to accurately calculate the accuracy and the damage dealt onto an opponent from an attack.

As of now, this program is still in it's beta stages, and we are working on perfecting this program, to a point where most people can use without too much problems. Feel free to use our program, however, not to be used for credit. ( As in you cannot call this program to be your work. Not the currency credit we use in this RP. )

If you are new to this RP and wish to create stats for your character, or would like to update your character / units, please ask in the Discussions Thread in the guild. The people familiar with the standards of these formulas will help you create stats for your character / unit, appropriate for use in this RP.
 
PostPosted: Sun Oct 23, 2005 9:42 pm
//The Main Program of the Battle System.

import javax.swing.*;

public class BattleSystemAPP
{
public static void main(String args[])
{
String spiritA;
String spiritB;
int moraleA;
int moraleB;
String x="";
String y="";
int z;
double tBonusA;
double tBonusB;
double x1;
double y1;
int rand;
double damage=0;
String weapon;
int power;
String type;
String weaponC;
double weaponE;
double sizeBonus=0;
int sizeD;
double sBonus;
int attackSkill=0;
String terrain;
double tBonus;
String wCrit;
int cBonus;
int critical;
int x2=0;
int y2=0;
Object command;
Object terrainArray[]={"Sky", "Land", "Water", "Space"};
Object commandArray[]={"Attack", "Defend", "Evade"};

//Selects two characters participating in the battle.
CharacterClass characterA = new CharacterClass();
CharacterClass characterB = new CharacterClass();

//Character Morale Modifier. Enter between 50 - 150
spiritA=JOptionPane.showInputDialog(characterA.getPilot()+"'s Morale?");
moraleA=Integer.parseInt(spiritA);
spiritB=JOptionPane.showInputDialog(characterB.getPilot()+"'s Morale?");
moraleB=Integer.parseInt(spiritB);

/*For either of those characters that have the special ability, Foresight,
with Morale of 130 or above gets a Accuracy and Evade bonus of 10.*/
if(characterA.getForesight()==true){
if(moraleA>=130) x2=10;
}

if(characterB.getForesight()==true){
if(moraleB>=130) y2=10;
}

//Selects the two mechs the pilots will be pilotting in the battle.
MechClass mechA = new MechClass();
MechClass mechB = new MechClass();

//Displays the two mechs' attacks and Weapon Info.
System.out.println("Mech: "+mechA.getMech()+
"n Attack Name razz ower,Range, Ammo, Accuracy, Critical,Cmptblty,Requirementsn"+
mechA.getAttacks()+
"nnMech: "+mechB.getMech()+
"n Attack Name razz ower,Range, Ammo, Accuracy, Critical,Cmptblty,Requirementsn"+
mechB.getAttacks()+"n");

//Terrain Modifier.
Object terrainA=JOptionPane.showInputDialog(null, ""+characterA.getPilot()+
" Terrain: Sky, Land, Water, Space?", "Enter Terrain", JOptionPane.INFORMATION_MESSAGE,
null, terrainArray, terrainArray[3]);
Object terrainB=JOptionPane.showInputDialog(null, ""+characterB.getPilot()+
" Terrain: Sky, Land, Water, Space?", "Enter Terrain", JOptionPane.INFORMATION_MESSAGE,
null, terrainArray, terrainArray[3]);

/*Player A Environment Compatibility. Determines how much environment
bonus Player A will get.*/
if(terrainA.equals("Sky")){
x=characterA.getSky();
y=mechA.getSky();
}

else if(terrainA.equals("Land")){
x=characterA.getLand();
y=mechA.getLand();
}

else if(terrainA.equals("Water")){
x=characterA.getWater();
y=mechA.getLand();
}

else if(terrainA.equals("Space")){
x=characterA.getSpace();
y=mechA.getSpace();
}

z=getNumber(x, y);

if(z>6) tBonusA=1.1;
else if(z==6) tBonusA=1;
else if(z>3) tBonusA=0.9;
else if(z>1) tBonusA=0.8;
else tBonusA=0.4;

/*Player B Environment Compatibility. Determines how much environment
bonus Player B will get.*/
if(terrainA.equals("Sky")){
x=characterB.getSky();
y=mechB.getSky();
}

else if(terrainB.equals("Land")){
x=characterB.getLand();
y=mechB.getLand();
}

else if(terrainB.equals("Water")){
x=characterB.getWater();
y=mechB.getLand();
}

else if(terrainB.equals("Space")){
x=characterB.getSpace();
y=mechB.getSpace();
}

z=getNumber(x, y);

if(z>6) tBonusB=1.1;
else if(z==6) tBonusB=1;
else if(z>3) tBonusB=0.9;
else if(z>1) tBonusB=0.8;
else tBonusB=0.4;

command=JOptionPane.showInputDialog(null, characterB.getPilot()+" Counter Command: ",
"Action", JOptionPane.INFORMATION_MESSAGE, null, commandArray, commandArray[0]);

//Weapon Accuracy Bonus Modifier. Shown on list of Attacks.
String varA=JOptionPane.showInputDialog("Weapon Accuracy Bonus:");
int accBonus=Integer.parseInt(varA);

//Accuracy Calc.
x1=(characterA.getAccuracy()+x2)*tBonusA+accBonus+130;
y1=((characterB.getEvade()+y2)+mechB.getAgl())*tBonusB;

/*Distance Modifier. May not be necessary, but in case of future
updates with a Hex Grid Map, will come in handy for such damage formula.*/
String varD=JOptionPane.showInputDialog("Distance: 1~12ish");
int distance=Integer.parseInt(varD);
z=(5-distance)*3;

//Terrain Bonus Modifier ( Accuracy )
String varT=JOptionPane.showInputDialog("Terrain Bonus: (100% - Accuracy Down %) in decimal notation.");
double terrBonus=Double.parseDouble(varT);

//Accuracy Bonus from Target Unit's size.
if (mechB.getSize().equalsIgnoreCase("LL")) sizeBonus=1.4;
else if(mechB.getSize().equalsIgnoreCase("L")) sizeBonus=1.2;
else if(mechB.getSize().equalsIgnoreCase("M")) sizeBonus=1;
else if(mechB.getSize().equalsIgnoreCase("S")) sizeBonus=0.8;
else if(mechB.getSize().equalsIgnoreCase("SS")) sizeBonus=0.1;

//highMiss = Accuracy Percentage.
double highMiss=100-((x1-y1)*terrBonus*sizeBonus+z);
highMiss=highMiss-characterA.getESP()*3+characterB.getESP()*3;
if(command.equals("Evade")) highMiss=highMiss*2;
if(highMiss<=0) highMiss=0;

System.out.println("Accuracy = "+(100-highMiss)+"%");

//Accuracy Roll.
rand=1+(int) (Math.random()*99);

//Case when attack misses.
if(randdamage=0;
System.out.println("nMiss");
if(characterA.getPersonality().equalsIgnoreCase("Aggressive")) moraleA+=1;
else if(characterA.getPersonality().equalsIgnoreCase("Very Aggressive")) moraleA+=2;
if(characterB.getPersonality().equalsIgnoreCase("Timid")) moraleB+=3;
if(characterB.getSpiritEvade()==true) moraleB+=1;
}

//Case when attack hits.
else if(rand>=highMiss){
//Weapon Information Input
weapon=JOptionPane.showInputDialog("Enter Weapon Power.");
power=Integer.parseInt(weapon);
type=JOptionPane.showInputDialog("Melee or Shot?");
if(type.equalsIgnoreCase("Melee")) attackSkill=characterA.getMelee();
else if(type.equalsIgnoreCase("Shot")) attackSkill=characterA.getShot();
weaponC=JOptionPane.showInputDialog("Weapon Environment Compatibility?");
weaponE=getWeaponCompatibility(weaponC);

//Damage Calculation Formula.
x1=(power*(attackSkill+moraleA))/200*weaponE;
y1=(mechB.getDef()*(1+characterB.getESP()*0.02)*(characterB.getDefense()+moraleB))/200;
x=mechA.getSize();
y=mechB.getSize();
sizeD=getSizeDifference(x, y);
sBonus=(100+(sizeD*10))*0.01;
terrain=JOptionPane.showInputDialog("Terrain Bonus: (100% + Defense Up %) in decimal notation.");
tBonus=Double.parseDouble(terrain);
damage=(x1-y1)*tBonus*sBonus;

if(characterA.getPersonality().equalsIgnoreCase("Timid")) moraleA+=1;
if(characterB.getPersonality().equalsIgnoreCase("Aggressive")) moraleB+=2;
else if(characterB.getPersonality().equalsIgnoreCase("Very Aggressive")) moraleB+=3;
else moraleB+=1;
if(characterA.getSpiritHit()==true) moraleA+=1;
if(characterB.getSpiritDamage()==true) moraleB+=2;

//Critical Hit Formula.
wCrit=JOptionPane.showInputDialog("Weapon Critical Bonus: In Int%");
cBonus=Integer.parseInt(wCrit);
critical=100-(characterA.getSkill()-characterB.getSkill()+cBonus);
critical=critical-characterA.getESP()*2;
rand=1+(int)(Math.random()*99);

if(rand>=critical)
{
damage=damage*1.25;
System.out.println("nCritical Hit");
}

//Case when Mech B has After Image.
if(mechB.getAfterImage()==true){
if(moraleB>=130){
rand=1+(int)(Math.random()*99);
if(rand>=50){
if(highMiss<200){
damage=0;
System.out.println("nAfter Image");
}
else System.out.println("nAfter Image Break");
}
}
}

//Case when Mech B is capable of using Sword Cut.
rand=1 + (int) (Math.random( ) *16);
if(rand<=characterB.getSwordCut()){
if(mechB.getSword()==true){
if(highMiss<150){
damage=0;
System.out.println("nSword Cut");
}
else System.out.println("nSword Cut Break");
}
}

//Case when Mech B is defending.
if(command.equals("Defend")) damage=damage/2;

//Case when Mech B is capable of using Shield.
rand=1 + (int) (Math.random( ) *16);
if(rand<=characterB.getShield()){
if(mechB.getShield()==true){
if(highMiss<200){
damage=damage*0.6;
System.out.println("nShield");
}
else System.out.println("nShield Break");
}
}

//Case when Pilot B has Guard.
if(characterB.getGuard()==true){
if(moraleB>=130) damage=damage*0.8;
}
}

//Final Output ( Including both pilots' morale, and damage dealt.
System.out.println(characterA.getPilot()+" Morale: "+moraleA+
"n"+characterB.getPilot()+" Morale: "+moraleB+
"nnDamage = "+damage);

System.exit(0);
}

//Used for final Environment Compatibility Value.
public static int getNumber(String x, String y)
{
int x1=0;
int y1=0;
int z1;

if(x.equalsIgnoreCase("S")) x1=4;
else if(x.equalsIgnoreCase("A")) x1=3;
else if(x.equalsIgnoreCase("B")) x1=2;
else if(x.equalsIgnoreCase("C")) x1=1;
else if(x.equalsIgnoreCase("D")) x1=0;

if(y.equalsIgnoreCase("S")) y1=4;
else if(y.equalsIgnoreCase("A")) y1=3;
else if(y.equalsIgnoreCase("B")) y1=2;
else if(y.equalsIgnoreCase("C")) y1=1;
else if(y.equalsIgnoreCase("D")) y1=0;

z1=x1+y1;
return z1;
}

//Weapon Environment Compatibility Bonus.
public static double getWeaponCompatibility(String weaponC)
{
double x=0;

if(weaponC.equalsIgnoreCase("S")) x=1.1;
else if(weaponC.equalsIgnoreCase("A")) x=1;
else if(weaponC.equalsIgnoreCase("B")) x=0.9;
else if(weaponC.equalsIgnoreCase("C")) x=0.8;
else if(weaponC.equalsIgnoreCase("D")) x=0.4;

return x;
}

//Used for Mech Size Difference Value.
public static int getSizeDifference(String x, String y)
{
int x1=0;
int y1=0;
int z1;

if(x.equalsIgnoreCase("LL")) x1=4;
else if(x.equalsIgnoreCase("L")) x1=3;
else if(x.equalsIgnoreCase("M")) x1=2;
else if(x.equalsIgnoreCase("S")) x1=1;
else if(x.equalsIgnoreCase("SS")) x1=0;

if(y.equalsIgnoreCase("LL")) y1=4;
else if(y.equalsIgnoreCase("L")) y1=3;
else if(y.equalsIgnoreCase("M")) y1=2;
else if(y.equalsIgnoreCase("S")) y1=1;
else if(y.equalsIgnoreCase("SS")) y1=0;

z1=x1-y1;
return z1;
}
}  

cmainer1001


cmainer1001

PostPosted: Sun Oct 23, 2005 9:42 pm
//The Character Class. This also contains each characters' stats.

import javax.swing.*;
import java.util.*;

public class CharacterClass
{
private Object character;
private int melee;
private int shot;
private int evade;
private int accuracy;
private int defense;
private int skill;
private String sky;
private String land;
private String water;
private String space;
private String personality;
private int morale=100;
private int swordCut=0;
private int shield=0;
private int counter=0;
private boolean foresight=false;
private boolean guard=false;
private boolean attacker=false;
private boolean spiritEvade=false;
private boolean spiritHit=false;
private boolean spiritDamage=false;
private boolean SPRecovery=false;
private int leadership=0;
private int ESP=0;

private int x=0;
//private int potential;

public CharacterClass()
{
setCharacter();
}

public void setCharacter()
{
do
{
Object characterArray[]={"Arcainth Eivand", "Locke Trufeld", "Dion Zegraad",
"Yuri N. Eldform", "Guilliam Yaeger", "Heath", "Leowen Dravon", "Alexander Fedelki",
"Partisus", "Vicki", "Ember Darc", "Garde", "Kujaviak", "RenegadeA",
"Zenk Bandeps", "Xath Trilnoa", "Jeggar Jolen"};
Arrays.sort(characterArray);

character=JOptionPane.showInputDialog(null, "Enter Character Name.",
"Character Select", JOptionPane.INFORMATION_MESSAGE, null,
characterArray, characterArray[0]);

if(character.equals("Arcainth Eivand")){
melee=142;
shot=153;
evade=177;
accuracy=175;
defense=105;
skill=165;

sky="A";
land="A";
water="B";
space="A";

personality="Aggressive";

//Assist Attack Level 2
//Assist Defend Level 1
swordCut=4;
foresight=true;
spiritEvade=true;
//Switch Evade to Hit

//battleCount=1;
//killCount=1;
}

else if(character.equals("Locke Trufeld")){
melee=146;
shot=165;
evade=181;
accuracy=190;
defense=139;
skill=172;

sky="A";
land="A";
water="B";
space="S";

personality="Aggressive";

leadership=4;
ESP=8;
swordCut=9;
foresight=true;
attacker=true;
SPRecovery=true;

//battleCount=1;
//killCount=4;
}

else if(character.equals("Dion Zegraad")){
melee=155;
shot=143;
evade=166;
accuracy=159;
defense=118;
skill=162;

sky="A";
land="A";
water="C";
space="A";

personality="Aggressive";

//Assist Attack Level 1
//Strong Luck

//battleCount=1;
//killCount=0;
}

else if(character.equals("Yuri N. Eldform")){
melee=118;
shot=160;
evade=207;
accuracy=184;
defense=110;
skill=123;

sky="A";
land="A";
water="C";
space="A";

personality="Aggressive";

spiritEvade=true;
//Strong Luck

//battleCount=1;
//killCount=1;
}

else if(character.equals("Guilliam Yaeger")){
melee=170;
shot=140;
evade=100;
accuracy=170;
defense=160;
skill=160;

sky="A";
land="A";
water="B";
space="A";

personality="Aggressive";

//attacker=true;
//potential=3;
//infight=;

//battleCount=1;
//killCount=1;
//bonusPoint=1;
}

else if(character.equals("Heath")){
melee=100;
shot=180;
evade=140;
accuracy=170;
defense=170;
skill=110;

sky="A";
land="B";
water="B";
space="S";

personality="Normal";

//battleCount=1;
//killCount=2;
}

else if(character.equals("Leowen Dravon")){
melee=190;
shot=110;
evade=120;
accuracy=150;
defense=180;
skill=150;

sky="A";
land="A";
water="B";
space="A";

personality="Very Aggressive";

//battleCount=1;
//killCount=3;
}

else if(character.equals("Alexander Fedelki")){
melee=100;
shot=175;
evade=200;
accuracy=180;
defense=125;
skill=120;

sky="A";
land="A";
water="D";
space="S";

personality="Normal";

//Assist Attack Level 3

//battleCount=1;
//killCount=1;
}

else if(character.equals("Partisus")){
melee=80;
shot=225;
evade=210;
accuracy=200;
defense=100;
skill=100;

sky="A";
land="S";
water="C";
space="A";

personality="Normal";

//battleCount=1;
//killCount=2;
//bonusPoint=1;
}

else if(character.equals("Vicki")){
melee=106;
shot=144;
evade=121;
accuracy=170;
defense=142;
skill=174;

sky="A";
land="B";
water="C";
space="A";

personality="Aggressive";

//battleCount=0;
//killCount=0;
}

else if(character.equals("Ember Darc")){
melee=110;
shot=190;
evade=190;
accuracy=190;
defense=140;
skill=80;

sky="B";
land="C";
water="B";
space="A";

personality="Aggressive";

//battleCount=1;
//killCount=0;
}

else if(character.equals("Garde")){
melee=80;
shot=200;
evade=225;
accuracy=230;
defense=100;
skill=80;

sky="A";
land="B";
water="C";
space="S";

personality="Very Aggressive";

//battleCount=1;
//killCount=1;
}

else if(character.equals("Kujaviak")){
melee=190;
shot=190;
evade=150;
accuracy=150;
defense=100;
skill=135;

sky="S";
land="A";
water="B";
space="S";

personality="Aggressive";

//Assist Attack level 5
spiritEvade=true;
spiritHit=true;
spiritDamage=true;
swordCut=7;
shield=4;

//battleCount=0;
//killCount=0;
}

else if(character.equals("Zenk Bandeps")){
melee=154;
shot=157;
evade=196;
accuracy=210;
defense=103;
skill=114;

sky="A";
land="A";
water="B";
space="S";

personality="Very Aggressive";

leadership=3;
foresight=true;
attacker=true;

//battleCount=1;
//killCount=0;
}

else if(character.equals("Xath Trilnoa")){
melee=125;
shot=163;
evade=183;
accuracy=193;
defense=131;
skill=117;

sky="S";
land="B";
water="A";
space="A";

personality="Aggressive";

//Assist Defend=1;
guard=true;

//battleCount=1;
//killCount=0;
}

else if(character.equals("Jeggar Jolen")){
melee=167;
shot=134;
evade=192;
accuracy=201;
defense=109;
skill=104;

sky="A";
land="S";
water="C";
space="A";

personality="Very Aggressive";

spiritHit=true;
attacker=true;

//battleCount=1;
//killCount=0;
}

else if(character.equals("RenegadeA")){
melee=135;
shot=137;
evade=144;
accuracy=159;
defense=158;
skill=162;

sky="A";
land="A";
water="C";
space="A";

personality="Normal";

//Soldier
}


else
{
x=1;
JOptionPane.showMessageDialog(null, "Not in Directory.");
}

}while(x==1);
}

public Object getPilot()
{
return character;
}

public int getMelee()
{
return melee;
}

public int getShot()
{
return shot;
}

public int getEvade()
{
return evade;
}

public int getAccuracy()
{
return accuracy;
}

public int getDefense()
{
return defense;
}

public int getSkill()
{
return skill;
}

public String getSky()
{
return sky;
}

public String getLand()
{
return land;
}

public String getWater()
{
return water;
}

public String getSpace()
{
return space;
}

public String getPersonality()
{
return personality;
}

public int getSwordCut()
{
return swordCut;
}

public int getShield()
{
return shield;
}

public int getMorale()
{
return morale;
}

public boolean getForesight()
{
return foresight;
}

public boolean getGuard()
{
return guard;
}

public boolean getAttacker()
{
return attacker;
}

public boolean getSpiritEvade()
{
return spiritEvade;
}

public boolean getSpiritHit()
{
return spiritHit;
}

public boolean getSpiritDamage()
{
return spiritDamage;
}

public int getLeadership()
{
return leadership;
}

public int getESP()
{
return ESP;
}

public boolean getSPRecovery()
{
return SPRecovery;
}
}  
PostPosted: Sun Oct 23, 2005 9:43 pm
//The Mech Class. This contains all units' stats.

import javax.swing.*;

public class MechClass
{
private Object mech;
private int HP;
private int EN;
private int def;
private int agl;
private String sky;
private String land;
private String water;
private String space;
private String size;
private boolean sword=false;
private boolean shield=false;
private boolean afterImage=false;
private String notes="";
private String attacks="";
private int x=0;
private int movement;

public MechClass()
{
setMech();
}

public void setMech()
{
do
{
Object unitArray[]={"Zaku II F-2", "Aqua Valiance", "Huckebein Mk-III",
"Huckebein Gunner", "Huckebein Boxer", "Reb Gelf", "Alt Eisen",
"Weiss Ritter", "White Phantom", "Gundam Epyon", "Nightshade Mk-VI",
"Serie", "Zekaria", "Velga Giros", "Zeta Gundam", "Viator",
"Alterion (CF)", "Alterion (DF)", "Vegarion", "Hyperion",
"Shadowcat", "Chimera", "Azure Thunder"};

mech=JOptionPane.showInputDialog(null, "Enter unit name.",
"Unit Select", JOptionPane.INFORMATION_MESSAGE, null,
unitArray, unitArray[0]);

if(mech.equals("Zaku II F-2")){
HP=4000;
EN=120;
def=1100;
agl=850;

sky="-";
land="A";
water="B";
space="A";

size="M";
movement=4;

sword=true;
shield=true;

notes="Notes: None";

attacks="120mm Machine Gun : 1400, 1-4, Ammo 10, Acc 0 , Crit 10, A/A/B/A"+
"nHeat Hawk P : 1400, 1 , None , Acc 15, Crit 0 , -/A/A/A"+
"n240mm Bazooka : 1600, 3-5, Ammo 4 , Acc-10, Crit-10, A/A/A/A";
}

else if(mech.equals("Aqua Valiance")){
HP=16000;
EN=350;
def=1800;
agl=1000;

sky="A";
land="C";
water="B";
space="A";

size="LL";
movement=5;

notes="Vell Force: -800 Damage to all attacks.";

attacks="Storm Chaingun P : 1600, 1-2, Ammo 99, Acc 0 , Crit 10, A/B/D/A"+
"n200mm Turret Railgun: 2500, 1-8, None , Acc 10, Crit 30, A/A/B/A"+
"nHellhound Missile : 3200, 1-9, Ammo 20, Acc 50, Crit 20, A/B/C/A"+
"nMain MegaBeam Cannon: 4200, 1-9, EN 50 , Acc 15, Crit 20, A/A/C/A"+
"nWinter Tempest P : 4800, 1-3, EN 80 , Acc 20, Crit 35, A/A/A/A, Morale 120, ESP level 7";
}

else if(mech.equals("Huckebein Mk-III")){
HP=6000;
EN=320;
def=2200;
agl=1700;

sky="A";
land="A";
water="B";
space="A";

size="M";
movement=5;

sword=true;
afterImage=true;

notes="Gravity Territory: EN Cost 5, Damage under 1500 = 0";

attacks="Twin Vulcan P : 2800, 1 , Ammo 20, Acc 35, Crit 30, A/A/B/A"+
"nMulti Trace Missiles: 3200, MAP, Ammo 2 , Acc 10, Crit 10, A/A/C/A, Morale 120"+
"nPhoton Rifle P : 4500, 1-6, Ammo 10, Acc 20, Crit 0 , A/A/B/A"+
"nRosh Saber P : 4600, 1-2, None , Acc 40, Crit 35, A/A/B/A"+
"nFang Slasher P : 4900, 2-5, EN 10 , Acc 25, Crit 40, A/A/B/A, Morale 105"+
"nGraviton Rifle BST : 5300, 2-8, EN 35 , Acc 15, Crit 10, A/A/B/A, Morale 120";
}

else if(mech.equals("Huckebein Gunner")){
HP=7000;
EN=350;
def=2100;
agl=1800;

sky="A";
land="B";
water="C";
space="A";

size="M";
movement=6;

notes="Gravity Territory: EN Cost 5, Damage under 1500 = 0";

attacks="Twin Vulcan P : 2800, 1 , Ammo 20, Acc 35, Crit 30, A/A/A/A"+
"nMulti Trace Missiles: 3200, MAP, Ammo 2 , Acc 10, Crit 10, A/A/C/A, Morale 120"+
"nLeap Missile : 3500, MAP, Ammo 1 , Acc 40, Crit-10, A/B/C/A, Morale 125"+
"nRosh Saber P : 4600, 1-2, None , Acc 40, Crit 35, A/A/B/A"+
"nGraviton Rifle : 4700, 1-6, Ammo 8 , Acc -5, Crit 30, A/A/B/A"+
"nFang Slasher P : 4900, 2-5, EN 10 , Acc 25, Crit 40, A/A/B/A"+
"nGravity Ring : 5300, 1-8, Ammo 6 , Acc 20, Crit 0 , A/B/C/A"+
"nFull Impact Cannon : 6000, 1-9, EN 60 , Acc 20, Crit 0 , A/B/C/A, Morale 130";
}

else if(mech.equals("Huckebein Boxer")){
HP=9000;
EN=350;
def=2600;
agl=1600;

sky="B";
land="A";
water="A";
space="A";

size="M";
movement=5;

notes="Gravity Territory: EN Cost 5, Damage under 1500 = 0";

attacks="Twin Vulcan P : 2800, 1 , Ammo 20, Acc 35, Crit 30, A/A/A/A"+
"nRosh Saber P : 4600, 1-2, None , Acc 40, Crit 35, A/A/B/A"+
"nGraviton Rifle : 4700, 1-6, Ammo 8 , Acc -5, Crit 30, A/A/B/A"+
"nFang Slasher P : 4900, 2-5, EN 5 , Acc 25, Crit 40, A/A/B/A"+
"nGeist Knuckle P : 5400, 1 , EN 10 , Acc 30, Crit 0 , -/A/A/A, Morale 110"+
"nCatapult Kick P : 5900, 1 , EN 20 , Acc 15, Crit 25, -/A/A/A"+
"nG Sword Diver P : 6300, 1 , EN 50 , Acc 40, Crit 10, A/A/A/A, Morale 130";
}

else if(mech.equals("Azure Thunder")){
HP=4200;
EN=180;
def=1320;
agl=1300;

sky="A";
land="-";
water="B";
space="S";

size="M";
movement=5;

notes="Notes: None.";

attacks="100mm Railgun P : 2300, 1-5, None , Acc 20, Crit 20, A/A/B/A"+
"nQuad Blasters P : 2450, 1-3, None , Acc 25, Crit 10, A/A/C/A"+
"nRadar Missiles : 2900, 2-6, Ammo 8 , Acc 30, Crit 0 , A/A/C/A"+
"nAll Out Attack P : 3600, 1-3, Ammo 3 , Acc 15, Crit 20, A/A/B/A, Morale 115";
}

else if(mech.equals("Reb Gelf")){
HP=3600;
EN=150;
def=1200;
agl=950;

sky="A";
land="A";
water="C";
space="A";

size="M";
movement=4;

sword=true;
//jammer=true;

notes="Jammer: 100% Evade against Smart Missiles";

attacks="5 Ren Missile Pod P : 1300, 2-6, Ammo 5 , Acc 5 , Crit 0 , A/A/A/A"+
"nLaser Sword P : 1400, 1 , None , Acc 15, Crit 0 , A/A/A/A"+
"n75mm Hand Rail Gun : 1400, 1-6, Ammo 10, Acc 0 , Crit 10, A/A/B/A";
}

else if(mech.equals("Alt Eisen")){
HP=6500;
EN=220;
def=2000;
agl=1000;

sky="A";
land="S";
water="B";
space="A";

size="M";
movement=4;

sword=true;

notes="Beam Coat: Damage - 700 on Beam Attacks. 5 EN Cost";

attacks="Heat Horn P : 2000, 1 , None , Acc 40, Crit 40, A/A/B/A"+
"n3 Way Gattling Gun P: 2300, 1-4, Ammo 10, Acc 30, Crit 10, A/A/A/A"+
"nHigh Prfm Beam Rifle: 2500, 2-7, Ammo 5 , Acc 25, Crit 20, A/A/-/A"+
"nRevolving Stake P : 3200, 1-3, Ammo 6 , Acc 10, Crit 35, A/A/A/A"+
"nSquare Claymore : 4000, 1-2, Ammo 3 , Acc 50, Crit 50, A/A/B/A, Morale 110"+
"nJoker : 5000, 1 , Ammo 1 , Acc 40, Crit 45, D/S/S/S, Morale 130"+
"nRampage Ghost P : 5500, 1-4, EN 60 , Acc 50, Crit 50, A/A/A/A, Morale 120 with Weiss Ritter";
}

else if(mech.equals("Weiss Ritter")){
HP=5000;
EN=200;
def=1000;
agl=1500;

sky="A";
land="A";
water="C";
space="S";

size="M";
movement=5;

sword=true;

notes="Beam Coat: Damage - 700 on Beam Attacks. 5 EN Cost";

attacks="Beam Knife P : 1500, 1 , EN 5 , Acc 50, Crit 50, A/A/B/A"+
"n3 Barrel Beam CannoP: 2200, 1-4, Ammo 10, Acc 40, Crit 20, A/B/D/S"+
"nOxton Launcher - E : 3100, 4-7, EN 15 , Acc 35, Crit 0 , A/B/D/S, Beam"+
"nOxton Launcher - B : 3500, 2-5, Ammo 5 , Acc 30, Crit 20, A/A/A/S"+
"nOxton Launcher - W : 4200, 3-6, Ammo 3 , Acc 30, Crit 20, S/B/B/S, Morale 110"+
"nRampage Ghost P : 5500, 1-4, EN 60 , Acc 50, Crit 50, A/A/A/A, Morale 120 with Alt Eisen";
}

else if(mech.equals("White Phantom")){
HP=10000;
EN=200;
def=1000;
agl=900;

sky="A";
land="-";
water="-";
space="A";

size="LL";
movement=4;

notes="None";

attacks="Anti Mech Vulcan P : 1200, 1-3, Ammo 20, Acc 50, Crit 50, A/A/B/A"+
"nAll Terrain Missiles: 1500, 1-5, Ammo 8 , Acc 20, Crit 20, A/A/A/A"+
"nMega Ptc Beam Cannon: 2500, 1-8, EN 30 , Acc 30, Crit 10, A/A/C/A, Morale 105"+
"nAnti Warship Warhead: 3000, 1-8, Ammo 3 , Acc 20, Crit 50, A/A/A/A, Morale 120";
}

//Incomplete
else if(mech.equals("Gundam Epyon")){
HP=4300;
EN=180;
def=1000;
agl=950;

sky="A";
land="A";
water="C";
space="S";

size="M";
movement=5;

sword=true;

notes="Beam Coat: Damage - 700 on Beam Attacks. 5 EN Cost";

attacks="Beam Saber : 2000, 1 , EN 5 , Acc , Crit , A/A/B/A";
}

else if(mech.equals("Nightshade Mk-VI")){
HP=5000;
EN=210;
def=1100;
agl=1800+360;

sky="B";
land="S";
water="C";
space="A";

size="M";
movement=5;

sword=true;

notes="Over Boost: EN Cost 9 per turn, 2 turn max. Speed + 20%"+
"Stealth: EN Cost 7 per turn, nullify opponent weapon accuracy bonus.";

attacks="Beam Saber P : 1700, 1 , EN 5 , Acc 35, Crit 20, A/A/B/A"+
"nDual Machine Gun P : 2700, 1-4, Ammo 7 , Acc 23, Crit 25, A/A/C/A"+
"nOver Boost Charge P : 4500, 1-4, EN 35 , Acc 25, Crit 30, A/A/B/A, Morale 120, Req. Over Boost";
}

//incomplete
else if(mech.equals("Serie")){
HP=5500;
EN=250;
def=1200;
agl=1300;

sky="-";
land="S";
water="C";
space="A";

size="M";
movement=4;

sword=true;

notes="Exceed Orbit: 400, 1-4, EN 2.";

attacks="Beam Saber P : 1700, 1 , EN 5 , Acc 35, Crit 20, A/A/B/A"+
"nSniper Rifle : 2800, 3-8, Ammo 6 , Acc 30, Crit 15, B/A/C/A"+
"nBazooka P : 3000, 2-5, Ammo 6 , Acc 15, Crit 15, A/A/D/B"+
"nMissiles P : 3300, 3-5, Ammo 8 , Acc-10, Crit 10, A/A/-/B"+
"nAll Out Attack P : 4500, 3-6, Ammo 2 , Acc 30, Crit 30, S/S/A/S, Morale 115";
}

else if(mech.equals("Zekaria")){
HP=4800;
EN=200;
def=1500;
agl=1100;

sky="C";
land="B";
water="C";
space="A";

size="M";
movement=5;

sword=true;

notes="Notes: None";

attacks="Photon Vulcan P : 1200, 1 , Ammo 20, Acc 20, Crit 0, B/A/A/A"+
"nLaser Blade P : 1600, 1 , None , Acc 15, Crit 30, B/A/B/A"+
"nGist Blow P : 1700, 1 , None , Acc 35, Crit 0 , B/A/C/A"+
"nOptical Rifle : 1900, 2-6, Ammo 6 , Acc 0 , Crit 0 , B/A/C/A";
}

else if(mech.equals("Velga Giros")){
HP=3000;
EN=110;
def=1600;
agl=1000;

sky="B";
land="A";
water="C";
space="A";

size="M";
movement=4;

sword=true;
shield=true;

notes="Notes: None";

attacks="Beam Saber P : 1500, 1 , None , Acc 35, Crit 0 , -/A/B/A"+
"nHeavy Machine Gun : 1600, 1-6, Ammo 10, Acc 0 , Crit 10, A/A/B/A"+
"nShot Lancer P : 1800, 1-3, None , Acc 10, Crit 0 , A/A/B/A";
}

else if(mech.equals("Viator")){
HP=4500;
EN=180;
def=1050;
agl=750;

sky="-";
land="S";
water="C";
space="A";

size="M";
movement=4;

sword=true;
shield=true;

notes="Notes: None";

attacks="Basic Rifle P : 1600, 1-6, Ammo 12, Acc 20, Crit 10, A/A/B/A"+
"nEnergy Heavyblade P : 2800, 1-2, EN 10 , Acc 0 , Crit 20, B/A/B/A";
}

else if(mech.equals("Alterion (CF)")){
HP=3600;
EN=120;
def=900;
agl=1150;

sky="A";
land="B";
water="C";
space="A";

size="M";
movement=6;

notes="Notes: Transforms to Alterion (DF)";

attacks="90mm GG Cannon P : 2500, 1 , Ammo 10, Acc 20, Crit 30, A/A/B/A"+
"nCTM-07 Prominence : 2900, 1-6, Ammo 8 , Acc 30, Crit 0 , A/A/B/A"+
"nG Axel Driver P : 3100, 2-3, Ammo 6 , Acc 0 , Crit 10, A/A/C/A";
}

else if(mech.equals("Alterion (DF)")){
HP=3600;
EN=120;
def=1000;
agl=1050;

sky="A";
land="A";
water="C";
space="A";

size="M";
movement=5;

sword=true;

notes="Notes: Transforms to Alterion (CF)";

attacks="90mm GG Cannon P : 2500, 1-3, Ammo 10, Acc 20, Crit 30, A/A/B/A"+
"nSonic Saber P : 2800, 1 , EN 15 , Acc 40, Crit 10, A/A/B/A, Morale 110"+
"nCTM-02 Spicule P : 2700, 3-4, Ammo 2 , Acc 10, Crit 0 , A/A/B/A"+
"nCTM-07 Prominence : 2900, 1-6, Ammo 8 , Acc 30, Crit 0 , A/A/B/A"+
"nG Axel Driver : 3400, 3-7, Ammo 6 , Acc 0 , Crit 10, A/A/C/A";
}

else if(mech.equals("Vegarion")){
HP=3800;
EN=100;
def=1100;
agl=1200;

sky="A";
land="B";
water="C";
space="A";

size="M";
movement=6;

afterImage=true;

notes="Notes: None";

attacks="110mm GG Cannon : 2700, 1-5, Ammo 10, Acc 20, Crit 30, A/A/B/A"+
"nCTM-05 Pleadis : 2900, MAP, Ammo 2 , Acc 10, Crit 0 , A/A/B/A, Morale 120"+
"nCTM-07 Prominence P : 3100, 2-4, Ammo 8 , Acc 30, Crit 0 , A/A/B/A"+
"nG Break Driver : 2900, 1-6, Ammo 6 , Acc 0 , Crit 10, A/A/C/A"+
"nCTM-09 Seifahlt : 3400, 3-7, Ammo 2 , Acc-10, Crit 0 , A/A/B/A";
}

else if(mech.equals("Hyperion")){
HP=4000;
EN=130;
def=1200;
agl=1250;

sky="A";
land="B";
water="C";
space="A";

size="M";
movement=6;

sword=true;

notes="Notes: None";

attacks="Twin GG Cannon P : 2700, 1-3, Ammo 10, Acc 20, Crit 30, A/A/B/A"+
"nSonic Saber P : 2800, 1-2, EN 30 , Acc 40, Crit 10, A/A/B/A, Morale 110"+
"nCTM-02 Spicule P : 2800, 3-4, Ammo 2 , Acc 10, Crit 0 , A/A/B/A"+
"nCTM-05 Pleadis : 2900, MAP, Ammo 2 , Acc 10, Crit 0 , A/A/B/A, Morale 120"+
"nCTM-07 ProminenceW : 3300, 1-5, Ammo 8 , Acc 30, Crit 0 , A/A/B/A"+
"nCTM-09 Seifahlt : 3600, 3-7, Ammo 2 , Acc-10, Crit 0 , A/A/B/A"+
"nG Driver XCombinatio: 3700, 2-8, Ammo 6 , Acc 0 , Crit 10, A/A/C/A"+
"nManuver GRaMXs P : 4400, 3-5, Ammo 3 , Acc 30, Crit 0 , A/A/C/A, Morale 130";
}

//incomplete
else if(mech.equals("Zeta Gundam")){
HP=4400;
EN=120;
def=750;
agl=900;

sky="A";
land="A";
water="C";
space="S";

size="M";
movement=4;

sword=true;

notes="Beam Coat: Damage - 700 on Beam Attacks. 5 EN Cost";

attacks="Beam Saber : 1700, 1 , EN 5 , Acc , Crit , A/A/B/A";
}

else if(mech.equals("Shadowcat")){
HP=3500;
EN=170;
def=900;
agl=1300;

sky="-";
land="S";
water="B";
space="C";

size="S";
movement=5;

notes="Notes: None.";

attacks="ER Medium Laser x2P : 1800, 2-7, EN 5 , Acc 20, Crit 10, A/A/B/A"+
"nER Large Laser P : 2300, 2-7, EN 10 , Acc 10, Crit 10, A/A/B/A"+
"nMedium Pulse Laser P: 2800, 1-3, EN 25 , Acc 5 , Crit 20, B/A/B/A"+
"nLong Range Missiles : 3000, 3-8, Ammo 3 , Acc 15, Crit 0 , A/A/B/A"+
"nShortRange Missile P: 3300, 1-3, Ammo 5 , Acc 5 , Crit 35, A/A/B/A, Morale 120";
}

else if(mech.equals("Chimera")){
HP=3800;
EN=150;
def=1050;
agl=1100;

sky="-";
land="S";
water="B";
space="C";

size="M";
movement=4;

notes="Notes: None.";

attacks="Small Laser P : 1500, 1-4, EN 5 , Acc 0 , Crit 0 , A/A/B/A"+
"nAutocannon-5 P : 1900, 1-8, Ammo 20, Acc 10, Crit 10, A/A/B/A"+
"nMedium Laser P : 2800, 1-3, EN 25 , Acc 5 , Crit 20, B/A/B/A"+
"nMiddleRangeMissiles : 3000, 2-5, Ammo 4 , Acc 20, Crit 0 , A/A/C/A";
}

else
{
x=1;
JOptionPane.showMessageDialog(null, "Not in Directory.");
}
}while(x==1);
}

public Object getMech()
{
return mech;
}

public int getHP()
{
return HP;
}

public int getEN()
{
return EN;
}

public int getDef()
{
return def;
}

public int getAgl()
{
agl=agl/10;
return agl;
}

public String getSky()
{
return sky;
}

public String getLand()
{
return land;
}

public String getWater()
{
return water;
}

public String getSpace()
{
return space;
}

public String getSize()
{
return size;
}

public boolean getSword()
{
return sword;
}

public boolean getShield()
{
return shield;
}

public boolean getAfterImage()
{
return afterImage;
}

public String getAttacks()
{
return attacks;
}
}  

cmainer1001


cmainer1001

PostPosted: Sun Oct 23, 2005 9:50 pm
//Partisus' GUI thing, separate from the program above. I need to figure out how to apply these codes in the program to make it better. >_<

package MechBattleGUI;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class MechBattleGUI extends JFrame
{
public JComboBox AttackerPilot, DefenderPilot, AttackerMech, DefenderMech, AttackType;
public JLabel AttackerPilotLabel, DefenderPilotLabel, AttackerMechLabel, DefenderMechLabel, AttackNamesLabel;
public JButton CalculateButton;
public JTextField OutputField;
public String[] AttackerPilotNames = {"Default Blank List"};
public String[] AttackerMechNames = {"Choose a pilot"};
public String[] DefenderPilotNames = {"Default Blank List"};
public String[] DefenderMechNames = {"Choose a pilot"};
public String[] AttackNames = {"Choose a mech"};

public MechBattleGUI()
{
Container MainWindow = getContentPane();
MainWindow.setLayout(new GridLayout(8, 2));

AttackerPilotLabel = new JLabel("Attacking Pilot");
MainWindow.add(AttackerPilotLabel);

DefenderPilotLabel = new JLabel("Defending Pilot");
MainWindow.add(DefenderPilotLabel);

AttackerPilot = new JComboBox(AttackerPilotNames);
MainWindow.add(AttackerPilot);

DefenderPilot = new JComboBox(DefenderPilotNames);
MainWindow.add(DefenderPilot);

AttackerMechLabel = new JLabel("Attacking Mech");
MainWindow.add(AttackerMechLabel);

DefenderMechLabel = new JLabel("Defending Mech");
MainWindow.add(DefenderMechLabel);

AttackerMech = new JComboBox(AttackerMechNames);
MainWindow.add(AttackerMech);

DefenderMech = new JComboBox(DefenderMechNames);
MainWindow.add(DefenderMech);

AttackNamesLabel = new JLabel("Attack Used:");
MainWindow.add(AttackNamesLabel);

AttackType = new JComboBox(AttackNames);
MainWindow.add(AttackType);

CalculateButton = new JButton("Calculate");
MainWindow.add(CalculateButton);

OutputField = new JTextField(30);
MainWindow.add(OutputField);

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}

public static void main(String args[])
{
MechBattleGUI gui = new MechBattleGUI();
gui.pack();
gui.show();
}
}  
PostPosted: Sun Oct 23, 2005 9:51 pm
From here on, I believe we will have some further project stuff going on here.

I plan on enabling SP Commands for everyone to make these battles more interesting and fun. More details later, since this is a bit big. @_@


Here are the movements formula.
Movement
Open Space, Grassy Plains, and Roads typically have no movement penalty, making the cost to cross 1.

Forests, Asteroids, and structures (Buildings on the ground, Colonies in space, etc) usually have a cost of 2 to cross

Moving through Water and Mountains traditionally has a movement penalty of 3, unless the unit has an A or S in Sea terrain


And a rough, Armored Core unit stat conversion formulas.
Armored Core Stat Convert
HP = AP / 2
EN = Condenser Capacity / some value..
EN Recovery per turn = Generator Output / some value..
Defense = Physical Defense * some value..
Energy Shield = Energy Defense * some value..
Agility = Max Booster Speed * some value..
 

cmainer1001


Locke Trufeld
Captain

PostPosted: Sun Feb 05, 2006 12:30 pm
Alright. The top 3 codes have basically the meat of the program. How damage is calculated, the pilots and mech's stats, etc. Now this is my failed attempt at the GUI since I didn't learn enough about programming GUI, nor did my college class even get to the GUI in the whole semester, so I was lacking any knowledge to continue this program. @_@ I highly appreciate Partisus for taking on this job of working on the GUI program to make everyone's lives easier in this Statistical Division.

//Log 1: First attempt at creating a GUI, simulating the MechBattleSystem.

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;

public class SRWBattleDemo1 extends JFrame implements ActionListener
{
//GUI Variables
private JButton calculate;
private Container container;
private JLabel offence, defense, lMorale, lDistance, lDamage, lAcc, lDef,
blank1, blank2, blank3;
private JComboBox pilotBoxA, pilotBoxB, unitBoxA, unitBoxB, terrainBoxA,
terrainBoxB, fieldBoxA, fieldBoxB, commandBoxA, commandBoxB;
private JTextField moraleA, moraleB, distance, accuracyA, accuracyB,
effectA, effectB, damageA, damageB;
private Object pilotArray[]={"Arcainth Eivand", "Locke Trufeld", "Dion Zegraad",
"Yuri N. Eldform", "Guilliam Yaeger", "Heath", "Leowen Dravon", "Alexander Fedelki",
"Partisus", "Vicki", "Ember", "Garde", "Kujaviak", "RenegadeA",
"Zenk Bandeps", "Xath Trilnoa", "Jeggar Jolen"};
private Object unitArray[]={"Zaku II F-2", "Aqua Valiance", "Huckebein Mk-III",
"Huckebein Gunner", "Huckebein Boxer", "Reb Gelf", "Alt Eisen",
"Weiss Ritter", "White Phantom", "Gundam Epyon", "Nightshade Mk-VI",
"Serie", "Zekaria", "Velga Giros", "Zeta Gundam", "Viator",
"Alterion (CF)", "Alterion (DF)", "Vegarion", "Hyperion"};
private Object terrainArray[]={"Sky", "Land", "Water", "Space"};
private Object fieldArray[][]={{"Plain", "Forest", "Structure"},
{"0", "5", "10"},
{"0", "5", "15"}};
private Object comArray[][]={{"Do Nothing", "Defend", "Evade"}};
private GridLayout grid;

//Base Variables
private String atkType, weaponCompBonus;
private String stringX="";
private String stringY="";
private String output="";
private int nMoraleA, nMoraleB, intZ, rand, sizeDifference, atkStat,
critBonus, critRate;
private int atkPower=0;
private int statBonusA=0;
private int statBonusB=0;
private double terrAccA, terrAccB, doubleX, doubleY, weaponTerrBonus,
terrDefA, terrDefB;
private double damage=0;
private double sizeBonus=0;

//Pilot Variables
/*private int meleeA, shotA, evadeA, accuracyA, defenseA, skillA,
meleeB, shotB, evadeB, accuracyB, defenseB, skillB,
swordCutA, shieldA, counterA, ESPA, swordCutB, shieldB, counterB, ESPB;
private String */

//private Object pilotList[];
//private Object unitList[];

public SRWBattleDemo1()
{
super("Super Robot Wars Sim");
grid=new GridLayout(10, 5);
container=getContentPane();
container.setLayout(grid);

//CharacterClass characterA=new CharacterClass();
//MechClass mechA=new MechClass();

calculate=new JButton("Battle!");

offence=new JLabel("Enter Player A");
defense=new JLabel("Enter Player B");
lMorale=new JLabel("Character Morale");
lDistance=new JLabel("Enter Distance");
lAcc=new JLabel("Field Bonus");
lDef=new JLabel("Field Defense Bonus");
lDamage=new JLabel("Damage Output");
blank1=new JLabel(" ");
blank2=new JLabel("Enter Unit's Terrain");
blank3=new JLabel("Enter Unit's Command");

//pilotList=characterA.getCharacterArray();
//unitList=mechA.getUnitArray();

Arrays.sort(pilotArray);
Arrays.sort(unitArray);

pilotBoxA=new JComboBox(pilotArray);
pilotBoxB=new JComboBox(pilotArray);
unitBoxA=new JComboBox(unitArray);
unitBoxB=new JComboBox(unitArray);
terrainBoxA=new JComboBox(terrainArray);
terrainBoxB=new JComboBox(terrainArray);
fieldBoxA=new JComboBox(fieldArray[0]);
fieldBoxB=new JComboBox(fieldArray[0]);
commandBoxA=new JComboBox(comArray[0]);
commandBoxB=new JComboBox(comArray[0]);

moraleA=new JTextField(3);
moraleA.setEditable(true);
moraleB=new JTextField(3);
moraleB.setEditable(true);
distance=new JTextField(2);
distance.setEditable(true);
effectA=new JTextField(20);
effectA.setEditable(false);
effectB=new JTextField(20);
effectB.setEditable(false);
damageA=new JTextField(6);
damageA.setEditable(false);
damageB=new JTextField(6);
damageB.setEditable(false);

container.add(offence);
container.add(blank1);
container.add(defense);

container.add(pilotBoxA);
container.add(lDistance);
container.add(pilotBoxB);

container.add(unitBoxA);
container.add(distance);
container.add(unitBoxB);

container.add(moraleA);
container.add(lMorale);
container.add(moraleB);

container.add(terrainBoxA);
container.add(blank2);
container.add(terrainBoxB);

container.add(fieldBoxA);
container.add(lAcc);
container.add(fieldBoxB);

container.add(commandBoxA);
container.add(blank3);
container.add(commandBoxB);

container.add(effectA);
container.add(calculate);
container.add(effectB);

container.add(damageA);
container.add(lDamage);
container.add(damageB);

calculate.addActionListener(this);

pilotBoxA.addItemListener(new ItemListener()
{
public void itemStateChanged(ItemEvent event)
{
/*if(pilotBoxA.getSelectedIndex()==0) ;
else if(pilotBoxA.getSelectedIndex()==1) ;
else if(pilotBoxA.getSelectedIndex()==2) ;*/
}
});

/*pilotBoxB.addItemListener(new ItemListener()
{
public void itemStateChanged(ItemEvent event)
{
if(*/

setSize(500, 300);
setVisible(true);
}

public void actionPerformed(ActionEvent e)
{
Object source=e.getSource();
/*if(source==calculate)
{

}

else if(source==calculate)
{

}*/
}

public static void main(String args[])
{
SRWBattleDemo1 application=new SRWBattleDemo1();

application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}

There are still quite a few errors in these programs which needs to be looked at in order for it to compile.
 
PostPosted: Sun Feb 05, 2006 12:33 pm
These are parts of the GUI, possibly a new format of keeping these stats organized. The part that will be constantly upgraded whenever any of these stats change, or a new pilot or unit is to be registered.


//Pilot Information
package MechBattleGUI;

public class Pilot
{
public String name;
public int melee;
public int shot;
public int evade;
public int accuracy;
public int defense;
public int skill;
public String sky;
public String land;
public String water;
public String space;
public String personality;
public int morale;
public int swordCut;
public int shield;
public int counter;
public boolean foresight;
public boolean guard;
public boolean spiritEvade;
public boolean spiritHit;
public boolean spiritDamage;


public String toString()
{
return name;
}
}


//Unit Information
package MechBattleGUI;

public class Mech
{
public String name;
public int HP;
public int EN;
public int def;
public int agl;
public String sky;
public String land;
public String water;
public String space;
public String size;
public boolean sword;
public boolean shield;
public boolean afterImage;
public String notes="";
public Weapon[] attacks;

public String toString()
{
return name;
}
}


//Weapons Information
package MechBattleGUI;

public class Weapon
{
public String attackName;
public int attackPower;
public String attackRange;
public String Ammo;
public int accuracyBonus;
public int criticalBonus;
public char sky;
public char land;
public char water;
public char space;

public String toString()
{
return attackName;
}
}
 

Locke Trufeld
Captain

Reply
Statistical Division ( Temporarily closed )

 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum