added enemiesKilledCounter, modified dot damage on player

This commit is contained in:
OfficialCHenry 2022-04-25 21:39:34 -04:00
parent c9a2b97104
commit aafd105c81
2 changed files with 6 additions and 10 deletions

View File

@ -142,7 +142,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA
bleedTimer : Timer; bleedTimer : Timer;
bleedCounter :number = 0; bleedCounter :number = 0;
enemiesKilled : number =0;
//TODO - get the correct tilemap //TODO - get the correct tilemap
@ -156,9 +156,6 @@ export default class PlayerController extends StateMachineAI implements BattlerA
this.inventory = options.inventory; this.inventory = options.inventory;
this.lookDirection = new Vec2(); this.lookDirection = new Vec2();
//this.CURRENT_BUFFS = {hp:0, atk:0, def:0, speed:0, range:0};
//i frame timer //i frame timer
PlayerController.invincibilityTimer = new Timer(2000); PlayerController.invincibilityTimer = new Timer(2000);
@ -246,17 +243,17 @@ export default class PlayerController extends StateMachineAI implements BattlerA
if(this.burnTimer.isStopped() && this.burnCounter >0){ if(this.burnTimer.isStopped() && this.burnCounter >0){
this.burnCounter --; this.burnCounter --;
this.burnTimer.start(); this.burnTimer.start();
this.damage(10); this.damage(5);
} }
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) ); this.damage( Math.round(this.CURRENT_HP/33) );
} }
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/33) ); this.damage( 2 + Math.round(this.CURRENT_HP/50) );
} }
} }
@ -366,7 +363,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA
buffs.push({type:BuffType.FLAT_ATK, value:num, category: BuffCategory.EXTRA}, buffs.push({type:BuffType.FLAT_ATK, value:num, category: BuffCategory.EXTRA},
{type:BuffType.SPEED, value:num, category: BuffCategory.EXTRA}, {type:BuffType.SPEED, value:num, category: BuffCategory.EXTRA},
{type:BuffType.FLAT_HEALTH, value:num, category: BuffCategory.SHIELD}, {type:BuffType.FLAT_HEALTH, value:num, category: BuffCategory.SHIELD},
{type:BuffType.RANGE, value:num/100, category: BuffCategory.ATTACK, string: "\n\nIncrease range \nby "+num/100+"%"}, {type:BuffType.RANGE, value:num/100, category: BuffCategory.ATTACK, string: "\n\nIncrease range \nby "+num+"%"},
{type:BuffType.ATKSPEED, value:num, category: BuffCategory.ATTACK}, {type:BuffType.ATKSPEED, value:num, category: BuffCategory.ATTACK},
); );

View File

@ -289,8 +289,7 @@ export default class GameLevel extends Scene {
(<PlayerController>this.player._ai).giveExp(event.data.get("ai").exp_val); (<PlayerController>this.player._ai).giveExp(event.data.get("ai").exp_val);
} }
node.destroy(); //destroy enemy node node.destroy(); //destroy enemy node
//TODO - this is for testing, add some chance here later (<PlayerController>this.player._ai).enemiesKilled++ ;
//this.emitter.fireEvent(Player_Events.GIVE_BUFF);
break; break;
case Player_Events.GIVE_REGULAR_BUFF: case Player_Events.GIVE_REGULAR_BUFF: