Merge remote-tracking branch 'github/master'
This commit is contained in:
commit
623b598b31
BIN
dist/shattered_sword_assets/images/bleeding.png
vendored
BIN
dist/shattered_sword_assets/images/bleeding.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 250 B |
BIN
dist/shattered_sword_assets/images/burning.png
vendored
BIN
dist/shattered_sword_assets/images/burning.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 248 B |
BIN
dist/shattered_sword_assets/images/poisoning.png
vendored
BIN
dist/shattered_sword_assets/images/poisoning.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 290 B |
|
@ -41,6 +41,9 @@ export default class BattleManager {
|
|||
if(player.hasDoubleStrike){
|
||||
enemy.damage(weapon.type.damage * (<PlayerController>this.players[0]).CURRENT_ATK/200);
|
||||
}
|
||||
if(player.hasLifesteal){
|
||||
player.addHealth(weapon.type.damage * player.CURRENT_ATK/100 * player.lifestealratio);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -450,7 +450,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA
|
|||
this.hasBleed = true;
|
||||
break;
|
||||
case BuffType.BURN:
|
||||
this.hasBleed = true;
|
||||
this.hasBurn = true;
|
||||
break;
|
||||
case BuffType.POISON:
|
||||
this.hasPoison = true;
|
||||
|
|
|
@ -108,11 +108,11 @@ export default class GameLevel extends Scene {
|
|||
//buffs layer
|
||||
buffLayer: Layer;
|
||||
buffButton1 : Button;
|
||||
buffLabel1 : Label;
|
||||
buffButton2 : Button;
|
||||
buffLabel2 : Label;
|
||||
buffButton3 : Button;
|
||||
buffLable1: Label;
|
||||
buffLable2: Label;
|
||||
buffLable3: Label;
|
||||
buffLabel3: Label;
|
||||
buffs: Array<Buff>;
|
||||
|
||||
//pause layer
|
||||
|
@ -271,24 +271,26 @@ export default class GameLevel extends Scene {
|
|||
case Player_Events.GIVE_BUFF:
|
||||
this.buffs = (<PlayerController>this.player._ai).generateBuffs();
|
||||
if(this.buffs[0].string !== undefined){
|
||||
this.buffButton1.text = this.buffs[0].string;
|
||||
//this.buffButton1.text = this.buffs[0].string;
|
||||
this.buffLabel1.text = this.buffs[0].string;
|
||||
}
|
||||
else{
|
||||
this.buffButton1.text = "Increase "+this.buffs[0].type + " by "+this.buffs[0].value;
|
||||
//this.buffButton1.text = "Increase "+this.buffs[0].type + " by "+this.buffs[0].value;
|
||||
this.buffLabel1.text = "Increase "+this.buffs[0].type + " by "+this.buffs[0].value;
|
||||
}
|
||||
|
||||
if(this.buffs[1].string !== undefined){
|
||||
this.buffButton2.text = this.buffs[1].string;
|
||||
this.buffLabel2.text = this.buffs[1].string;
|
||||
}
|
||||
else{
|
||||
this.buffButton2.text = "Increase "+this.buffs[1].type + " by "+this.buffs[1].value;
|
||||
this.buffLabel2.text = "Increase "+this.buffs[1].type + " by "+this.buffs[1].value;
|
||||
}
|
||||
|
||||
if(this.buffs[2].string !== undefined){
|
||||
this.buffButton3.text = this.buffs[2].string;
|
||||
this.buffLabel3.text = this.buffs[2].string;
|
||||
}
|
||||
else{
|
||||
this.buffButton3.text = "Increase "+this.buffs[2].type + " by "+this.buffs[2].value;
|
||||
this.buffLabel3.text = "Increase "+this.buffs[2].type + " by "+this.buffs[2].value;
|
||||
}
|
||||
|
||||
//pause game here
|
||||
|
@ -613,7 +615,7 @@ export default class GameLevel extends Scene {
|
|||
//TODO -
|
||||
//determine button location
|
||||
this.buffButton1 = <Button>this.add.uiElement(UIElementType.BUTTON, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x*2/3-180/2), Math.floor(this.viewport.getHalfSize().y)),text:""});
|
||||
this.buffLable1 = <Label>this.add.uiElement(UIElementType.LABEL, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x*2/3-180/2), Math.floor(this.viewport.getHalfSize().y)-30),text:"a testing text lable \naaaaaaaaaaaaaaaaaaaaaaaaaaaa"})
|
||||
this.buffLabel1 = <Label>this.add.uiElement(UIElementType.LABEL, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x*2/3-180/2), Math.floor(this.viewport.getHalfSize().y)-30),text:"a testing text lable \naaaaaaaaaaaaaaaaaaaaaaaaaaaa"})
|
||||
this.buffButton1.size.set(180,200);
|
||||
this.buffButton1.borderWidth = 5;
|
||||
this.buffButton1.borderColor = Color.RED;
|
||||
|
@ -621,9 +623,10 @@ export default class GameLevel extends Scene {
|
|||
this.buffButton1.textColor = Color.BLACK;
|
||||
this.buffButton1.onClickEventId = "buff1";
|
||||
this.buffButton1.fontSize = 20;
|
||||
this.buffLabel1 = <Label>this.add.uiElement(UIElementType.LABEL, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x*2/3-180/2), Math.floor(this.viewport.getHalfSize().y)),text:"buffLabel1"});
|
||||
|
||||
|
||||
this.buffButton2 = <Button>this.add.uiElement(UIElementType.BUTTON, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x), Math.floor(this.viewport.getHalfSize().y)),text:"buffButton1"});
|
||||
this.buffButton2 = <Button>this.add.uiElement(UIElementType.BUTTON, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x), Math.floor(this.viewport.getHalfSize().y)),text:""});
|
||||
this.buffButton2.size.set(180,200);
|
||||
this.buffButton2.borderWidth = 5;
|
||||
this.buffButton2.borderColor = Color.RED;
|
||||
|
@ -631,8 +634,10 @@ export default class GameLevel extends Scene {
|
|||
this.buffButton2.textColor = Color.BLACK;
|
||||
this.buffButton2.onClickEventId = "buff2";
|
||||
this.buffButton2.fontSize = 20;
|
||||
this.buffLabel2 = <Label>this.add.uiElement(UIElementType.LABEL, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x), Math.floor(this.viewport.getHalfSize().y)),text:"buffLabel2"});
|
||||
|
||||
this.buffButton3 = <Button>this.add.uiElement(UIElementType.BUTTON, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x*4/3+180/2), Math.floor(this.viewport.getHalfSize().y)), text:"buffButton1"});
|
||||
|
||||
this.buffButton3 = <Button>this.add.uiElement(UIElementType.BUTTON, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x*4/3+180/2), Math.floor(this.viewport.getHalfSize().y)), text:""});
|
||||
this.buffButton3.size.set(180,200);
|
||||
this.buffButton3.borderWidth = 5;
|
||||
this.buffButton3.borderColor = Color.RED;
|
||||
|
@ -640,6 +645,8 @@ export default class GameLevel extends Scene {
|
|||
this.buffButton3.textColor = Color.BLACK;
|
||||
this.buffButton3.onClickEventId = "buff3";
|
||||
this.buffButton3.fontSize = 20;
|
||||
this.buffLabel3 = <Label>this.add.uiElement(UIElementType.LABEL, "buffLayer", {position: new Vec2(Math.floor(this.viewport.getHalfSize().x*4/3+180/2), Math.floor(this.viewport.getHalfSize().y)), text:"buffLabel3"});
|
||||
|
||||
|
||||
this.buffs = (<PlayerController>this.player._ai).generateBuffs();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user