changed godmode to static, changed dot effects,
This commit is contained in:
parent
c649f8ce21
commit
f23490ebe8
|
@ -230,13 +230,13 @@ export default class EnemyAI extends StateMachineAI implements BattlerAI {
|
||||||
if(this.poisonTimer.isStopped() && this.poisonCounter >0){
|
if(this.poisonTimer.isStopped() && this.poisonCounter >0){
|
||||||
this.poisonCounter --;
|
this.poisonCounter --;
|
||||||
this.poisonTimer.start();
|
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){
|
if(this.bleedTimer.isStopped() && this.bleedCounter >0){
|
||||||
this.bleedCounter --;
|
this.bleedCounter --;
|
||||||
this.bleedTimer.start();
|
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) {
|
if (this.healthBar) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default class SnakeAI extends EnemyAI {
|
||||||
|
|
||||||
collideWithPlayer(player: PlayerController): void {
|
collideWithPlayer(player: PlayerController): void {
|
||||||
player.damage(10);
|
player.damage(10);
|
||||||
if (this.isAttacking && !player.invincible && !player.godMode) {
|
if (this.isAttacking && !player.invincible ) {
|
||||||
player.poisonCounter = 5;
|
player.poisonCounter = 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ export default class laserGun extends WeaponType {
|
||||||
createRequiredAssets(scene: Scene): [Line] {
|
createRequiredAssets(scene: Scene): [Line] {
|
||||||
let line = <Line>scene.add.graphic(GraphicType.LINE, "primary", {start: new Vec2(-1, 1), end: new Vec2(-1, -1)});
|
let line = <Line>scene.add.graphic(GraphicType.LINE, "primary", {start: new Vec2(-1, 1), end: new Vec2(-1, -1)});
|
||||||
line.color = this.color;
|
line.color = this.color;
|
||||||
line.thickness = 72;
|
line.thickness = 90;
|
||||||
|
|
||||||
line.tweens.add("fade", {
|
line.tweens.add("fade", {
|
||||||
startDelay: 0,
|
startDelay: 0,
|
||||||
|
|
|
@ -98,7 +98,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA
|
||||||
invincible : boolean = false;
|
invincible : boolean = false;
|
||||||
static level : number = 1;
|
static level : number = 1;
|
||||||
|
|
||||||
godMode: boolean = false;
|
static godMode: boolean = false;
|
||||||
|
|
||||||
tilemap: OrthogonalTilemap;
|
tilemap: OrthogonalTilemap;
|
||||||
|
|
||||||
|
@ -195,6 +195,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA
|
||||||
PlayerController.buffPool = new Array();
|
PlayerController.buffPool = new Array();
|
||||||
PlayerController.enemiesKilled = 0;
|
PlayerController.enemiesKilled = 0;
|
||||||
PlayerController.level = 1;
|
PlayerController.level = 1;
|
||||||
|
PlayerController.godMode = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
initializePlatformer(): void {
|
initializePlatformer(): void {
|
||||||
|
@ -267,14 +268,14 @@ export default class PlayerController extends StateMachineAI implements BattlerA
|
||||||
if(this.bleedTimer.isStopped() && this.bleedCounter >0){
|
if(this.bleedTimer.isStopped() && this.bleedCounter >0){
|
||||||
this.bleedCounter --;
|
this.bleedCounter --;
|
||||||
this.bleedTimer.start();
|
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
|
// TODO - figure out attacker
|
||||||
damage(damage: number, attacker?: GameNode): void {
|
damage(damage: number, attacker?: GameNode): void {
|
||||||
if (this.godMode) {
|
if (PlayerController.godMode) {
|
||||||
//console.log("godmode");
|
//console.log("godmode");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1209,7 +1209,7 @@ export default class GameLevel extends Scene {
|
||||||
// Cheat
|
// Cheat
|
||||||
protected enableCheat() {
|
protected enableCheat() {
|
||||||
if (this.pauseInput.text.toUpperCase() === "UUDDLRLRBABA") {
|
if (this.pauseInput.text.toUpperCase() === "UUDDLRLRBABA") {
|
||||||
(<PlayerController>this.player._ai).godMode = true;
|
PlayerController.godMode = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let commands = this.pauseInput.text.split(' ');
|
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 = "";
|
this.pauseInput.text = "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user