-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
72 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 13 additions & 13 deletions
26
megamek/src/megamek/client/bot/princess/FiringPhysicalDamage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
package megamek.client.bot.princess; | ||
|
||
public record FiringPhysicalDamage(double firingDamage, double physicalDamage, double takenDamage) { | ||
public FiringPhysicalDamage() { | ||
this(0, 0, 0); | ||
} | ||
public class FiringPhysicalDamage { | ||
public double firingDamage; | ||
public double physicalDamage; | ||
public double takenDamage; | ||
|
||
public FiringPhysicalDamage withFiringDamage(double firingDamage) { | ||
return new FiringPhysicalDamage(firingDamage, physicalDamage, takenDamage); | ||
} | ||
|
||
public FiringPhysicalDamage withPhysicalDamage(double physicalDamage) { | ||
return new FiringPhysicalDamage(firingDamage, physicalDamage, takenDamage); | ||
public FiringPhysicalDamage() { | ||
firingDamage = 0; | ||
physicalDamage = 0; | ||
takenDamage = 0; | ||
} | ||
|
||
public FiringPhysicalDamage withTakenDamage(double takenDamage) { | ||
return new FiringPhysicalDamage(firingDamage, physicalDamage, takenDamage); | ||
public FiringPhysicalDamage(double firingDamage, double physicalDamage, double takenDamage) { | ||
this.firingDamage = firingDamage; | ||
this.physicalDamage = physicalDamage; | ||
this.takenDamage = takenDamage; | ||
} | ||
|
||
public double getMaximumDamageEstimate() { | ||
return firingDamage + physicalDamage; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters