战斗动画
This commit is contained in:
parent
c0617ac80f
commit
77ca6530cc
@ -284,10 +284,11 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
},
|
},
|
||||||
"afterBattle": function (enemyId, x, y) {
|
"afterBattle": function (enemyId, x, y) {
|
||||||
// 战斗结束后触发的事件
|
// 战斗结束后触发的事件
|
||||||
|
// 获得战斗伤害信息
|
||||||
var enemy = core.material.enemys[enemyId];
|
var damageInfo = core.getDamageInfo(enemyId, null, x, y) || {};
|
||||||
|
var enemy = damageInfo.enemyInfo;
|
||||||
var special = enemy.special;
|
var special = enemy.special;
|
||||||
|
console.log(enemy)
|
||||||
// 播放战斗音效和动画
|
// 播放战斗音效和动画
|
||||||
// 默认播放的动画;你也可以使用
|
// 默认播放的动画;你也可以使用
|
||||||
var animate = "hand"; // 默认动画
|
var animate = "hand"; // 默认动画
|
||||||
@ -306,8 +307,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
if (x != null && y != null) core.drawAnimate(animate, x, y);
|
if (x != null && y != null) core.drawAnimate(animate, x, y);
|
||||||
else core.drawHeroAnimate(animate);
|
else core.drawHeroAnimate(animate);
|
||||||
|
|
||||||
// 获得战斗伤害信息
|
|
||||||
var damageInfo = core.getDamageInfo(enemyId, null, x, y) || {};
|
|
||||||
// 战斗伤害
|
// 战斗伤害
|
||||||
var damage = damageInfo.damage;
|
var damage = damageInfo.damage;
|
||||||
// 当前战斗回合数,可用于战后所需的判定
|
// 当前战斗回合数,可用于战后所需的判定
|
||||||
@ -757,7 +757,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
hero_def = core.getRealStatusOrDefault(hero, "def"),
|
hero_def = core.getRealStatusOrDefault(hero, "def"),
|
||||||
hero_mdef = core.getRealStatusOrDefault(hero, "mdef"),
|
hero_mdef = core.getRealStatusOrDefault(hero, "mdef"),
|
||||||
hero_speed = core.getRealStatusOrDefault(hero, "speed");
|
hero_speed = core.getRealStatusOrDefault(hero, "speed");
|
||||||
|
var mon_id = core.getEnemyValue(enemy, "id", x, y, floorId),
|
||||||
|
mon_name = core.getEnemyValue(enemy, "name", x, y, floorId);
|
||||||
var mon_hp = core.getEnemyValue(enemy, "hp", x, y, floorId),
|
var mon_hp = core.getEnemyValue(enemy, "hp", x, y, floorId),
|
||||||
mon_atk = core.getEnemyValue(enemy, "atk", x, y, floorId),
|
mon_atk = core.getEnemyValue(enemy, "atk", x, y, floorId),
|
||||||
mon_def = core.getEnemyValue(enemy, "def", x, y, floorId),
|
mon_def = core.getEnemyValue(enemy, "def", x, y, floorId),
|
||||||
@ -877,6 +878,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
// 也可以按需增加各种自定义内容
|
// 也可以按需增加各种自定义内容
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
id: mon_id,
|
||||||
|
name: mon_name,
|
||||||
hp: Math.floor(mon_hp),
|
hp: Math.floor(mon_hp),
|
||||||
atk: Math.floor(mon_atk),
|
atk: Math.floor(mon_atk),
|
||||||
def: Math.floor(mon_def),
|
def: Math.floor(mon_def),
|
||||||
@ -1135,6 +1138,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
turn: Math.floor(hero_turn),
|
turn: Math.floor(hero_turn),
|
||||||
mon_turn: Math.floor(mon_turn),
|
mon_turn: Math.floor(mon_turn),
|
||||||
damage: Math.floor(damage),
|
damage: Math.floor(damage),
|
||||||
|
enemyInfo: enemyInfo
|
||||||
};
|
};
|
||||||
/*TODO:怪物手册的修改(需要修改这里return的内容以及一些战后判断)
|
/*TODO:怪物手册的修改(需要修改这里return的内容以及一些战后判断)
|
||||||
1. 显示怪物是魔攻还是物攻(在怪物名字上做颜色变化,物攻是黄色,魔攻是蓝色)
|
1. 显示怪物是魔攻还是物攻(在怪物名字上做颜色变化,物攻是黄色,魔攻是蓝色)
|
||||||
|
5211
project/plugins.js
5211
project/plugins.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user