Address-River-Criticisms (#536)

## Description:

Please see description on: #535 

fixes #535 

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

aPuddle

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
This commit is contained in:
APuddle210
2025-04-18 18:05:27 -07:00
committed by GitHub
co-authored by Scott Anderson
parent 9edc82b354
commit f713254081
9 changed files with 173 additions and 24 deletions
+7 -3
View File
@@ -42,8 +42,7 @@ export class ShellExecution implements Execution {
}
if (this.destroyAtTick == -1 && !this.ownerUnit.isActive()) {
this.destroyAtTick =
this.mg.ticks() + this.mg.config().warshipShellLifetime();
this.destroyAtTick = this.mg.ticks() + this.mg.config().shellLifetime();
}
for (let i = 0; i < 3; i++) {
@@ -55,7 +54,7 @@ export class ShellExecution implements Execution {
switch (result.type) {
case PathFindResultType.Completed:
this.active = false;
this.target.modifyHealth(-this.shell.info().damage);
this.target.modifyHealth(-this.effectOnTarget());
this.shell.delete(false);
return;
case PathFindResultType.NextTile:
@@ -72,6 +71,11 @@ export class ShellExecution implements Execution {
}
}
private effectOnTarget(): number {
const baseDamage: number = this.mg.config().unitInfo(UnitType.Shell).damage;
return baseDamage;
}
isActive(): boolean {
return this.active;
}