Skip to content

Commit

Permalink
balanced AdvFighter and JSF; also made some minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CBSkarmory committed Jun 28, 2017
1 parent 847dfd6 commit eb1a36a
Show file tree
Hide file tree
Showing 8 changed files with 339 additions and 338 deletions.
625 changes: 316 additions & 309 deletions src/main/java/cbskarmory/Runner.java

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/main/java/cbskarmory/terrain/properties/AirPort.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ public AirPort(int r, int c, TerrainGrid<Actor> hostGrid,Player owner)throws NoS
buildableUnits.add(Fighter.class.getConstructor(Player.class));
buildableUnits.add(Bomber.class.getConstructor(Player.class));
buildableUnits.add(CAS.class.getConstructor(Player.class));
buildableUnits.add(AdvFighter.class.getConstructor(Player.class));
buildableUnits.add(JSF.class.getConstructor(Player.class));
buildableUnits.add(DropShip.class.getConstructor(Player.class));
buildableUnits.add(StealthBomber.class.getConstructor(Player.class));
buildableUnits.add(JSF.class.getConstructor(Player.class));
buildableUnits.add(AdvFighter.class.getConstructor(Player.class));

}

}
4 changes: 0 additions & 4 deletions src/main/java/cbskarmory/terrain/properties/Factory.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ public void buildUnit(Constructor<? extends Unit> constructor){
}else{
getOwner().setMoney(getOwner().getMoney()-u.getBuildCost());
u.putSelfInGrid(hostGrid, this);
//FIXME I think this is unnecessary
// if(null!=hostGrid&&null!=hostGrid.hostWorld){
// hostGrid.hostWorld.getWorldFrame().control.display.repaint();
// }
}


Expand Down
13 changes: 5 additions & 8 deletions src/main/java/cbskarmory/units/air/AdvFighter.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* the advanced fighter is a stealth aircraft
*Gets MISSILE (direct A2A) , ROTARY (ranged A2A)
* Costs 3000
* Costs 7 fuel/turn to stay airborne, costs 5 extra when hidden (12 total /turn)
* Highly mobile stealth air superiority fighter with fuel issues -- seems familiar
* Costs 5 fuel/turn to stay airborne, costs 5 extra when hidden (10 total /turn)
* Highly mobile stealth air superiority fighter
*/
public class AdvFighter extends Stealth {

Expand All @@ -33,13 +33,10 @@ public AdvFighter(Player p) {
public int getExtraDailyCost() {
return 5;
}
@Override
public int getDailyCost() {
return 7;
}

@Override
public int getBuildCost() {
return 3000;
return 4000;
}

@Override
Expand Down Expand Up @@ -75,7 +72,7 @@ public boolean couldTarget(Unit toCheck, Terrain hypothetical){
return false; //can't target nothing, can target Air units only
}
int dist = hypothetical.getDistanceTo((Terrain) toCheck.getLocation());
return (dist>=1&&dist<=3);
return (dist>=1&&dist<=5);
}
@Override
public boolean canCounter(Unit u) {
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/cbskarmory/units/air/JSF.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import cbskarmory.weapons.WeaponType;

/**
* The Joint Strike Fighter is a stealth aircraft
* The Joint Strike Fighter is a stealth multirole aircraft cheaper, but shorter ranged than the AdvFighter
* Gets MISSILES (ranged A2A), ROCKET_POD (direct A2G)
* Costs 4000
* Costs 5 fuel/turn to stay airborne, extra 4 when hidden (9 total/turn)
* Costs 3000
* Costs 8 fuel/turn to stay airborne, extra 6 when hidden (14 total/turn)
*/
public class JSF extends Stealth {

Expand All @@ -27,22 +27,22 @@ public JSF(Player owner) {

@Override
public int getExtraDailyCost() {
return 4;
return 6;
}

@Override
public int getBuildCost() {
return 4000;
return 3000;
}

@Override
public double getBaseArmorResistance() {
return 1;
}
@Override
public int getDailyCost() {
return 5;
}
// @Override
// public int getDailyCost() {
// return 5;
// }
@Override
public double resist(double damage, String source) {
switch(source){
Expand All @@ -60,7 +60,7 @@ public boolean couldTarget(Unit toCheck, Terrain hypothetical){
return false; //can't target nothing
}
int dist = hypothetical.getDistanceTo((Terrain) toCheck.getLocation());
return (dist>=1&&dist<=5);
return (dist>=1&&dist<=3);
}
@Override
public boolean canTarget(Unit toCheck){
Expand All @@ -69,7 +69,7 @@ public boolean canTarget(Unit toCheck){
return false; //can't target nothing
}
int dist = hypothetical.getDistanceTo((Terrain) toCheck.getLocation());
return (dist>=3&&dist<=5);
return (dist>=3&&dist<=3);
}

}
2 changes: 1 addition & 1 deletion src/main/java/info/gridworld/gui/GUIController.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public void editLocation() {

MenuMaker<T> maker = new MenuMaker<T>(parentFrame, resources, displayMap);
maker.display = this.display;
System.out.println("invoking makeMethodMenu, see line 334 of GUIController");
System.out.println("invoking makeMethodMenu, see line 369 of GUIController");
JPopupMenu popup = null;
// System.out.println("trying");
popup = maker.makeMethodMenu(occupant, loc);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/resources/unit_daily_fuel.properties
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ DropShip = 5

AdvFighter = 5

JSF = 5
JSF = 8

BBoat = 1

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/resources/unit_move.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ CAS = 7
SCopter = 6
StealthBomber = 6
DropShip = 8
AdvFighter = 11
JSF = 12
JSF = 10
AdvFighter = 14
BBoat = 7
Lander = 5
Cruiser = 6
Expand Down

0 comments on commit eb1a36a

Please sign in to comment.