changed godmode to static, changed dot effects,

This commit is contained in:
OfficialCHenry 2022-05-09 15:14:31 -04:00
parent c649f8ce21
commit f23490ebe8
5 changed files with 10 additions and 9 deletions

View File

@ -230,13 +230,13 @@ export default class EnemyAI extends StateMachineAI implements BattlerAI {
if(this.poisonTimer.isStopped() && this.poisonCounter >0){
this.poisonCounter --;
this.poisonTimer.start();
this.damage( Math.round(this.CURRENT_HP/20) + (<PlayerController>this.player._ai).extraDotDmg );
this.damage( 2+ Math.round(this.CURRENT_HP/20) + (<PlayerController>this.player._ai).extraDotDmg );
}
if(this.bleedTimer.isStopped() && this.bleedCounter >0){
this.bleedCounter --;
this.bleedTimer.start();
this.damage(3 +Math.round(this.CURRENT_HP/33) + (<PlayerController>this.player._ai).extraDotDmg );
this.damage(3 +Math.round(this.maxHealth/33) + (<PlayerController>this.player._ai).extraDotDmg );
}
if (this.healthBar) {

View File

@ -11,7 +11,7 @@ export default class SnakeAI extends EnemyAI {
collideWithPlayer(player: PlayerController): void {
player.damage(10);
if (this.isAttacking && !player.invincible && !player.godMode) {
if (this.isAttacking && !player.invincible ) {
player.poisonCounter = 5;
}
}

View File

@ -72,7 +72,7 @@ export default class laserGun extends WeaponType {
createRequiredAssets(scene: Scene): [Line] {
let line = <Line>scene.add.graphic(GraphicType.LINE, "primary", {start: new Vec2(-1, 1), end: new Vec2(-1, -1)});
line.color = this.color;
line.thickness = 72;
line.thickness = 90;
line.tweens.add("fade", {
startDelay: 0,

View File

@ -98,7 +98,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA
invincible : boolean = false;
static level : number = 1;
godMode: boolean = false;
static godMode: boolean = false;
tilemap: OrthogonalTilemap;
@ -195,6 +195,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA
PlayerController.buffPool = new Array();
PlayerController.enemiesKilled = 0;
PlayerController.level = 1;
PlayerController.godMode = false;
}
initializePlatformer(): void {
@ -267,14 +268,14 @@ export default class PlayerController extends StateMachineAI implements BattlerA
if(this.bleedTimer.isStopped() && this.bleedCounter >0){
this.bleedCounter --;
this.bleedTimer.start();
this.damage( 2 + Math.round(this.CURRENT_HP/50) );
this.damage( 2 + Math.round(this.MAX_HP/50) );
}
}
// TODO - figure out attacker
damage(damage: number, attacker?: GameNode): void {
if (this.godMode) {
if (PlayerController.godMode) {
//console.log("godmode");
return;
}

View File

@ -1209,7 +1209,7 @@ export default class GameLevel extends Scene {
// Cheat
protected enableCheat() {
if (this.pauseInput.text.toUpperCase() === "UUDDLRLRBABA") {
(<PlayerController>this.player._ai).godMode = true;
PlayerController.godMode = true;
}
else {
let commands = this.pauseInput.text.split(' ');
@ -1238,7 +1238,7 @@ export default class GameLevel extends Scene {
}
}
}
(<PlayerController>this.player._ai).godMode = false;
PlayerController.godMode = false;
}
this.pauseInput.text = "";
}