Merge remote-tracking branch 'github/master'
This commit is contained in:
commit
b2505ffd48
BIN
dist/shattered_sword_assets/images/controls.png
vendored
Normal file
BIN
dist/shattered_sword_assets/images/controls.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 948 B |
BIN
dist/shattered_sword_assets/images/guide1.png
vendored
Normal file
BIN
dist/shattered_sword_assets/images/guide1.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 978 B |
BIN
dist/shattered_sword_assets/images/guide2.png
vendored
Normal file
BIN
dist/shattered_sword_assets/images/guide2.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
dist/shattered_sword_assets/images/guide3.png
vendored
Normal file
BIN
dist/shattered_sword_assets/images/guide3.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
dist/shattered_sword_assets/images/guide4.png
vendored
Normal file
BIN
dist/shattered_sword_assets/images/guide4.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
102
dist/shattered_sword_assets/jsons/level1story.json
vendored
Normal file
102
dist/shattered_sword_assets/jsons/level1story.json
vendored
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
{
|
||||||
|
"texts": [
|
||||||
|
{
|
||||||
|
"speaker": "",
|
||||||
|
"content": "Press A/LEFT to go LEFT and D/RIGHT to go right",
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"type": "loadSprite",
|
||||||
|
"key": "rightleft",
|
||||||
|
"path": "shattered_sword_assets/images/guide1.png",
|
||||||
|
"positon": [
|
||||||
|
300,
|
||||||
|
150
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"speaker": "",
|
||||||
|
"content": "Press Z or space to jump, double-click to double-jump",
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"type": "hideSprite",
|
||||||
|
"key": "rightleft"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "loadSprite",
|
||||||
|
"key": "jump",
|
||||||
|
"path": "shattered_sword_assets/images/guide2.png",
|
||||||
|
"positon": [
|
||||||
|
300,
|
||||||
|
150
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"speaker": "",
|
||||||
|
"content": "Press X to attack",
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"type": "hideSprite",
|
||||||
|
"key": "rightleft"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "loadSprite",
|
||||||
|
"key": "attack",
|
||||||
|
"path": "shattered_sword_assets/images/guide3.png",
|
||||||
|
"positon": [
|
||||||
|
300,
|
||||||
|
150
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"speaker": "",
|
||||||
|
"content": "Press C to dash",
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"type": "hideSprite",
|
||||||
|
"key": "attack"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "loadSprite",
|
||||||
|
"key": "dash",
|
||||||
|
"path": "shattered_sword_assets/images/guide4.png",
|
||||||
|
"positon": [
|
||||||
|
300,
|
||||||
|
150
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"speaker": "",
|
||||||
|
"content": "",
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"type": "hideSprite",
|
||||||
|
"key": "dash"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -216,17 +216,18 @@ export default class EnemyAI extends StateMachineAI implements BattlerAI {
|
||||||
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(5 + (<PlayerController>this.player._ai).extraDotDmg + (<PlayerController>this.player._ai).CURRENT_ATK * .2);
|
this.damage(12 + (<PlayerController>this.player._ai).extraDotDmg );
|
||||||
}
|
}
|
||||||
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(5 + (<PlayerController>this.player._ai).extraDotDmg + (<PlayerController>this.player._ai).CURRENT_ATK * .2);
|
this.damage( 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(5 + (<PlayerController>this.player._ai).extraDotDmg + (<PlayerController>this.player._ai).CURRENT_ATK * .08);
|
this.damage(3 +Math.round(this.CURRENT_HP/33) + (<PlayerController>this.player._ai).extraDotDmg );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.healthBar) {
|
if (this.healthBar) {
|
||||||
|
|
|
@ -133,17 +133,16 @@ export default class PlayerController extends StateMachineAI implements BattlerA
|
||||||
cooldownMultiplier : number = 1;
|
cooldownMultiplier : number = 1;
|
||||||
fullHpBonus: Boolean = false;
|
fullHpBonus: Boolean = false;
|
||||||
|
|
||||||
//TODO - add new buffs here
|
poisonTimer : Timer;
|
||||||
/*
|
poisonCounter : number = 0;
|
||||||
CURRENT_BUFFS: {
|
|
||||||
atk: number; //flat value to add to weapon
|
burnTimer : Timer ;
|
||||||
hp: number; //flat value
|
burnCounter : number =0;
|
||||||
def: number; //flat value
|
|
||||||
speed: number; //flat value
|
bleedTimer : Timer;
|
||||||
range:number; //range will be a multiplier value: 1.5 = 150% range
|
bleedCounter :number = 0;
|
||||||
}
|
|
||||||
*/
|
enemiesKilled : number =0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//TODO - get the correct tilemap
|
//TODO - get the correct tilemap
|
||||||
|
@ -157,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);
|
||||||
|
@ -174,6 +170,11 @@ export default class PlayerController extends StateMachineAI implements BattlerA
|
||||||
PlayerController.buffPool.push(BuffCategory.HEALTH);
|
PlayerController.buffPool.push(BuffCategory.HEALTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//initialize dot timers
|
||||||
|
this.burnTimer = new Timer(1000);
|
||||||
|
this.bleedTimer = new Timer(1000);
|
||||||
|
this.poisonTimer = new Timer(1000);
|
||||||
|
|
||||||
//to test the buffs
|
//to test the buffs
|
||||||
//this.addBuff( {type:BuffType.HEALTH, value:1} );
|
//this.addBuff( {type:BuffType.HEALTH, value:1} );
|
||||||
//this.addBuff({type:BuffType.BURN, value:1, category:BuffCategory.DOT});
|
//this.addBuff({type:BuffType.BURN, value:1, category:BuffCategory.DOT});
|
||||||
|
@ -237,6 +238,23 @@ export default class PlayerController extends StateMachineAI implements BattlerA
|
||||||
item.use(this.owner, "player", this.lookDirection);
|
item.use(this.owner, "player", this.lookDirection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//check dot effects
|
||||||
|
if(this.burnTimer.isStopped() && this.burnCounter >0){
|
||||||
|
this.burnCounter --;
|
||||||
|
this.burnTimer.start();
|
||||||
|
this.damage(5);
|
||||||
|
}
|
||||||
|
if(this.poisonTimer.isStopped() && this.poisonCounter >0){
|
||||||
|
this.poisonCounter --;
|
||||||
|
this.poisonTimer.start();
|
||||||
|
this.damage( Math.round(this.CURRENT_HP/33) );
|
||||||
|
}
|
||||||
|
if(this.bleedTimer.isStopped() && this.bleedCounter >0){
|
||||||
|
this.bleedCounter --;
|
||||||
|
this.bleedTimer.start();
|
||||||
|
this.damage( 2 + Math.round(this.CURRENT_HP/50) );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,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/10, category: BuffCategory.ATTACK},
|
{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},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -539,7 +557,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA
|
||||||
this.damage_multiplier *= (1-buff.value);
|
this.damage_multiplier *= (1-buff.value);
|
||||||
break;
|
break;
|
||||||
case BuffType.RANGE:
|
case BuffType.RANGE:
|
||||||
//this.CURRENT_BUFFS.range += buff.value;
|
|
||||||
if (item) {
|
if (item) {
|
||||||
(<Weapon>item).EXTRA_RANGE += buff.value;
|
(<Weapon>item).EXTRA_RANGE += buff.value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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:
|
||||||
|
@ -957,7 +956,7 @@ export default class GameLevel extends Scene {
|
||||||
protected playStartStory() {
|
protected playStartStory() {
|
||||||
if (!this.touchedStartCheckPoint) {
|
if (!this.touchedStartCheckPoint) {
|
||||||
this.touchedStartCheckPoint = true;
|
this.touchedStartCheckPoint = true;
|
||||||
this.storyLoader("shattered_sword_assets/jsons/story.json");
|
this.storyLoader("shattered_sword_assets/jsons/level1story.json");
|
||||||
this.startTimer();
|
this.startTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user