Skip to content

Commit

Permalink
Merge branch 'master' into PR-equipment-clean
Browse files Browse the repository at this point in the history
# Conflicts:
#	megamek/src/megamek/common/weapons/ACCaselessHandler.java
#	megamek/src/megamek/common/weapons/PrimitiveACWeaponHandler.java
#	megamek/src/megamek/common/weapons/PrototypeACWeaponHandler.java
  • Loading branch information
SJuliez committed Sep 22, 2024
2 parents db1a9a3 + e049e37 commit 393ef5b
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 99 deletions.
164 changes: 82 additions & 82 deletions megamek/data/images/hexes/saxarba/SMV_Seaport/SeaPort.tileinc

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions megamek/src/megamek/common/util/CityBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public CityBuilder(MapSettings mapSettings, Board board) {
/**
* This function will generate a city with a grid lay out. 4 rounds running
* North and South and 4 roads running east west
*
*
* @author Torren (Jason Tighe)
* @return
*/
Expand Down Expand Up @@ -383,7 +383,7 @@ private void connectHexes(Coords src, Coords dest, int roadStyle) {

/**
* Build a bridge across an obstacle
*
*
* @todo: use a bridge not a road when bridges are working
* @param start
* @param direction
Expand Down Expand Up @@ -436,6 +436,11 @@ private void connectHexes(Coords src, Coords dest, int roadStyle) {
+ Compute.randomInt(1 + mapSettings.getCityMaxCF()
- mapSettings.getCityMinCF());

if (cf == 0) {
// some city settings can lead to 0 CF bridges; use a default CF in this case
cf = 40;
}

for (Enumeration<Coords> e = hexes.elements(); e.hasMoreElements();) {
Coords c = e.nextElement();
addBridge(board.getHex(c), exits, elev1, cf);
Expand Down Expand Up @@ -484,7 +489,7 @@ private void buildStraightRoad(Coords start, int direction, int roadStyle) {

/**
* Utility function for setting building type from CF table
*
*
* @param cf
* @return building type
*/
Expand Down
4 changes: 2 additions & 2 deletions megamek/src/megamek/common/weapons/AmmoWeaponHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ protected boolean doAmmoFeedProblemCheck(Vector<Report> vPhaseReport) {
// don't have neg ammo feed problem quirk
if (!weapon.hasQuirk(OptionsConstants.QUIRK_WEAP_NEG_AMMO_FEED_PROBLEMS)) {
return false;
} else if ((roll.getIntValue() <= 2) && !ae.isConventionalInfantry()) {
// attack roll was a 2, may explode
} else if (roll.getIntValue() <= 2) {
Roll diceRoll = Compute.rollD6(2);

Report r = new Report(3173);
Expand Down Expand Up @@ -140,8 +140,8 @@ protected boolean doAmmoFeedProblemCheck(Vector<Report> vPhaseReport) {
vPhaseReport.addElement(r);
return false;
}
// attack roll was not 2, won't explode
} else {
// attack roll was not 2, won't explode
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion megamek/src/megamek/common/weapons/HVACWeaponHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected boolean doChecks(Vector<Report> vPhaseReport) {
return true;
}

if (roll.getIntValue() == 2) {
if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) {
Report r = new Report(3162);
r.subject = subjectId;
weapon.setJammed(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected boolean doChecks(Vector<Report> vPhaseReport) {
return true;
}

if (roll.getIntValue() == 2) {
if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) {
Report r = new Report(3161);
r.subject = subjectId;
r.newlines = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected boolean doChecks(Vector<Report> vPhaseReport) {
return true;
}

if (roll.getIntValue() == 2) {
if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) {
Report r = new Report(3165);
r.subject = subjectId;
weapon.setJammed(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public PrototypeCLUltraWeaponHandler(ToHitData t, WeaponAttackAction w, Game g,
protected boolean doChecks(Vector<Report> vPhaseReport) {
if (doAmmoFeedProblemCheck(vPhaseReport)) {
return true;
} else if (ae.isConventionalInfantry()) {
return false;
}

if ((roll.getIntValue() <= 3) && (howManyShots == 2)) {
Expand Down
4 changes: 2 additions & 2 deletions megamek/src/megamek/common/weapons/PrototypeGaussHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ protected boolean doChecks(Vector<Report> vPhaseReport) {
if (doAmmoFeedProblemCheck(vPhaseReport)) {
return true;
}
if (roll.getIntValue() == 2) {

if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) {
Report r = new Report(3165);
r.subject = subjectId;
weapon.setJammed(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public PrototypeISUltraWeaponHandler(ToHitData t, WeaponAttackAction w, Game g,
protected boolean doChecks(Vector<Report> vPhaseReport) {
if (doAmmoFeedProblemCheck(vPhaseReport)) {
return true;
} else if (ae.isConventionalInfantry()) {
return false;
}

if (((roll.getIntValue() <= 4) && (howManyShots == 2))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected boolean doChecks(Vector<Report> vPhaseReport) {
return true;
}

if (roll.getIntValue() == 2) {
if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) {
Report r = new Report(3165);
r.subject = subjectId;
weapon.setJammed(true);
Expand Down
4 changes: 1 addition & 3 deletions megamek/src/megamek/common/weapons/RACHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ public RACHandler(ToHitData t, WeaponAttackAction w, Game g, TWGameManager m) {
protected boolean doChecks(Vector<Report> vPhaseReport) {
if (doAmmoFeedProblemCheck(vPhaseReport)) {
return true;
}

if (ae instanceof Infantry) {
} else if (ae.isConventionalInfantry()) {
return false;
}
boolean jams = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected boolean doChecks(Vector<Report> vPhaseReport) {
if (kindRapidFire) {
jamLevel = 2;
}
if ((roll.getIntValue() <= jamLevel) && (howManyShots == 2) && !(ae instanceof Infantry)) {
if ((roll.getIntValue() <= jamLevel) && (howManyShots == 2) && !ae.isConventionalInfantry()) {
if (roll.getIntValue() > 2 || kindRapidFire) {
Report r = new Report(3161);
r.subject = subjectId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected boolean doChecks(Vector<Report> vPhaseReport) {
return true;
}

if (roll.getIntValue() == 2) {
if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) {
Report r = new Report(3162);
r.subject = subjectId;
weapon.setJammed(true);
Expand Down
2 changes: 1 addition & 1 deletion megamek/src/megamek/common/weapons/UltraWeaponHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected boolean doChecks(Vector<Report> vPhaseReport) {
return true;
}

if ((roll.getIntValue() == 2) && (howManyShots == 2) && !(ae instanceof Infantry)) {
if ((roll.getIntValue() == 2) && (howManyShots == 2) && !ae.isConventionalInfantry()) {
Report r = new Report();
r.subject = subjectId;
weapon.setJammed(true);
Expand Down

0 comments on commit 393ef5b

Please sign in to comment.