bugfix
This commit is contained in:
parent
145223db7b
commit
b13136d34d
|
@ -43,6 +43,8 @@ window.noname_update={
|
||||||
'game/pinyinjs.js',
|
'game/pinyinjs.js',
|
||||||
'game/vue.esm-browser.js',
|
'game/vue.esm-browser.js',
|
||||||
|
|
||||||
|
'layout/default/layout.css',
|
||||||
|
|
||||||
'mode/boss.js',
|
'mode/boss.js',
|
||||||
'mode/versus.js',
|
'mode/versus.js',
|
||||||
|
|
||||||
|
|
|
@ -2890,35 +2890,40 @@ export const Content = {
|
||||||
},
|
},
|
||||||
phaseUse: function () {
|
phaseUse: function () {
|
||||||
"step 0";
|
"step 0";
|
||||||
|
const stat = player.getStat();
|
||||||
|
for (let i in stat.skill) {
|
||||||
|
let bool = false;
|
||||||
|
const info = lib.skill[i];
|
||||||
|
if (!info) continue;
|
||||||
|
if (info.enable != undefined) {
|
||||||
|
if (typeof info.enable == 'string' && info.enable == 'phaseUse') bool = true;
|
||||||
|
else if (typeof info.enable == 'object' && info.enable.includes('phaseUse')) bool = true;
|
||||||
|
}
|
||||||
|
if (bool) stat.skill[i] = 0;
|
||||||
|
}
|
||||||
|
for (let i in stat.card) {
|
||||||
|
let bool = false;
|
||||||
|
const info = lib.card[i];
|
||||||
|
if (!info) continue;
|
||||||
|
if (info.updateUsable == 'phaseUse') stat.card[i] = 0;
|
||||||
|
}
|
||||||
|
"step 1";
|
||||||
|
event.trigger('phaseUseBefore');
|
||||||
|
"step 2";
|
||||||
|
event.trigger('phaseUseBegin');
|
||||||
|
"step 3";
|
||||||
if (!event.logged) {
|
if (!event.logged) {
|
||||||
game.log(player, '进入了出牌阶段');
|
game.log(player, '进入了出牌阶段');
|
||||||
event.logged = true;
|
event.logged = true;
|
||||||
const stat = player.getStat();
|
|
||||||
for (let i in stat.skill) {
|
|
||||||
let bool = false;
|
|
||||||
const info = lib.skill[i];
|
|
||||||
if (!info) continue;
|
|
||||||
if (info.enable != undefined) {
|
|
||||||
if (typeof info.enable == 'string' && info.enable == 'phaseUse') bool = true;
|
|
||||||
else if (typeof info.enable == 'object' && info.enable.includes('phaseUse')) bool = true;
|
|
||||||
}
|
|
||||||
if (bool) stat.skill[i] = 0;
|
|
||||||
}
|
|
||||||
for (let i in stat.card) {
|
|
||||||
let bool = false;
|
|
||||||
const info = lib.card[i];
|
|
||||||
if (!info) continue;
|
|
||||||
if (info.updateUsable == 'phaseUse') stat.card[i] = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
var next = player.chooseToUse();
|
var next = player.chooseToUse();
|
||||||
if (!lib.config.show_phaseuse_prompt) {
|
if (!lib.config.show_phaseuse_prompt) {
|
||||||
next.set('prompt', false);
|
next.set('prompt', false);
|
||||||
}
|
}
|
||||||
next.set('type', 'phase');
|
next.set('type', 'phase');
|
||||||
"step 1";
|
"step 4";
|
||||||
if (result.bool && !event.skipped) {
|
if (result.bool && !event.skipped) {
|
||||||
event.goto(0);
|
event.goto(3);
|
||||||
}
|
}
|
||||||
game.broadcastAll(function () {
|
game.broadcastAll(function () {
|
||||||
if (ui.tempnowuxie) {
|
if (ui.tempnowuxie) {
|
||||||
|
@ -2926,6 +2931,10 @@ export const Content = {
|
||||||
delete ui.tempnowuxie;
|
delete ui.tempnowuxie;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
"step 5";
|
||||||
|
event.trigger('phaseUseEnd');
|
||||||
|
"step 6";
|
||||||
|
event.trigger('phaseUseAfter');
|
||||||
},
|
},
|
||||||
phaseDiscard: function () {
|
phaseDiscard: function () {
|
||||||
"step 0";
|
"step 0";
|
||||||
|
|
|
@ -2365,6 +2365,31 @@ export class Player extends HTMLDivElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
changeSkinByName(character, index){
|
||||||
|
const name = (index == 2 ? 'name2' : 'name');
|
||||||
|
const list = lib.characterSubstitute[this[name]];
|
||||||
|
if (list && lib.characterSubstitute[this[name]]) {
|
||||||
|
const origin = this.skin[name];
|
||||||
|
game.broadcastAll((player, name, character, list, origin) => {
|
||||||
|
player.tempname.remove(origin);
|
||||||
|
player.tempname.add(character);
|
||||||
|
player.skin[name] = character;
|
||||||
|
const goon = (!lib.character[character]);
|
||||||
|
if (goon) lib.character[character] = ['', '', 0, [], (list.find(i => i[0] == character) || [character, []])[1]];
|
||||||
|
player.smoothAvatar(name == 'name2');
|
||||||
|
player.node['avatar' + name.slice(4)].setBackground(character, 'character');
|
||||||
|
player.node['avatar' + name.slice(4)].show();
|
||||||
|
if (goon) delete lib.character[character];
|
||||||
|
}, this, name, character, list, origin);
|
||||||
|
game.addVideo('changeSkin', this, {
|
||||||
|
from: origin,
|
||||||
|
to: character,
|
||||||
|
name: name,
|
||||||
|
list: list,
|
||||||
|
avatar2: name == 'name2',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
initOL(name, character) {
|
initOL(name, character) {
|
||||||
this.node.avatar.setBackground(character, 'character');
|
this.node.avatar.setBackground(character, 'character');
|
||||||
this.node.avatar.show();
|
this.node.avatar.show();
|
||||||
|
@ -3949,7 +3974,7 @@ export class Player extends HTMLDivElement {
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
phaseUse() {
|
phaseUse() {
|
||||||
var next = game.createEvent('phaseUse');
|
var next = game.createEvent('phaseUse', false);
|
||||||
next.player = this;
|
next.player = this;
|
||||||
next.setContent('phaseUse');
|
next.setContent('phaseUse');
|
||||||
return next;
|
return next;
|
||||||
|
|
Loading…
Reference in New Issue