Compare commits
No commits in common. "67d75b4ef303b05f414ac080035b0101fe2a6d81" and "3bd0b2eec982c593ec9151803c34c733535e92f0" have entirely different histories.
67d75b4ef3
...
3bd0b2eec9
project
@ -417,7 +417,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"baofa",
|
||||
"daizhi",
|
||||
"daji",
|
||||
"daji_bai",
|
||||
"dajian",
|
||||
"daluoleitian",
|
||||
"daluoleitianhong",
|
||||
|
@ -55,8 +55,15 @@ main.floors.MT9=
|
||||
"function": "function(){\ncore.Confirmskip_On();\n}"
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": "function(){\ncore.moveHidingBlock(9,3,[\"right:3\"],500,0);\n}"
|
||||
"type": "move",
|
||||
"loc": [
|
||||
9,
|
||||
3
|
||||
],
|
||||
"time": 500,
|
||||
"steps": [
|
||||
"right:3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "showImage2",
|
||||
@ -135,7 +142,7 @@ main.floors.MT9=
|
||||
},
|
||||
{
|
||||
"type": "animate",
|
||||
"name": "han",
|
||||
"name": "hanyou",
|
||||
"loc": [
|
||||
8,
|
||||
3
|
||||
@ -178,8 +185,15 @@ main.floors.MT9=
|
||||
"time": 500
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": "function(){\ncore.moveHidingBlock(8,3,[\"right:4\"],500,0);\n}"
|
||||
"type": "move",
|
||||
"loc": [
|
||||
8,
|
||||
3
|
||||
],
|
||||
"time": 500,
|
||||
"steps": [
|
||||
"right:4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
|
@ -75,8 +75,8 @@ main.floors.QISHI=
|
||||
],
|
||||
"text": [
|
||||
255,
|
||||
128,
|
||||
255,
|
||||
0,
|
||||
244,
|
||||
1
|
||||
],
|
||||
"background": "winskin.png",
|
||||
|
@ -257,74 +257,74 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
return true;
|
||||
},
|
||||
"afterBattle": function (enemyId, x, y) {
|
||||
// 战斗结束后触发的事件
|
||||
// 战斗结束后触发的事件
|
||||
|
||||
var enemy = core.material.enemys[enemyId];
|
||||
var special = enemy.special;
|
||||
var enemy = core.material.enemys[enemyId];
|
||||
var special = enemy.special;
|
||||
|
||||
// 播放战斗音效和动画
|
||||
// 默认播放的动画;你也可以使用
|
||||
var animate = 'daji_bai'; // 默认动画
|
||||
// 检查当前装备是否存在攻击动画
|
||||
var equipId = core.getEquip(0);
|
||||
if (equipId && (core.material.items[equipId].equip || {}).animate)
|
||||
animate = core.material.items[equipId].equip.animate;
|
||||
// 你也可以在这里根据自己的需要,比如enemyId或special或flag来修改播放的动画效果
|
||||
// if (enemyId == '...') animate = '...';
|
||||
// 播放战斗音效和动画
|
||||
// 默认播放的动画;你也可以使用
|
||||
var animate = 'hand'; // 默认动画
|
||||
// 检查当前装备是否存在攻击动画
|
||||
var equipId = core.getEquip(0);
|
||||
if (equipId && (core.material.items[equipId].equip || {}).animate)
|
||||
animate = core.material.items[equipId].equip.animate;
|
||||
// 你也可以在这里根据自己的需要,比如enemyId或special或flag来修改播放的动画效果
|
||||
// if (enemyId == '...') animate = '...';
|
||||
|
||||
// 检查该动画是否存在SE,如果不存在则使用默认音效
|
||||
if (!(core.material.animates[animate] || {}).se)
|
||||
core.playSound('attack.mp3');
|
||||
// 检查该动画是否存在SE,如果不存在则使用默认音效
|
||||
if (!(core.material.animates[animate] || {}).se)
|
||||
core.playSound('attack.mp3');
|
||||
|
||||
// 播放动画;如果不存在坐标(强制战斗)则播放到勇士自身
|
||||
if (x != null && y != null)
|
||||
core.drawAnimate(animate, x, y);
|
||||
else
|
||||
core.drawHeroAnimate(animate);
|
||||
// 播放动画;如果不存在坐标(强制战斗)则播放到勇士自身
|
||||
if (x != null && y != null)
|
||||
core.drawAnimate(animate, x, y);
|
||||
else
|
||||
core.drawHeroAnimate(animate);
|
||||
|
||||
// 获得战斗伤害信息
|
||||
var damageInfo = core.getDamageInfo(enemyId, null, x, y) || {};
|
||||
// 战斗伤害
|
||||
var damage = damageInfo.damage;
|
||||
// 当前战斗回合数,可用于战后所需的判定
|
||||
var turn = damageInfo.turn;
|
||||
// 判定是否致死
|
||||
if (damage == null || damage >= core.status.hero.hp) {
|
||||
core.status.hero.hp = 0;
|
||||
core.updateStatusBar(false, true);
|
||||
core.events.lose('战斗失败');
|
||||
return;
|
||||
}
|
||||
// 获得战斗伤害信息
|
||||
var damageInfo = core.getDamageInfo(enemyId, null, x, y) || {};
|
||||
// 战斗伤害
|
||||
var damage = damageInfo.damage;
|
||||
// 当前战斗回合数,可用于战后所需的判定
|
||||
var turn = damageInfo.turn;
|
||||
// 判定是否致死
|
||||
if (damage == null || damage >= core.status.hero.hp) {
|
||||
core.status.hero.hp = 0;
|
||||
core.updateStatusBar(false, true);
|
||||
core.events.lose('战斗失败');
|
||||
return;
|
||||
}
|
||||
|
||||
// 扣减体力值并记录统计数据
|
||||
core.status.hero.hp -= damage;
|
||||
core.status.hero.statistics.battleDamage += damage;
|
||||
core.status.hero.statistics.battle++;
|
||||
// 扣减体力值并记录统计数据
|
||||
core.status.hero.hp -= damage;
|
||||
core.status.hero.statistics.battleDamage += damage;
|
||||
core.status.hero.statistics.battle++;
|
||||
|
||||
// 计算当前怪物的支援怪物
|
||||
var guards = [];
|
||||
if (x != null && y != null) {
|
||||
guards = core.getFlag("__guards__" + x + "_" + y, []);
|
||||
core.removeFlag("__guards__" + x + "_" + y);
|
||||
}
|
||||
// 计算当前怪物的支援怪物
|
||||
var guards = [];
|
||||
if (x != null && y != null) {
|
||||
guards = core.getFlag("__guards__" + x + "_" + y, []);
|
||||
core.removeFlag("__guards__" + x + "_" + y);
|
||||
}
|
||||
|
||||
core.status.hero.mdef += [20, 3, 2, 1, 0, 20][core.getFlag('hard', 0)];
|
||||
// 获得金币
|
||||
var money = guards.reduce(function (curr, g) {
|
||||
return curr + core.material.enemys[g[2]].money;
|
||||
}, core.getEnemyValue(enemy, "money", x, y));
|
||||
if (core.hasItem('coin')) money *= 2; // 幸运金币:双倍
|
||||
if (core.hasFlag('curse')) money = 0; // 诅咒效果
|
||||
core.status.hero.money += money;
|
||||
core.status.hero.statistics.money += money;
|
||||
core.status.hero.mdef += [20, 3, 2, 1, 0, 20][core.getFlag('hard', 0)];
|
||||
// 获得金币
|
||||
var money = guards.reduce(function (curr, g) {
|
||||
return curr + core.material.enemys[g[2]].money;
|
||||
}, core.getEnemyValue(enemy, "money", x, y));
|
||||
if (core.hasItem('coin')) money *= 2; // 幸运金币:双倍
|
||||
if (core.hasFlag('curse')) money = 0; // 诅咒效果
|
||||
core.status.hero.money += money;
|
||||
core.status.hero.statistics.money += money;
|
||||
|
||||
// 获得经验
|
||||
var exp = guards.reduce(function (curr, g) {
|
||||
return curr + core.material.enemys[g[2]].exp;
|
||||
}, core.getEnemyValue(enemy, "exp", x, y));
|
||||
if (core.hasFlag('curse')) exp = 0;
|
||||
core.status.hero.exp += exp;
|
||||
core.status.hero.statistics.exp += exp;
|
||||
// 获得经验
|
||||
var exp = guards.reduce(function (curr, g) {
|
||||
return curr + core.material.enemys[g[2]].exp;
|
||||
}, core.getEnemyValue(enemy, "exp", x, y));
|
||||
if (core.hasFlag('curse')) exp = 0;
|
||||
core.status.hero.exp += exp;
|
||||
core.status.hero.statistics.exp += exp;
|
||||
|
||||
var hint = "打败 " + core.getEnemyValue(enemy, "name", x, y);
|
||||
if (core.flags.statusBarItems.indexOf('enableMoney') >= 0)
|
||||
@ -333,101 +333,101 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
hint += ',' + core.getStatusLabel('exp') + '+' + exp; // hint += ",经验+" + exp;
|
||||
if (!core.getFlag("isNoTip")) core.drawTip(hint, enemy.id);
|
||||
|
||||
// 中毒
|
||||
if (core.enemys.hasSpecial(special, 12)) {
|
||||
core.triggerDebuff('get', 'poison');
|
||||
}
|
||||
// 衰弱
|
||||
if (core.enemys.hasSpecial(special, 13)) {
|
||||
core.triggerDebuff('get', 'weak');
|
||||
}
|
||||
// 诅咒
|
||||
if (core.enemys.hasSpecial(special, 14)) {
|
||||
core.triggerDebuff('get', 'curse');
|
||||
}
|
||||
// 仇恨怪物将仇恨值减半
|
||||
if (core.enemys.hasSpecial(special, 17)) {
|
||||
core.setFlag('hatred', Math.floor(core.getFlag('hatred', 0) / 2));
|
||||
}
|
||||
// 自爆
|
||||
if (core.enemys.hasSpecial(special, 19)) {
|
||||
core.status.hero.statistics.battleDamage += core.status.hero.hp - 1;
|
||||
core.status.hero.hp = 1;
|
||||
}
|
||||
// 退化
|
||||
if (core.enemys.hasSpecial(special, 21)) {
|
||||
core.status.hero.atk -= (enemy.atkValue || 0);
|
||||
core.status.hero.def -= (enemy.defValue || 0);
|
||||
if (core.status.hero.atk < 0) core.status.hero.atk = 0;
|
||||
if (core.status.hero.def < 0) core.status.hero.def = 0;
|
||||
}
|
||||
// 增加仇恨值
|
||||
core.setFlag('hatred', core.getFlag('hatred', 0) + core.values.hatred);
|
||||
// 中毒
|
||||
if (core.enemys.hasSpecial(special, 12)) {
|
||||
core.triggerDebuff('get', 'poison');
|
||||
}
|
||||
// 衰弱
|
||||
if (core.enemys.hasSpecial(special, 13)) {
|
||||
core.triggerDebuff('get', 'weak');
|
||||
}
|
||||
// 诅咒
|
||||
if (core.enemys.hasSpecial(special, 14)) {
|
||||
core.triggerDebuff('get', 'curse');
|
||||
}
|
||||
// 仇恨怪物将仇恨值减半
|
||||
if (core.enemys.hasSpecial(special, 17)) {
|
||||
core.setFlag('hatred', Math.floor(core.getFlag('hatred', 0) / 2));
|
||||
}
|
||||
// 自爆
|
||||
if (core.enemys.hasSpecial(special, 19)) {
|
||||
core.status.hero.statistics.battleDamage += core.status.hero.hp - 1;
|
||||
core.status.hero.hp = 1;
|
||||
}
|
||||
// 退化
|
||||
if (core.enemys.hasSpecial(special, 21)) {
|
||||
core.status.hero.atk -= (enemy.atkValue || 0);
|
||||
core.status.hero.def -= (enemy.defValue || 0);
|
||||
if (core.status.hero.atk < 0) core.status.hero.atk = 0;
|
||||
if (core.status.hero.def < 0) core.status.hero.def = 0;
|
||||
}
|
||||
// 增加仇恨值
|
||||
core.setFlag('hatred', core.getFlag('hatred', 0) + core.values.hatred);
|
||||
|
||||
// 战后的技能处理,比如扣除魔力值
|
||||
if (core.flags.statusBarItems.indexOf('enableSkill') >= 0) {
|
||||
// 检测当前开启的技能类型
|
||||
var skill = core.getFlag('skill', 0);
|
||||
if (skill == 1) { // 技能1:二倍斩
|
||||
core.status.hero.mana -= 5; // 扣除5点魔力值
|
||||
}
|
||||
// 关闭技能
|
||||
core.setFlag('skill', 0);
|
||||
core.setFlag('skillName', '无');
|
||||
}
|
||||
core.addPop(x * 32, y * 32, core.getBlockId(x, y));
|
||||
// 战后的技能处理,比如扣除魔力值
|
||||
if (core.flags.statusBarItems.indexOf('enableSkill') >= 0) {
|
||||
// 检测当前开启的技能类型
|
||||
var skill = core.getFlag('skill', 0);
|
||||
if (skill == 1) { // 技能1:二倍斩
|
||||
core.status.hero.mana -= 5; // 扣除5点魔力值
|
||||
}
|
||||
// 关闭技能
|
||||
core.setFlag('skill', 0);
|
||||
core.setFlag('skillName', '无');
|
||||
}
|
||||
|
||||
// 事件的处理
|
||||
var todo = [];
|
||||
|
||||
// 加点事件
|
||||
var point = guards.reduce(function (curr, g) {
|
||||
return curr + core.material.enemys[g[2]].point;
|
||||
}, core.getEnemyValue(enemy, "point", x, y)) || 0;
|
||||
if (core.flags.enableAddPoint && point > 0) {
|
||||
core.push(todo, [{ "type": "insert", "name": "加点事件", "args": [point] }]);
|
||||
}
|
||||
// 事件的处理
|
||||
var todo = [];
|
||||
|
||||
// 战后事件
|
||||
if (core.status.floorId != null) {
|
||||
core.push(todo, core.floors[core.status.floorId].afterBattle[x + "," + y]);
|
||||
}
|
||||
core.push(todo, enemy.afterBattle);
|
||||
// 加点事件
|
||||
var point = guards.reduce(function (curr, g) {
|
||||
return curr + core.material.enemys[g[2]].point;
|
||||
}, core.getEnemyValue(enemy, "point", x, y)) || 0;
|
||||
if (core.flags.enableAddPoint && point > 0) {
|
||||
core.push(todo, [{ "type": "insert", "name": "加点事件", "args": [point] }]);
|
||||
}
|
||||
|
||||
// 在这里增加其他的自定义事件需求
|
||||
/*
|
||||
if (enemyId=='xxx') {
|
||||
core.push(todo, [
|
||||
{"type": "...", ...},
|
||||
]);
|
||||
}
|
||||
*/
|
||||
// 战后事件
|
||||
if (core.status.floorId != null) {
|
||||
core.push(todo, core.floors[core.status.floorId].afterBattle[x + "," + y]);
|
||||
}
|
||||
core.push(todo, enemy.afterBattle);
|
||||
|
||||
// 如果事件不为空,将其插入
|
||||
if (todo.length > 0) core.insertAction(todo, x, y);
|
||||
// 在这里增加其他的自定义事件需求
|
||||
/*
|
||||
if (enemyId=='xxx') {
|
||||
core.push(todo, [
|
||||
{"type": "...", ...},
|
||||
]);
|
||||
}
|
||||
*/
|
||||
|
||||
// 删除该点设置的怪物信息
|
||||
delete((flags.enemyOnPoint || {})[core.status.floorId] || {})[x + "," + y];
|
||||
// 如果事件不为空,将其插入
|
||||
if (todo.length > 0) core.insertAction(todo, x, y);
|
||||
|
||||
// 因为removeBlock和hideBlock都会刷新状态栏,因此将删除部分移动到这里并保证刷新只执行一次,以提升效率
|
||||
if (core.getBlock(x, y) != null) {
|
||||
// 检查是否是重生怪物;如果是则仅隐藏不删除
|
||||
if (core.hasSpecial(enemy.special, 23)) {
|
||||
core.hideBlock(x, y);
|
||||
} else {
|
||||
core.removeBlock(x, y);
|
||||
}
|
||||
} else {
|
||||
core.updateStatusBar();
|
||||
}
|
||||
// 删除该点设置的怪物信息
|
||||
delete ((flags.enemyOnPoint || {})[core.status.floorId] || {})[x + "," + y];
|
||||
|
||||
// 如果已有事件正在处理中
|
||||
if (core.status.event.id == null)
|
||||
core.continueAutomaticRoute();
|
||||
else
|
||||
core.clearContinueAutomaticRoute();
|
||||
// 因为removeBlock和hideBlock都会刷新状态栏,因此将删除部分移动到这里并保证刷新只执行一次,以提升效率
|
||||
if (core.getBlock(x, y) != null) {
|
||||
// 检查是否是重生怪物;如果是则仅隐藏不删除
|
||||
if (core.hasSpecial(enemy.special, 23)) {
|
||||
core.hideBlock(x, y);
|
||||
} else {
|
||||
core.removeBlock(x, y);
|
||||
}
|
||||
} else {
|
||||
core.updateStatusBar();
|
||||
}
|
||||
|
||||
},
|
||||
// 如果已有事件正在处理中
|
||||
if (core.status.event.id == null)
|
||||
core.continueAutomaticRoute();
|
||||
else
|
||||
core.clearContinueAutomaticRoute();
|
||||
|
||||
},
|
||||
"afterOpenDoor": function (doorId, x, y) {
|
||||
// 开一个门后触发的事件
|
||||
|
||||
@ -450,29 +450,27 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
core.clearContinueAutomaticRoute();
|
||||
},
|
||||
"afterGetItem": function (itemId, x, y, isGentleClick) {
|
||||
// 获得一个道具后触发的事件
|
||||
// itemId:获得的道具ID;x和y是该道具所在的坐标
|
||||
// isGentleClick:是否是轻按触发的
|
||||
if (itemId.endsWith('Potion') && core.material.items[itemId].cls == 'items')
|
||||
core.playSound('回血');
|
||||
else if (itemId.endsWith('Gem') && core.material.items[itemId].cls == 'items')
|
||||
core.playSound('宝石')
|
||||
else
|
||||
core.playSound('获得道具');
|
||||
// 获得一个道具后触发的事件
|
||||
// itemId:获得的道具ID;x和y是该道具所在的坐标
|
||||
// isGentleClick:是否是轻按触发的
|
||||
if (itemId.endsWith('Potion') && core.material.items[itemId].cls == 'items')
|
||||
core.playSound('回血');
|
||||
else if (itemId.endsWith('Gem') && core.material.items[itemId].cls == 'items')
|
||||
core.playSound('宝石')
|
||||
else
|
||||
core.playSound('获得道具');
|
||||
|
||||
var todo = [];
|
||||
// 检查该点的获得道具后事件。
|
||||
if (core.status.floorId == null) return;
|
||||
var event = core.floors[core.status.floorId].afterGetItem[x + "," + y];
|
||||
if (event && (event instanceof Array || !isGentleClick || !event.disableOnGentleClick)) {
|
||||
if (event.data) event = event.data;
|
||||
core.unshift(todo, event);
|
||||
}
|
||||
|
||||
|
||||
var todo = [];
|
||||
// 检查该点的获得道具后事件。
|
||||
if (core.status.floorId == null) return;
|
||||
var event = core.floors[core.status.floorId].afterGetItem[x + "," + y];
|
||||
if (event && (event instanceof Array || !isGentleClick || !event.disableOnGentleClick)) {
|
||||
if (event.data) event = event.data;
|
||||
core.unshift(todo, event);
|
||||
}
|
||||
|
||||
if (todo.length > 0) core.insertAction(todo, x, y);
|
||||
},
|
||||
if (todo.length > 0) core.insertAction(todo, x, y);
|
||||
},
|
||||
"afterPushBox": function () {
|
||||
// 推箱子后的事件
|
||||
if (core.searchBlock('box').length == 0) {
|
||||
@ -1655,7 +1653,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
core.ui.fillText(ctx, text, x, y, style);
|
||||
},
|
||||
fill1 = function (text, x, y, style) {
|
||||
core.ui.setFont(ctx, '14px fzchyjw');
|
||||
core.ui.setFont(ctx, '10px fzchyjw');
|
||||
core.ui.fillText(ctx, text, x, y, style);
|
||||
};
|
||||
|
||||
@ -1711,7 +1709,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
fill(core.formatBigNumber(core.status.hero.money), 107, 91 + 35 + 36 + 34 + 32, '#000000');
|
||||
fill(core.getFlag("juqing", 0), 107, 91 + 35 + 36 + 34 + 32 + 32, '#FF0000');
|
||||
ctx.textAlign = 'left';
|
||||
if (flags.hard - 4) fill1('[' + core.formatBigNumber(core.getRealStatus('mdef')) + ']', 72, 176, '#c800c8');
|
||||
if (flags.hard - 4) fill1('[' + core.formatBigNumber(core.getRealStatus('mdef')) + ']', 76, 174, '#FF1495');
|
||||
if (core.status.event.id !== 'book' && core.status.event.id !== 'book-detail' && core.status.event.id !== 'toolbox') {
|
||||
core.drawImage(ctx, core.material.images.items, 0, 0, 32, 128, 13, 300, 28, 112);
|
||||
fill('黄钥匙', 50, 320, '#FFFF80');
|
||||
@ -1745,7 +1743,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
//else
|
||||
fill(hour + ':' + minutes + ':' + seconds, 140, 360, "#ffffff");
|
||||
fill(step, 140, 455, '#ffffff');
|
||||
setTimeout(function () { core.ui.drawStatusBar(); }, 100);
|
||||
setTimeout(function(){core.ui.drawStatusBar();}, 100);
|
||||
}
|
||||
if (core.status.floorId == "nandu") {
|
||||
core.dom.statusCanvas.width *= 1;
|
||||
|
@ -144,9 +144,9 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"itemEffectTip": ",攻击+0"
|
||||
},
|
||||
"sword1": {
|
||||
"cls": "equips",
|
||||
"cls": "items",
|
||||
"name": "铁剑",
|
||||
"text": "得到铁剑,攻击力+10",
|
||||
"text": "一把很普通的铁剑",
|
||||
"equip": {
|
||||
"type": 0,
|
||||
"animate": "sword",
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user