Merge branch 'libccy:PR-Branch' into PR-Branch
This commit is contained in:
commit
57cf0e6d0d
|
@ -11445,7 +11445,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
group:['reshuangxiong1',"reshuangxiong2"],
|
||||
},
|
||||
reshuangxiong1:{
|
||||
audio:"shuangxiong1",
|
||||
audio:"shuangxiong",
|
||||
audioname:['re_yanwen'],
|
||||
trigger:{
|
||||
player:"phaseDrawBegin1",
|
||||
|
|
|
@ -1321,31 +1321,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
const event=get.event();
|
||||
const controls=[link=>{
|
||||
const evt=get.event();
|
||||
if(link=='cancel2') ui.click.cancel();
|
||||
else{
|
||||
if(evt.dialog&&evt.dialog.buttons){
|
||||
for(let i=0;i<evt.dialog.buttons.length;i++){
|
||||
const button=evt.dialog.buttons[i];
|
||||
button.classList.remove('selectable');
|
||||
button.classList.remove('selected');
|
||||
const counterNode=button.querySelector('.caption');
|
||||
if(counterNode){
|
||||
counterNode.childNodes[0].innerHTML=``;
|
||||
}
|
||||
if(evt.dialog&&evt.dialog.buttons){
|
||||
for(let i=0;i<evt.dialog.buttons.length;i++){
|
||||
const button=evt.dialog.buttons[i];
|
||||
button.classList.remove('selectable');
|
||||
button.classList.remove('selected');
|
||||
const counterNode=button.querySelector('.caption');
|
||||
if(counterNode){
|
||||
counterNode.childNodes[0].innerHTML=``;
|
||||
}
|
||||
ui.selected.buttons.length=0;
|
||||
game.check();
|
||||
}
|
||||
return;
|
||||
ui.selected.buttons.length=0;
|
||||
game.check();
|
||||
}
|
||||
return;
|
||||
}];
|
||||
event.controls=['清除选择','cancel2'].map(control=>{
|
||||
return ui.create.control(controls.concat(control=='清除选择'?[control,'stayleft']:control));
|
||||
});
|
||||
event.controls=[ui.create.control(controls.concat(['清除选择','stayleft']))];
|
||||
};
|
||||
if(event.isMine()) func();
|
||||
else if(event.isOnline()) event.player.send(func);
|
||||
var result=yield player.chooseButton(['看破:是否记录至多'+get.cnNumber(sum)+'个牌名?',[list,'vcard']],[1,sum],true).set('ai',function(button){
|
||||
var result=yield player.chooseButton(['看破:是否记录至多'+get.cnNumber(sum)+'个牌名?',[list,'vcard']],[1,sum],false).set('ai',function(button){
|
||||
if(ui.selected.buttons.length>=Math.max(3,game.countPlayer()/2)) return 0;
|
||||
switch(button.link[2]){
|
||||
case 'wuxie':return 5+Math.random();
|
||||
|
@ -1385,7 +1380,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
if(!ui.selected.buttons.length){
|
||||
const evt=event.parent;
|
||||
if(evt.controls) evt.controls[0].hide();
|
||||
if(evt.controls) evt.controls[0].classList.add('disabled');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -1409,7 +1404,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
counterNode.style.bottom='2px';
|
||||
}
|
||||
const evt=event.parent;
|
||||
if(evt.controls) evt.controls[0].show();
|
||||
if(evt.controls) evt.controls[0].classList.remove('disabled');
|
||||
game.check();
|
||||
},
|
||||
}
|
||||
|
|
|
@ -5942,7 +5942,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
group:'shuangxiong1',
|
||||
},
|
||||
shuangxiong1:{
|
||||
audio:true,
|
||||
audio:"shuangxiong",
|
||||
audioname:['re_yanwen'],
|
||||
trigger:{player:'phaseDrawBegin1'},
|
||||
check:function(event,player){
|
||||
|
@ -5968,7 +5968,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
shuangxiong2:{
|
||||
charlotte:true,
|
||||
onremove:true,
|
||||
audio:true,
|
||||
audio:"shuangxiong",
|
||||
audioname:['re_yanwen'],
|
||||
enable:'chooseToUse',
|
||||
viewAs:{name:'juedou'},
|
||||
|
|
|
@ -26854,7 +26854,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
spolzhouxuan_info:'①弃牌阶段开始时,你可将任意张置于武将牌上,称为“旋”(你至多拥有五张“旋”)。②当你使用牌时,你随机将一张“旋”置入弃牌堆,然后摸一张牌(若你的手牌数不为全场唯一最多则额外摸X张牌,X为“旋”数)。③出牌阶段结束时,你将所有“旋”置入弃牌堆。',
|
||||
wuyan:'吾彦',
|
||||
lanjiang:'澜疆',
|
||||
lanjiang_info:'结束阶段,你可以选择所有手牌数不小于你的角色。这些角色依次选择是否令你摸一张牌。然后你可以对其中一名手牌数等于你的角色造成1点伤害,随后可以对其中一名手牌数小于你的角色摸一张牌。',
|
||||
lanjiang_info:'结束阶段,你可以选择所有手牌数不小于你的角色。这些角色依次选择是否令你摸一张牌。然后你可以对其中一名手牌数等于你的角色造成1点伤害,随后可以令其中一名手牌数小于你的角色摸一张牌。',
|
||||
ol_zhuling:'OL朱灵',
|
||||
ol_zhuling_prefix:'OL',
|
||||
jixian:'急陷',
|
||||
|
|
|
@ -1880,11 +1880,17 @@ export class Game extends Uninstantable {
|
|||
help: help,
|
||||
config: objectConfig
|
||||
}
|
||||
if (precontent) {
|
||||
_status.extension = name;
|
||||
await (gnc.is.generatorFunc(precontent) ? gnc.of(precontent) : precontent).call(object, config);
|
||||
delete _status.extension;
|
||||
try{
|
||||
if (precontent) {
|
||||
_status.extension = name;
|
||||
|
||||
await (gnc.is.generatorFunc(precontent) ? gnc.of(precontent) : precontent).call(object, config);
|
||||
delete _status.extension;
|
||||
}
|
||||
}catch(e1){
|
||||
alert(`加载《${name}》扩展的precontent时出错。\n${decodeURI(e1.stack)}`);
|
||||
}
|
||||
|
||||
if (content) lib.extensions.push([name, content, config, _status.evaluatingExtension, objectPackage || {}]);
|
||||
}
|
||||
catch (e) {
|
||||
|
|
|
@ -587,7 +587,11 @@ export async function onload(resetGameTimeout) {
|
|||
_status.extension = lib.extensions[i][0];
|
||||
_status.evaluatingExtension = lib.extensions[i][3];
|
||||
if (typeof lib.extensions[i][1] == "function")
|
||||
await (gnc.is.coroutine(lib.extensions[i][1]) ? gnc.of(lib.extensions[i][1]) : lib.extensions[i][1]).call(lib.extensions[i], lib.extensions[i][2], lib.extensions[i][4]);
|
||||
try{
|
||||
await (gnc.is.coroutine(lib.extensions[i][1]) ? gnc.of(lib.extensions[i][1]) : lib.extensions[i][1]).call(lib.extensions[i], lib.extensions[i][2], lib.extensions[i][4]);
|
||||
}catch(e){
|
||||
alert(`加载《${name}》扩展的content时出错。\n${decodeURI(e.stack)}`);
|
||||
}
|
||||
if (lib.extensions[i][4]) {
|
||||
if (lib.extensions[i][4].character) {
|
||||
for (var j in lib.extensions[i][4].character.character) {
|
||||
|
|
Loading…
Reference in New Issue