v1.9.89.2
This commit is contained in:
parent
5f86a0bcf6
commit
27a8313140
|
@ -432,7 +432,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
'step 3'
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=game.roundNumber+'轮 剩余牌: '+ui.cardPile.childNodes.length;
|
||||
game.updateRoundNumber();
|
||||
if(event.cards.length){
|
||||
player.gain(event.cards,'draw');
|
||||
event.finish();
|
||||
|
@ -1611,7 +1611,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(get.position(trigger.cards[i])=='d'){
|
||||
ui.cardPile.insertBefore(trigger.cards[i],ui.cardPile.firstChild);
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=game.roundNumber+'轮 剩余牌: '+ui.cardPile.childNodes.length;
|
||||
game.updateRoundNumber();
|
||||
game.log(player,'将',trigger.cards[i],'置于牌堆顶');
|
||||
}
|
||||
};
|
||||
|
|
|
@ -92,7 +92,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
buzhi:['male','wu',3,['hongde','dingpan']],
|
||||
|
||||
sp_liubei:['male','shu',4,['zhaolie','shichou']],
|
||||
caochun:['male','wei',4,['shanjia']],
|
||||
caochun:['male','wei',4,['xinshanjia']],
|
||||
zhuling:['male','wei',4,['zhanyi']],
|
||||
dongbai:['female','qun',3,['lianzhu','xiehui']],
|
||||
|
||||
|
@ -772,6 +772,82 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
skill:{
|
||||
//新服曹笨
|
||||
|
||||
xinshanjia:{
|
||||
group:["xinshanjia_count"],
|
||||
subSkill:{
|
||||
count:{
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:false,
|
||||
trigger:{
|
||||
player:"loseEnd",
|
||||
},
|
||||
filter:function (event,player){
|
||||
var cs=event.cards;
|
||||
for(var i=0;i<cs.length;i++){
|
||||
if(get.type(cs[i])=='equip'&&cs[i].original=='e') return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
content:function (){
|
||||
var cs=trigger.cards;
|
||||
var num=0;
|
||||
for(var i=0;i<cs.length;i++){
|
||||
if(get.type(cs[i])=='equip'&&cs[i].original=='e') num++;
|
||||
}
|
||||
player.storage.xinshanjia+=num;
|
||||
player.markSkill('xinshanjia');
|
||||
},
|
||||
},
|
||||
},
|
||||
audio:"shanjia",
|
||||
trigger:{
|
||||
player:"phaseUseBegin",
|
||||
},
|
||||
intro:{
|
||||
content:"本局游戏内已失去过#张装备区内的牌",
|
||||
},
|
||||
frequent:true,
|
||||
init:function (player,skill){
|
||||
if(!player.storage[skill]) player.storage[skill]=0;
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
player.draw(3);
|
||||
'step 1'
|
||||
var num=3-player.storage.xinshanjia;
|
||||
if(num>0){
|
||||
player.chooseToDiscard('he',true,num);
|
||||
}
|
||||
'step 2'
|
||||
var bool=true;
|
||||
if(result.cards){
|
||||
for(var i=0;i<result.cards.length;i++){
|
||||
if(['basic','trick'].contains(get.type(result.cards[i],'trick'))){
|
||||
bool=false;break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(bool){
|
||||
player.chooseTarget('是否视为使用一张没有距离限制的【杀】?',function(card,player,target){
|
||||
return player.canUse({name:'sha'},target,false);
|
||||
}).ai=function(target){
|
||||
var player=_status.event.player;
|
||||
return get.effect(target,{name:'sha'},player,player);
|
||||
};
|
||||
}
|
||||
else event.finish();
|
||||
'step 3'
|
||||
if(result.bool&&result.targets){
|
||||
player.useCard({name:'sha'},result.targets);
|
||||
}
|
||||
else event.finish();
|
||||
'step 4'
|
||||
player.getStat().card.sha--;
|
||||
},
|
||||
},
|
||||
//OL马超
|
||||
ol_shichou:{
|
||||
audio:2,
|
||||
|
@ -11663,6 +11739,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
simazhao:"司马昭",
|
||||
wangyuanji:"王元姬",
|
||||
|
||||
xinshanjia:"缮甲",
|
||||
"xinshanjia_info":"出牌阶段开始时,你可以摸三张牌,然后弃置3-X张牌(X为你本局游戏内失去过的装备区内的牌的数目且至多为3)。若你没有以此法弃置基本牌或锦囊牌,则你可以视为使用了一张不计入出牌阶段使用次数且无距离限制的【杀】。",
|
||||
"new_meibu":"魅步",
|
||||
"new_meibu_info":"其他角色的出牌阶段开始时,若你在其攻击范围内,你可以弃置一张牌,令该角色于本回合内拥有“止息”。若你以此法弃置的牌不是【杀】或黑色锦囊牌,则本回合其与你距离视为1。",
|
||||
"new_mumu":"穆穆",
|
||||
|
|
|
@ -633,16 +633,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
'step 1'
|
||||
var tothrow=[];
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
for(var i=event.cards.length-1;i>=0;i--){
|
||||
if(result.bool&&result.links.contains(event.cards[i])){
|
||||
player.gain(event.cards[i],'gain2');
|
||||
}
|
||||
else{
|
||||
event.cards[i].discard();
|
||||
tothrow.push(event.cards[i])
|
||||
ui.cardPile.insertBefore(event.cards[i],ui.cardPile.childNodes[0]);
|
||||
}
|
||||
}
|
||||
player.$throw(tothrow);
|
||||
game.updateRoundNumber();
|
||||
},
|
||||
},
|
||||
"xinfu_qianxin":{
|
||||
|
@ -691,7 +690,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ui.cardPile.appendChild(cards[i]);
|
||||
}
|
||||
}
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=game.roundNumber+'轮 剩余牌: '+ui.cardPile.childNodes.length;
|
||||
game.updateRoundNumber();
|
||||
game.log(player,'把',cards,'放在了牌堆里');
|
||||
},
|
||||
ai:{
|
||||
|
@ -4991,7 +4990,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
event.target=result.targets[0];
|
||||
player.line(event.target,'green');
|
||||
player.give(event.card,event.target);
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=game.roundNumber+'轮 剩余牌: '+ui.cardPile.childNodes.length;
|
||||
game.updateRoundNumber();
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
|
|
@ -3320,6 +3320,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.showCards(cards);
|
||||
'step 1'
|
||||
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
|
||||
game.updateRoundNumber();
|
||||
var n1=target.getCards('he',function(card){
|
||||
if(!lib.filter.cardDiscardable(card,player)) return false;
|
||||
return get.type(card,'trick')=='trick';
|
||||
|
@ -5169,6 +5170,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 3'
|
||||
if(event.card){
|
||||
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
|
||||
game.updateRoundNumber();
|
||||
}
|
||||
},
|
||||
group:['huomo_count','huomo_count2','huomo_use']
|
||||
|
@ -5247,21 +5249,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filterCard:function(card){
|
||||
return get.type(card)!='basic'&&get.color(card)=='black';
|
||||
},
|
||||
viewAs:{name:links[0][2],nature:links[0][3]},
|
||||
viewAs:{name:links[0][2],nature:links[0][3],suit:null,number:null},
|
||||
position:'he',
|
||||
popname:true,
|
||||
precontent:function(){
|
||||
'step 0'
|
||||
player.logSkill('huomo');
|
||||
var card=event.result.cards[0];
|
||||
event.card=card;
|
||||
player.$throw(card,1000);
|
||||
game.log(player,'将',card,'置于牌堆顶');
|
||||
event.result.cards.length=0;
|
||||
event.result.card={name:event.result.card.name};
|
||||
event.result.cards=[];
|
||||
player.lose(card);
|
||||
'step 1'
|
||||
game.delay();
|
||||
'step 2'
|
||||
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
|
||||
game.updateRoundNumber();
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -9661,7 +9666,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
qinwang_info:'主公技,你可以弃置一张牌,然后视为你发动“激将”。若有角色响应,则该角色打出【杀】时摸一张牌',
|
||||
huomo:'活墨',
|
||||
huomo_use:'活墨',
|
||||
huomo_use_backup:'活墨',
|
||||
//huomo_use_backup:'活墨',
|
||||
huomo_info:'每当你需要使用一张本回合内未使用过的基本牌时,你可以将一张黑色非基本牌置于牌堆顶,然后视为你使用了此基本牌',
|
||||
huomo_use_info:'每当你需要使用一张本回合内未使用过的基本牌时,你可以将一张黑色非基本牌置于牌堆顶,然后视为你使用了此基本牌',
|
||||
zuoding:'佐定',
|
||||
|
|
86
game/game.js
86
game/game.js
|
@ -6051,7 +6051,7 @@
|
|||
if(name.indexOf('gz_shibing')==0){
|
||||
name=name.slice(3,11);
|
||||
}
|
||||
else if(!get.config('guozhanSkin')||!lib.character[name]||!lib.character[name][4].contains('gzskin')){
|
||||
else if(!lib.config.mode_config.guozhan.guozhanSkin||!lib.character[name]||!lib.character[name][4].contains('gzskin')){
|
||||
name=name.slice(3);
|
||||
}
|
||||
}
|
||||
|
@ -22807,7 +22807,7 @@
|
|||
if((player==_status.roundStart||_status.roundSkipped)&&!trigger.skill){
|
||||
delete _status.roundSkipped;
|
||||
game.roundNumber++;
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=game.roundNumber+'轮 剩余牌: '+ui.cardPile.childNodes.length;
|
||||
game.updateRoundNumber();
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].isOut()&&game.players[i].outCount>0){
|
||||
game.players[i].outCount--;
|
||||
|
@ -23054,23 +23054,25 @@
|
|||
"step 0"
|
||||
player.link();
|
||||
event.logvid=trigger.getLogv();
|
||||
if(!trigger.notLink()) event.finish();
|
||||
"step 1"
|
||||
var players=game.players.slice(0);
|
||||
event.targets=game.filterPlayer(function(current){
|
||||
return current.isLinked();
|
||||
});
|
||||
lib.tempSortSeat=player;
|
||||
players.sort(lib.sort.seat);
|
||||
event.targets.sort(lib.sort.seat);
|
||||
delete lib.tempSortSeat;
|
||||
for(var i=0;i<players.length;i++){
|
||||
if(players[i].isLinked()){
|
||||
if(trigger.source){
|
||||
players[i].damage(trigger.num,trigger.nature,trigger.source,trigger.cards,trigger.card);
|
||||
}
|
||||
else{
|
||||
players[i].damage(trigger.num,trigger.nature,'nosource',trigger.cards,trigger.card);
|
||||
}
|
||||
return;
|
||||
}
|
||||
event._args=[trigger.num,trigger.nature,trigger.cards,trigger.card];
|
||||
if(trigger.source) event._args.push(trigger.source);
|
||||
else event._args.push("nosource");
|
||||
delete event.player;
|
||||
"step 2"
|
||||
if(event.targets.length){
|
||||
var target=event.targets.shift();
|
||||
target.damage.apply(target,event._args.slice(0));
|
||||
event.redo();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
_lianhuan2:{
|
||||
trigger:{global:'damageAfter'},
|
||||
|
@ -23078,17 +23080,30 @@
|
|||
return (event.nature&&lib.linked.contains(event.nature)&&event.player.isLinked()&&
|
||||
event.player.classList.contains('dead')&&player.isLinked());
|
||||
},
|
||||
silent:true,
|
||||
popup:false,
|
||||
forced:true,
|
||||
priority:-5,
|
||||
content:function(){
|
||||
"step 0"
|
||||
trigger.player.removeLink();
|
||||
if(!trigger.notLink()) event.finish();
|
||||
"step 1"
|
||||
if(trigger.source){
|
||||
player.damage(trigger.num,trigger.nature,trigger.source,trigger.cards,trigger.card);
|
||||
}
|
||||
else{
|
||||
player.damage(trigger.num,trigger.nature,'nosource',trigger.cards,trigger.card);
|
||||
event.targets=game.filterPlayer(function(current){
|
||||
return current.isLinked();
|
||||
});
|
||||
lib.tempSortSeat=trigger.player;
|
||||
event.targets.sort(lib.sort.seat);
|
||||
delete lib.tempSortSeat;
|
||||
event._args=[trigger.num,trigger.nature,trigger.cards,trigger.card];
|
||||
if(trigger.source) event._args.push(trigger.source);
|
||||
else event._args.push("nosource");
|
||||
delete event.player;
|
||||
"step 2"
|
||||
if(event.targets.length){
|
||||
var target=event.targets.shift();
|
||||
target.damage.apply(target,event._args.slice(0));
|
||||
event.redo();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -24725,8 +24740,8 @@
|
|||
if(lib.config.background_music=='music_off'){
|
||||
ui.backgroundMusic.src='';
|
||||
}
|
||||
else if(get.mode()=='guozhan'&&_status._aozhan==true&&get.config('aozhan_bgm')!='disabled'){
|
||||
var aozhan=get.config('aozhan_bgm');
|
||||
else if(get.mode()=='guozhan'&&_status._aozhan==true&&lib.config.mode_config.guozhan.aozhan_bgm!='disabled'){
|
||||
var aozhan=lib.config.mode_config.guozhan.aozhan_bgm;
|
||||
ui.backgroundMusic.src=lib.assetURL+'audio/background/aozhan_'+aozhan+'.mp3';
|
||||
}
|
||||
else{
|
||||
|
@ -29728,6 +29743,11 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
updateRoundNumber:function(){
|
||||
game.broadcastAll(function(num1,num2){
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=num1+'轮 剩余牌: '+num2;
|
||||
},game.roundNumber,ui.cardPile.childNodes.length);
|
||||
},
|
||||
asyncDraw:function(players,num,drawDeck,bottom){
|
||||
for(var i=0;i<players.length;i++){
|
||||
var num2=1;
|
||||
|
@ -40349,7 +40369,9 @@
|
|||
ui.create.card(ui.cardPile).init(lib.card.list[i]);
|
||||
}
|
||||
}
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML='0轮 剩余牌: '+ui.cardPile.childNodes.length;
|
||||
game.broadcastAll(function(num){
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML='0轮 剩余牌: '+num;
|
||||
},ui.cardPile.childNodes.length);
|
||||
},
|
||||
},
|
||||
click:{
|
||||
|
@ -43170,7 +43192,7 @@
|
|||
}
|
||||
else{
|
||||
delete lib.config.skin[nameskin];
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&get.config('guozhanSkin')){
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&lib.config.mode_config.guozhan.guozhanSkin){
|
||||
bg.setBackground(nameskin2,'character');
|
||||
if(sourcenode) sourcenode.setBackground(nameskin2,'character');
|
||||
if(avatar) avatar.setBackground(nameskin2,'character');
|
||||
|
@ -43188,7 +43210,7 @@
|
|||
button.setBackgroundImage('image/skin/'+nameskin+'/'+i+'.jpg');
|
||||
}
|
||||
else{
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&get.config('guozhanSkin')) button.setBackground(nameskin2,'character','noskin');
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&lib.config.mode_config.guozhan.guozhanSkin) button.setBackground(nameskin2,'character','noskin');
|
||||
else button.setBackground(nameskin,'character','noskin');
|
||||
}
|
||||
}
|
||||
|
@ -44507,7 +44529,7 @@
|
|||
}
|
||||
list.push(ui.cardPile.removeChild(ui.cardPile.lastChild));
|
||||
}
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=game.roundNumber+'轮 剩余牌: '+ui.cardPile.childNodes.length;
|
||||
game.updateRoundNumber();
|
||||
if(card) return list[0];
|
||||
return list;
|
||||
},
|
||||
|
@ -45761,7 +45783,7 @@
|
|||
}
|
||||
list.push(ui.cardPile.removeChild(ui.cardPile.firstChild));
|
||||
}
|
||||
if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=game.roundNumber+'轮 剩余牌: '+ui.cardPile.childNodes.length;
|
||||
game.updateRoundNumber();
|
||||
if(card) return list[0];
|
||||
return list;
|
||||
},
|
||||
|
@ -46837,11 +46859,11 @@
|
|||
else{
|
||||
delete lib.config.skin[nameskin];
|
||||
if(avatar2){
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&get.config('guozhanSkin')) node.node.avatar2.setBackground(nameskin2,'character');
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&lib.config.mode_config.guozhan.guozhanSkin) node.node.avatar2.setBackground(nameskin2,'character');
|
||||
else node.node.avatar2.setBackground(nameskin,'character');
|
||||
}
|
||||
else{
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&get.config('guozhanSkin')) node.node.avatar.setBackground(nameskin2,'character');
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&lib.config.mode_config.guozhan.guozhanSkin) node.node.avatar.setBackground(nameskin2,'character');
|
||||
else node.node.avatar.setBackground(nameskin,'character');
|
||||
}
|
||||
}
|
||||
|
@ -46852,7 +46874,7 @@
|
|||
button.setBackgroundImage('image/skin/'+nameskin+'/'+i+'.jpg');
|
||||
}
|
||||
else{
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&get.config('guozhanSkin')) button.setBackground(nameskin2,'character','noskin');
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&lib.config.mode_config.guozhan.guozhanSkin) button.setBackground(nameskin2,'character','noskin');
|
||||
else button.setBackground(nameskin,'character','noskin');
|
||||
}
|
||||
}
|
||||
|
@ -47332,7 +47354,7 @@
|
|||
}
|
||||
else{
|
||||
delete lib.config.skin[nameskin];
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&get.config('guozhanSkin')) node.setBackground(nameskin2,'character');
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&lib.config.mode_config.guozhan.guozhanSkin) node.setBackground(nameskin2,'character');
|
||||
else node.setBackground(nameskin,'character');
|
||||
game.saveConfig('skin',lib.config.skin);
|
||||
}
|
||||
|
@ -47342,7 +47364,7 @@
|
|||
button.setBackgroundImage('image/skin/'+nameskin+'/'+i+'.jpg');
|
||||
}
|
||||
else{
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&get.config('guozhanSkin')) button.setBackground(nameskin2,'character','noskin');
|
||||
if(gzbool&&lib.character[nameskin2][4].contains('gzskin')&&lib.config.mode_config.guozhan.guozhanSkin) button.setBackground(nameskin2,'character','noskin');
|
||||
else button.setBackground(nameskin,'character','noskin');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
window.noname_update={
|
||||
version:'1.9.89.1',
|
||||
update:'1.9.89',
|
||||
version:'1.9.89.2',
|
||||
update:'1.9.89.1',
|
||||
changeLog:[
|
||||
'国战「君临天下•权」扩充包(by 隐面酱拌隐小面)',
|
||||
'2019版新国战变包/势备篇',
|
||||
'新版曹纯',
|
||||
'铁索连环结算等bug修复',
|
||||
'players://["caochun"]',
|
||||
],
|
||||
files:[
|
||||
'card/guozhan.js',
|
||||
'card/standard.js',
|
||||
'character/sp.js',
|
||||
'character/yijiang.js',
|
||||
'character/shenhua.js',
|
||||
'character/xinghuoliaoyuan.js',
|
||||
'mode/guozhan.js',
|
||||
//'game/asset.js',
|
||||
'game/game.js',
|
||||
|
|
|
@ -347,10 +347,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if((!event.filterCard({name:'tao'},player,event)||storage.used.contains('tao'))&&
|
||||
(!event.filterCard({name:'jiu'},player,event)||storage.used.contains('jiu'))) return false;
|
||||
var target=event.dying;
|
||||
if(target.identity=='unknown') return true;
|
||||
if(target.group=='unknown') return true;
|
||||
for(var i=0;i<storage.character.length;i++){
|
||||
var group=lib.character[storage.character[i]][1];
|
||||
if(target.identity==group) return true;
|
||||
if(target.group==group) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -383,13 +383,39 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
dialog.add([list2,'vcard']);
|
||||
return dialog;
|
||||
},
|
||||
check:function(button){
|
||||
if(ui.selected.buttons.length){
|
||||
var evt=_status.event.getParent('chooseToUse');
|
||||
var name=button.link[2];
|
||||
var group=lib.character[ui.selected.buttons[0].link][1];
|
||||
var player=_status.event.player;
|
||||
if(evt.type=='dying'){
|
||||
if(evt.dying!=player&&get.effect(evt.dying,{name:name},player,player)<=0) return 0;
|
||||
if(name=='jiu') return 2.1;
|
||||
return 2;
|
||||
}
|
||||
if(!['tao','juedou','guohe','shunshou','wuzhong','xietianzi','yuanjiao','taoyuan','wugu','wanjian','nanman','huoshaolianying'].contains(name)) return 0;
|
||||
if(['taoyuan','wugu','wanjian','nanman','huoshaolianying'].contains(name)){
|
||||
var list=game.filterPlayer(function(current){
|
||||
return (current.group=='unknown'||current.group==group)&&player.canUse({name:name},current);
|
||||
});
|
||||
var num=0;
|
||||
for(var i=0;i<list.length;i++){
|
||||
num+=get.effect(list[i],{name:name},player,player);
|
||||
}
|
||||
if(num>0) return (1.7+Math.random())*Math.max(num,1);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1+Math.random();
|
||||
},
|
||||
filter:function (button,player){
|
||||
var evt=_status.event.getParent('chooseToUse');
|
||||
if(!ui.selected.buttons.length){
|
||||
if(typeof button.link!='string') return false;
|
||||
if(evt.type=='dying'){
|
||||
if(evt.dying.identity=='unknown') return true;
|
||||
return evt.dying.identity==lib.character[button.link][1];
|
||||
if(evt.dying.group=='unknown') return true;
|
||||
return evt.dying.group==lib.character[button.link][1];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -415,7 +441,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var targets=[list[i]];
|
||||
info.changeTarget(player,targets);
|
||||
for(var j=0;j<targets.length;j++){
|
||||
if(targets[j].identity!='unknown'&&targets[j].identity!=group){
|
||||
if(targets[j].group!='unknown'&&targets[j].group!=group){
|
||||
giveup=true;
|
||||
break;
|
||||
}
|
||||
|
@ -426,7 +452,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
return false;
|
||||
}
|
||||
else return game.hasPlayer(function(current){
|
||||
return player.canUse(card,current)&&(current.identity=='unknown'||current.identity==group);
|
||||
return player.canUse(card,current)&&(current.group=='unknown'||current.group==group);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -452,13 +478,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filterTarget:function(card,player,target){
|
||||
var group=lib.skill.yigui_backup.group;
|
||||
if(target.identity!='unknown'&&target.identity!=group) return false;
|
||||
if(target.group!='unknown'&&target.group!=group) return false;
|
||||
var info=get.info(card);
|
||||
if(info.changeTarget){
|
||||
var targets=[target];
|
||||
info.changeTarget(player,targets);
|
||||
for(var i=0;i<targets.length;i++){
|
||||
if(target.identity!='unknown'&&target.identity!=group) return false;
|
||||
if(target.group!='unknown'&&target.group!=group) return false;
|
||||
}
|
||||
}
|
||||
var evt=_status.event;
|
||||
|
@ -471,7 +497,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
player.flashAvatar('yigui',character);
|
||||
player.storage.yigui.character.remove(character);
|
||||
_status.characterlist.add(character);
|
||||
game.log(player,'移除了','#g'+get.translation(character));
|
||||
game.log(player,'从「魂」中移除了','#g'+get.translation(character));
|
||||
player.syncStorage('yigui');
|
||||
player.updateMarks('yigui');
|
||||
player.storage.yigui.used.add(result.card.name);
|
||||
},
|
||||
}
|
||||
|
@ -485,8 +513,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
group:["yigui_init","yigui_refrain"],
|
||||
ai:{
|
||||
save:true,
|
||||
order:function(){
|
||||
return 1+10*Math.random();
|
||||
},
|
||||
result:{
|
||||
player:1,
|
||||
},
|
||||
},
|
||||
mark:true,
|
||||
marktext:'魂',
|
||||
onunmark:function(player,skill){
|
||||
_status.characterlist.addArray(player.storage[skill].character);
|
||||
player.storage[skill].character=[];
|
||||
|
@ -507,7 +542,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(storage,player){
|
||||
return '共有'+get.cnNumber(storage.character.length)+'张“魂”'
|
||||
}
|
||||
},
|
||||
markcount:function(storage,player){
|
||||
if(storage&&storage.character) return storage.character.length;
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
"yigui_init":{
|
||||
|
@ -525,6 +564,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(list.length){
|
||||
player.storage.yigui.character.addArray(list);
|
||||
lib.skill.gzhuashen.drawCharacter(player,list);
|
||||
player.syncStorage('yigui');
|
||||
player.updateMarks('yigui');
|
||||
game.log(player,'获得了'+get.cnNumber(list.length)+'张「魂」');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -553,18 +595,24 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(list.length){
|
||||
player.storage.yigui.character.addArray(list);
|
||||
lib.skill.gzhuashen.drawCharacter(player,list);
|
||||
player.syncStorage('yigui');
|
||||
player.updateMarks('yigui');
|
||||
game.log(player,'获得了'+get.cnNumber(list.length)+'张「魂」');
|
||||
}
|
||||
},
|
||||
},
|
||||
xindiaodu:{
|
||||
audio:"diaodu",
|
||||
global:"xindiaodu_use",
|
||||
subfrequent:['use'],
|
||||
subSkill:{
|
||||
use:{
|
||||
trigger:{
|
||||
player:"useCard",
|
||||
},
|
||||
popup:false,
|
||||
frequent:true,
|
||||
prompt:'是否发动【调度】摸一张牌?',
|
||||
filter:function (event,player){
|
||||
return get.type(event.card)=='equip'&&game.hasPlayer(function(current){
|
||||
return current.hasSkill('xindiaodu')&¤t.isFriendOf(player);
|
||||
|
@ -576,7 +624,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
logger.line(player,'green');
|
||||
logger.logSkill('xindiaodu');
|
||||
player.draw();
|
||||
player.draw(false);
|
||||
},
|
||||
ai:{
|
||||
reverseEquip:true,
|
||||
|
@ -2005,7 +2053,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
player.storage.new_kongcheng=player.storage.new_kongcheng.concat(player.getCards('h'));
|
||||
player.markSkill('new_kongcheng');
|
||||
game.addVideo('storage',player,['new_kongcheng',get.cardsInfo(player.storage.new_kongcheng),'cards']);
|
||||
player.lose(player.getCards('h'),ui.special);
|
||||
player.lose(player.getCards('h'),ui.special,'toStorage');
|
||||
},
|
||||
sub:true,
|
||||
forced:true,
|
||||
|
@ -2018,7 +2066,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
return player.storage.new_kongcheng.length>0;
|
||||
},
|
||||
content:function (){
|
||||
player.gain(player.storage.new_kongcheng,'draw');
|
||||
player.gain(player.storage.new_kongcheng,'draw','fromStorage');
|
||||
player.storage.new_kongcheng=[];
|
||||
game.addVideo('storage',player,['new_kongcheng',get.cardsInfo(player.storage.new_kongcheng),'cards']);
|
||||
player.unmarkSkill('new_kongcheng');
|
||||
|
@ -6454,18 +6502,18 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
if(player.storage._mingzhi3) return false
|
||||
if(_status.connectMode){
|
||||
if(!lib.configOL.junzhu) return false;
|
||||
}
|
||||
else if(!get.config('junzhu')) return false;
|
||||
if(player.storage._mingzhi3) return false;
|
||||
else if(!get.config('junzhu')) return false;;
|
||||
return true;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.storage._mingzhi3=true;
|
||||
var name=player.name1;
|
||||
if(!player.isUnseen(0)&&name.indexOf('gz_')!=0||!lib.junList.contains(name.slice(3))) event.finish();
|
||||
if(!player.isUnseen(0)||name.indexOf('gz_')!=0||!lib.junList.contains(name.slice(3))) event.finish();
|
||||
else{
|
||||
player.chooseBool("是否将主武将牌替换为君主武将?").ai=function(){return true};
|
||||
}
|
||||
|
@ -8073,7 +8121,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
mayChangeVice:function(repeat){
|
||||
if(!_status.changedSkills) _status.changedSkills=[];
|
||||
var skill=_status.event.name;
|
||||
if(this.hasViceCharacter()&&!_status.changedSkills.contains(skill)){
|
||||
if(this.hasViceCharacter()&&(repeat||!_status.changedSkills.contains(skill))){
|
||||
var next=game.createEvent('mayChangeVice');
|
||||
next.setContent('mayChangeVice');
|
||||
next.player=this;
|
||||
|
|
Loading…
Reference in New Issue