Merge branch 'libccy:PR-Branch' into PR-Branch
This commit is contained in:
commit
6daa448d0c
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "chrome 46",
|
"extends": "eslint:recommended",
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true,
|
"browser": true,
|
||||||
"node": true,
|
"node": true,
|
||||||
|
@ -10,6 +10,12 @@
|
||||||
"no-console": 0,
|
"no-console": 0,
|
||||||
"no-unused-vars": 0,
|
"no-unused-vars": 0,
|
||||||
"no-undef": 0,
|
"no-undef": 0,
|
||||||
"no-redeclare": 0
|
"no-redeclare": 0,
|
||||||
|
"no-prototype-builtins": 0,
|
||||||
|
"require-yield": 0,
|
||||||
|
"no-irregular-whitespace": ["error", { "skipStrings": true, "skipTemplates": true }],
|
||||||
|
"no-constant-condition": ["error", { "checkLoops": false }]/* ,
|
||||||
|
"comma-dangle": ["error", "only-multiline"],
|
||||||
|
"complexity": ["error",100] */
|
||||||
}
|
}
|
||||||
}
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1685,10 +1685,22 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
useful:1,
|
useful:1,
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:-1.5,
|
target:function(player,target){
|
||||||
|
if(ui.selected.targets.length){
|
||||||
|
const preTarget=ui.selected.targets.lastItem;
|
||||||
|
const eff=get.effect(target,{name:'sha'},preTarget,player);
|
||||||
|
return Math.sign(eff)*get.sgnAttitude(player,target);
|
||||||
|
}
|
||||||
|
const filter=get.info({name:'jiedao'}).filterAddedTarget;
|
||||||
|
if(game.hasPlayer(current=>{
|
||||||
|
return filter(null,null,current,target)&&get.effect(current,{name:'sha'},target,player)>=0;
|
||||||
|
})) return -1;
|
||||||
|
if(target.mayHaveSha(player,'use')) return 0.25;
|
||||||
|
return -1;
|
||||||
|
},
|
||||||
player:function(player){
|
player:function(player){
|
||||||
if(player.getCards('he',{subtype:'equip1'}).length) return 0;
|
if(player.getCards('he',{subtype:'equip1'}).length) return 0;
|
||||||
return 1.5;
|
return 1.25;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tag:{
|
tag:{
|
||||||
|
|
|
@ -238,7 +238,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
type:'equip',
|
type:'equip',
|
||||||
subtype:'equip5',
|
subtype:'equip5',
|
||||||
loseDelay:false,
|
|
||||||
skills:['tianjitu_skill'],
|
skills:['tianjitu_skill'],
|
||||||
onLose:function(){
|
onLose:function(){
|
||||||
player.addTempSkill('tianjitu_skill_lose')
|
player.addTempSkill('tianjitu_skill_lose')
|
||||||
|
|
|
@ -561,13 +561,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
prompt:'是否发动【赠毒】?',
|
prompt:'是否发动【赠毒】?',
|
||||||
prompt2:'将本次获得的【毒】交给其他角色',
|
prompt2:'将本次获得的【毒】交给其他角色',
|
||||||
ai1:function(card){
|
ai1:function(card){
|
||||||
var player = _status.event.player;
|
var player=get.player();
|
||||||
if(player.hasSkillTag("usedu")||get.effect(player,{name: "losehp"}, player, player)>0) return 0;
|
if(['usedu','keepdu'].some(tag=>player.hasSkillTag(tag))||get.effect(player,{name:"losehp"},player,player)>0) return 0;
|
||||||
if(!ui.selected.cards.length) return 1;
|
if(!ui.selected.cards.length) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
ai2:function(target){
|
ai2:function(target){
|
||||||
if (target.hasSkillTag("usedu")) return get.attitude(_status.event.player,target)-0.01;
|
if(['usedu','keepdu'].some(tag=>target.hasSkillTag(tag))) return get.attitude(_status.event.player,target)-0.01;
|
||||||
return -get.attitude(_status.event.player,target)+0.01;
|
return -get.attitude(_status.event.player,target)+0.01;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -48,7 +48,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
return get.type(card)=='equip'&&!cards.contains(card);
|
return get.type(card)=='equip'&&!cards.contains(card);
|
||||||
});
|
});
|
||||||
if(cardx) cards.push(cardx);
|
if(cardx) cards.push(cardx);
|
||||||
};
|
}
|
||||||
if(!cards.length){
|
if(!cards.length){
|
||||||
event.finish();
|
event.finish();
|
||||||
event.getParent().excluded.addArray(game.players);
|
event.getParent().excluded.addArray(game.players);
|
||||||
|
@ -701,7 +701,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
player.$throw(card);
|
player.$throw(card);
|
||||||
game.log(card,'进入了弃牌堆');
|
game.log(card,'进入了弃牌堆');
|
||||||
delete _status.jinhe[es[i].cardid];
|
delete _status.jinhe[es[i].cardid];
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
game.broadcastAll(function(jinhe){
|
game.broadcastAll(function(jinhe){
|
||||||
_status.jinhe=jinhe;
|
_status.jinhe=jinhe;
|
||||||
|
|
|
@ -210,7 +210,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
list.push([get.translation(get.type(name)),'',name]);
|
list.push([get.translation(get.type(name)),'',name]);
|
||||||
if(name=='sha'){
|
if(name=='sha'){
|
||||||
for(var nature of lib.inpile_nature){
|
for(var nature of lib.inpile_nature){
|
||||||
if(!player.canUse(get.autoViewAs({name:name,nature,nature},[]),target)) continue;
|
if(!player.canUse(get.autoViewAs({name:name,nature:nature},[]),target)) continue;
|
||||||
list.push([get.translation(get.type(name)),'',name,nature]);
|
list.push([get.translation(get.type(name)),'',name,nature]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1479,6 +1479,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(stat==0) return Math.random()<0.7;
|
if(stat==0) return Math.random()<0.7;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
prompt:function(event,player){
|
prompt:function(event,player){
|
||||||
return '焚心:是否与'+get.translation(event.player)+'交换身份?';
|
return '焚心:是否与'+get.translation(event.player)+'交换身份?';
|
||||||
|
|
|
@ -526,7 +526,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var skill={
|
var skill={
|
||||||
viewAs:{
|
viewAs:{
|
||||||
name:links[0][2],
|
name:links[0][2],
|
||||||
isCard:true,
|
|
||||||
suit:'none',
|
suit:'none',
|
||||||
number:null,
|
number:null,
|
||||||
isCard:true,
|
isCard:true,
|
||||||
|
@ -1697,7 +1696,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
dddxunxun:{
|
dddxunxun:{
|
||||||
inherit:"xunxun",
|
inherit:"xunxun",
|
||||||
audio:"ext:3D8测试包:2",
|
audio:2,
|
||||||
},
|
},
|
||||||
dddfusi:{
|
dddfusi:{
|
||||||
mod:{
|
mod:{
|
||||||
|
@ -3381,7 +3380,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
//轲比能
|
//轲比能
|
||||||
dddxiaoxing:{
|
dddxiaoxing:{
|
||||||
audio:2,
|
audio:2,
|
||||||
forced:true,
|
|
||||||
trigger:{global:'gameDrawBegin'},
|
trigger:{global:'gameDrawBegin'},
|
||||||
forced:true,
|
forced:true,
|
||||||
group:'dddxiaoxing_remove',
|
group:'dddxiaoxing_remove',
|
||||||
|
|
|
@ -294,7 +294,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
key_inari:'#bSummer Pockets',
|
key_inari:'#bSummer Pockets',
|
||||||
key_saya:'#bLittle Busters!',
|
key_saya:'#bLittle Busters!',
|
||||||
key_harukakanata:'#bLittle Busters!',
|
key_harukakanata:'#bLittle Busters!',
|
||||||
key_tsumugi:'#bSummer Pockets',
|
|
||||||
key_yui:'#rAngel Beats!',
|
key_yui:'#rAngel Beats!',
|
||||||
key_yoshino:'#bRewrite',
|
key_yoshino:'#bRewrite',
|
||||||
key_kengo:'#bLittle Busters!',
|
key_kengo:'#bLittle Busters!',
|
||||||
|
@ -3793,7 +3792,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.chooseButton(['选择获得一张“兴”',player.getExpansions('tenzen_yixing')],true);
|
player.chooseButton(['选择获得一张“兴”',player.getExpansions('tenzen_yixing')],true);
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.gain(result.links,'gain2');;
|
player.gain(result.links,'gain2');
|
||||||
}
|
}
|
||||||
var next=game.createEvent('tenzen_yixing_insert');
|
var next=game.createEvent('tenzen_yixing_insert');
|
||||||
event.next.remove(next);
|
event.next.remove(next);
|
||||||
|
@ -4958,10 +4957,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch(button.link){
|
switch(button.link){
|
||||||
case 3:return 4.5;break;
|
case 3:return 4.5;
|
||||||
case 4:return 4.4;break;
|
case 4:return 4.4;
|
||||||
case 5:return 4.3;break;
|
case 5:return 4.3;
|
||||||
case 2:return (3-player.hp)*1.5;break;
|
case 2:return (3-player.hp)*1.5;
|
||||||
case 1:{
|
case 1:{
|
||||||
if(game.hasPlayer(function(current){
|
if(game.hasPlayer(function(current){
|
||||||
return (get.realAttitude||get.attitude)(player,current)<0&&get.distance(player,current)>1;
|
return (get.realAttitude||get.attitude)(player,current)<0&&get.distance(player,current)>1;
|
||||||
|
@ -6122,7 +6121,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.popup('花绽',get.groupnature(name.slice(12)));
|
player.popup('花绽',get.groupnature(name.slice(12)));
|
||||||
game.log(player,'发动了技能',lib.translate[name].replace(/魔物/g,'【花绽】'));
|
game.log(player,'发动了技能',lib.translate[name].replace(/魔物/g,'【花绽】'));
|
||||||
player.removeMark(name,1,false);
|
player.removeMark(name,1,false);
|
||||||
;game.log(player,'移去了一个',lib.translate[name].replace(/魔物/g,'【魔物】'));
|
game.log(player,'移去了一个',lib.translate[name].replace(/魔物/g,'【魔物】'));
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6388,7 +6387,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{source:'damageBefore'},
|
trigger:{source:'damageBefore'},
|
||||||
forced:true,
|
forced:true,
|
||||||
charlotte:true,
|
charlotte:true,
|
||||||
audio:'abyusa_jueqing',
|
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.storage.abyusa_jueqing_rewrite==true;
|
return player.storage.abyusa_jueqing_rewrite==true;
|
||||||
},
|
},
|
||||||
|
@ -9106,7 +9104,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
filterCard:true,
|
filterCard:true,
|
||||||
log:false,
|
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target!=player&&target.hasZhuSkill('akane_yifu',player)&&!target.hasSkill('akane_yifu3');
|
return target!=player&&target.hasZhuSkill('akane_yifu',player)&&!target.hasSkill('akane_yifu3');
|
||||||
},
|
},
|
||||||
|
@ -9349,7 +9346,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
for(var i=0;i<targets.length;i++){
|
for(var i=0;i<targets.length;i++){
|
||||||
if(targets[i].differentSexFrom(player)){
|
if(targets[i].differentSexFrom(player)){
|
||||||
bool=true;break;
|
bool=true;break;
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
if(bool) player.loseHp();
|
if(bool) player.loseHp();
|
||||||
},
|
},
|
||||||
|
@ -9807,10 +9804,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
backup:function(links,player){
|
backup:function(links,player){
|
||||||
return {
|
return {
|
||||||
filterCard:true,
|
|
||||||
audio:'haruka_shuangche',
|
audio:'haruka_shuangche',
|
||||||
selectCard:-1,
|
|
||||||
filterCard:function(){return false},
|
filterCard:function(){return false},
|
||||||
|
selectCard:-1,
|
||||||
popname:true,
|
popname:true,
|
||||||
check:function(card){
|
check:function(card){
|
||||||
return 6-get.value(card);
|
return 6-get.value(card);
|
||||||
|
@ -11986,7 +11982,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
})){
|
})){
|
||||||
event.finish();
|
event.finish();
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
_status.currentPhase.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+
|
_status.currentPhase.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+
|
||||||
get.translation(trigger.player.judging[0])+',请打出一张手牌进行改判','h',true,function(card){
|
get.translation(trigger.player.judging[0])+',请打出一张手牌进行改判','h',true,function(card){
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
|
@ -13140,11 +13136,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(n==1){
|
if(n==1){
|
||||||
player.addTempSkill("releiji",{player:"phaseUseBegin"});
|
player.addTempSkill("releiji",{player:"phaseUseBegin"});
|
||||||
player.markSkill("releiji",{player:"phaseUseBegin"});
|
player.markSkill("releiji",{player:"phaseUseBegin"});
|
||||||
};
|
}
|
||||||
if(n==2){
|
if(n==2){
|
||||||
player.addTempSkill("guidao",{player:"phaseUseBegin"});
|
player.addTempSkill("guidao",{player:"phaseUseBegin"});
|
||||||
player.markSkill("guidao",{player:"phaseUseBegin"});
|
player.markSkill("guidao",{player:"phaseUseBegin"});
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ns_xiandao2:{
|
ns_xiandao2:{
|
||||||
|
|
|
@ -114,8 +114,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
num+=current.countMark('jxlianpo_mark_fan');
|
num+=current.countMark('jxlianpo_mark_fan');
|
||||||
return num;
|
return num;
|
||||||
}),
|
}),
|
||||||
nei:(game.hasPlayer(current=>current.identity=='nei')?0:1)+game.countPlayer(current=>{
|
nei:game.countPlayer(current=>{
|
||||||
return current.countMark('jxlianpo_mark_nei');
|
let num=0;
|
||||||
|
if(current.identity=='nei') num++;
|
||||||
|
num+=current.countMark('jxlianpo_mark_nei');
|
||||||
|
return num;
|
||||||
|
}),
|
||||||
|
commoner:game.countPlayer(current=>{
|
||||||
|
let num=0;
|
||||||
|
if(current.identity=='commoner') num++;
|
||||||
|
num+=current.countMark('jxlianpo_mark_commoner');
|
||||||
|
return num;
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
let population=0,identities=[];
|
let population=0,identities=[];
|
||||||
|
@ -126,7 +135,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
identities.add(i);
|
identities.add(i);
|
||||||
population=curPopulation;
|
population=curPopulation;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
return identities;
|
return identities;
|
||||||
},
|
},
|
||||||
group:'jxlianpo_show',
|
group:'jxlianpo_show',
|
||||||
|
@ -139,9 +148,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
intro:{
|
intro:{
|
||||||
content:()=>`场上最大阵营为${lib.skill.jxlianpo.getMax().map(i=>{
|
content:()=>`场上最大阵营为${lib.skill.jxlianpo.getMax().map(i=>{
|
||||||
if(i=='zhu') return '主忠';
|
if(i=='zhu') return '主忠';
|
||||||
if(i=='fan') return '反贼';
|
return get.translation(i+'2');
|
||||||
if(i=='nei') return '内奸';
|
|
||||||
return '';
|
|
||||||
}).join('、')}`,
|
}).join('、')}`,
|
||||||
},
|
},
|
||||||
$createButton:function(item,type,position,noclick,node){
|
$createButton:function(item,type,position,noclick,node){
|
||||||
|
@ -613,7 +620,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
})){
|
})){
|
||||||
goon=6;
|
goon=6;
|
||||||
}
|
}
|
||||||
}catch(e){}
|
}catch(e){
|
||||||
|
console.trace(e);
|
||||||
|
}
|
||||||
ui.selected.cards.remove(card);
|
ui.selected.cards.remove(card);
|
||||||
return goon-get.value(card);
|
return goon-get.value(card);
|
||||||
},
|
},
|
||||||
|
@ -1715,13 +1724,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(event.responded||event.shouli||event.type=='wuxie') return false;
|
if(event.responded||event.shouli||event.type=='wuxie') return false;
|
||||||
if(game.hasPlayer(function(current){
|
if(game.hasPlayer(function(current){
|
||||||
return current.getCards('e',card=>get.subtype(card)=='equip4').length>0;
|
return current.getCards('e',card=>get.is.attackingMount(card)).length>0;
|
||||||
})&&event.filterCard({
|
})&&event.filterCard({
|
||||||
name:'sha',
|
name:'sha',
|
||||||
storage:{shouli:true},
|
storage:{shouli:true},
|
||||||
},player,event)) return true;
|
},player,event)) return true;
|
||||||
if(game.hasPlayer(function(current){
|
if(game.hasPlayer(function(current){
|
||||||
return current.getCards('e',card=>get.subtype(card)=='equip3').length>0;
|
return current.getCards('e',card=>get.is.defendingMount(card)).length>0;
|
||||||
})&&event.filterCard({
|
})&&event.filterCard({
|
||||||
name:'shan',
|
name:'shan',
|
||||||
storage:{shouli:true},
|
storage:{shouli:true},
|
||||||
|
@ -1733,8 +1742,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
var event=_status.event,evt=event;
|
var event=_status.event,evt=event;
|
||||||
if(event._backup) evt=event._backup;
|
if(event._backup) evt=event._backup;
|
||||||
var equip3=target.getCards('e',card=>get.subtype(card,false)=='equip3');
|
var equip3=target.getCards('e',card=>get.is.defendingMount(card,false));
|
||||||
var equip4=target.getCards('e',card=>get.subtype(card,false)=='equip4');
|
var equip4=target.getCards('e',card=>get.is.attackingMount(card,false));
|
||||||
if(equip3.length&&equip3.some(card=>evt.filterCard(get.autoViewAs({
|
if(equip3.length&&equip3.some(card=>evt.filterCard(get.autoViewAs({
|
||||||
name:'shan',
|
name:'shan',
|
||||||
storage:{shouli:true},
|
storage:{shouli:true},
|
||||||
|
@ -1749,7 +1758,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return game.hasPlayer(function(current){
|
return game.hasPlayer(function(current){
|
||||||
return evt.filterTarget(sha,player,current);
|
return evt.filterTarget(sha,player,current);
|
||||||
})
|
})
|
||||||
};
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
prompt:'将场上的一张坐骑牌当做【杀】或【闪】使用或打出',
|
prompt:'将场上的一张坐骑牌当做【杀】或【闪】使用或打出',
|
||||||
|
@ -1758,8 +1767,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var evt=event.getParent(2);
|
var evt=event.getParent(2);
|
||||||
evt.set('shouli',true);
|
evt.set('shouli',true);
|
||||||
var list=[];
|
var list=[];
|
||||||
var equip3=target.getCards('e',card=>get.subtype(card,false)=='equip3');
|
var equip3=target.getCards('e',card=>get.is.defendingMount(card,false));
|
||||||
var equip4=target.getCards('e',card=>get.subtype(card,false)=='equip4');
|
var equip4=target.getCards('e',card=>get.is.attackingMount(card,false));
|
||||||
var backupx=_status.event;
|
var backupx=_status.event;
|
||||||
_status.event=evt;
|
_status.event=evt;
|
||||||
try{
|
try{
|
||||||
|
@ -1784,8 +1793,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return false;
|
return false;
|
||||||
})){
|
})){
|
||||||
list.push('sha');
|
list.push('sha');
|
||||||
};
|
}
|
||||||
}catch(e){game.print(e)};
|
}catch(e){game.print(e)}
|
||||||
_status.event=backupx;
|
_status.event=backupx;
|
||||||
if(list.length==1){
|
if(list.length==1){
|
||||||
event.cardName=list[0];
|
event.cardName=list[0];
|
||||||
|
@ -1799,13 +1808,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}).set('cards',cards)
|
}).set('cards',cards)
|
||||||
}
|
}
|
||||||
else player.choosePlayerCard(true,target,'e').set('filterButton',function(button){
|
else player.choosePlayerCard(true,target,'e').set('filterButton',function(button){
|
||||||
var type=get.subtype(button.link);
|
var card=button.link;
|
||||||
return type=='equip3'||type=='equip4';
|
return get.is.attackingMount(card)||get.is.defendingMount(card);
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
var evt=event.getParent(2);
|
var evt=event.getParent(2);
|
||||||
if(result.bool&&result.links&&result.links.length){
|
if(result.bool&&result.links&&result.links.length){
|
||||||
var name=(event.cardName||(get.subtype(result.links[0])=='equip4'?'sha':'shan'));
|
var name=(event.cardName||(get.is.attackingMount(result.links[0])?'sha':'shan'));
|
||||||
if(evt.name=='chooseToUse'){
|
if(evt.name=='chooseToUse'){
|
||||||
game.broadcastAll(function(result,name){
|
game.broadcastAll(function(result,name){
|
||||||
lib.skill.shouli_backup.viewAs={
|
lib.skill.shouli_backup.viewAs={
|
||||||
|
@ -1847,9 +1856,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
respondSha:true,
|
respondSha:true,
|
||||||
respondShan:true,
|
respondShan:true,
|
||||||
skillTagFilter:function(player,tag){
|
skillTagFilter:function(player,tag){
|
||||||
var subtype=(tag=='respondSha'?'equip4':'equip3');
|
var func=get.is[tag=='respondSha'?'attackingMount':'defendingMount'];
|
||||||
return game.hasPlayer(function(current){
|
return game.hasPlayer(function(current){
|
||||||
return current.hasCard(card=>get.subtype(card,false)==subtype,'e');
|
return current.hasCard(card=>func(card,false),'e');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
order:2,
|
order:2,
|
||||||
|
@ -4393,14 +4402,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var list=[];
|
var list=[];
|
||||||
for(var i in player.disabledSkills){
|
for(var i in player.disabledSkills){
|
||||||
if(player.disabledSkills[i].contains(skill)) list.push(i);
|
if(player.disabledSkills[i].contains(skill)) list.push(i);
|
||||||
};
|
}
|
||||||
if(list.length){
|
if(list.length){
|
||||||
var str='失效技能:';
|
var str='失效技能:';
|
||||||
for(var i=0;i<list.length;i++){
|
for(var i=0;i<list.length;i++){
|
||||||
if(lib.translate[list[i]+'_info']) str+=get.translation(list[i])+'、';
|
if(lib.translate[list[i]+'_info']) str+=get.translation(list[i])+'、';
|
||||||
};
|
}
|
||||||
return str.slice(0,str.length-1);
|
return str.slice(0,str.length-1);
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -4670,7 +4679,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
derivation:'wushuang',
|
derivation:'wushuang',
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.countMark('baonu')>=2;
|
return player.countMark('baonu')>=2&&game.hasPlayer(target=>lib.skill.ol_wuqian.filterTarget(null,player,target));
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target!=player&&!target.hasSkill('ol_wuqian_targeted');
|
return target!=player&&!target.hasSkill('ol_wuqian_targeted');
|
||||||
|
@ -4678,29 +4687,42 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function(){
|
content:function(){
|
||||||
player.removeMark('baonu',2);
|
player.removeMark('baonu',2);
|
||||||
player.addTempSkill('wushuang');
|
player.addTempSkill('wushuang');
|
||||||
player.storage.ol_wuqian_target=target;
|
player.popup('无双');
|
||||||
player.addTempSkill('ol_wuqian_target');
|
game.log(player,'获得了技能','#g【无双】');
|
||||||
target.addTempSkill('ol_wuqian_targeted');
|
target.addTempSkill('ol_wuqian_targeted');
|
||||||
},
|
},
|
||||||
subSkill:{
|
|
||||||
equip:{
|
|
||||||
ai:{
|
ai:{
|
||||||
unequip:true,
|
order:9,
|
||||||
skillTagFilter:function(player,tag,arg){
|
result:{
|
||||||
if(arg&&arg.target&&arg.target.hasSkill('ol_wuqian_targeted')) return true;
|
target:function(player,target){
|
||||||
return false;
|
if(player.countCards('hs',card=>{
|
||||||
}
|
if(!player.getCardUsable({name:card.name})) return false;
|
||||||
}
|
if(!player.canUse(card,target)) return false;
|
||||||
|
var eff1=get.effect(target,card,player,player);
|
||||||
|
_status.baonuCheck=true;
|
||||||
|
var eff2=get.effect(target,card,player,player);
|
||||||
|
delete _status.baonuCheck;
|
||||||
|
return eff2>Math.max(0,eff1);
|
||||||
|
})) return -1;
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
global:'ol_wuqian_ai',
|
||||||
|
subSkill:{
|
||||||
|
targeted:{
|
||||||
|
charlotte:true,
|
||||||
|
ai:{unequip2:true},
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
ai:{
|
||||||
|
unequip2:true,
|
||||||
|
skillTagFilter:function(player){
|
||||||
|
if(!_status.baonuCheck) return false;
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
targeted:{ai:{unequip2:true}},
|
|
||||||
target:{
|
|
||||||
mark:'character',
|
|
||||||
onremove:true,
|
|
||||||
intro:{
|
|
||||||
content:'获得无双且$防具失效直到回合结束'
|
|
||||||
},
|
},
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
wumou:{
|
wumou:{
|
||||||
audio:2,
|
audio:2,
|
||||||
|
@ -5945,7 +5967,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(player.countCards('he',{suit:'heart'})<Math.max(1,player.hp)) return false;
|
if(player.countCards('he',{suit:'heart'})<Math.max(1,player.hp)) return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:return true;break;
|
default:return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
maixie:true,
|
maixie:true,
|
||||||
|
@ -6481,7 +6503,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.addTempSkill('nzry_longnu_1','phaseUseAfter');
|
player.addTempSkill('nzry_longnu_1','phaseUseAfter');
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
subSkill:{
|
subSkill:{
|
||||||
'1':{
|
'1':{
|
||||||
|
@ -6587,7 +6609,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
result.targets[0].link(true);
|
result.targets[0].link(true);
|
||||||
}else{
|
}else{
|
||||||
event.finish();
|
event.finish();
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -6642,8 +6664,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
else{
|
else{
|
||||||
result.targets[0].link(true);
|
result.targets[0].link(true);
|
||||||
player.discardPlayerCard(result.targets[0],1,'hej',true);
|
player.discardPlayerCard(result.targets[0],1,'hej',true);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
'step 2'
|
'step 2'
|
||||||
if(player.countMark('nzry_junlve')>7){
|
if(player.countMark('nzry_junlve')>7){
|
||||||
player.chooseBool().set('ai',function(){
|
player.chooseBool().set('ai',function(){
|
||||||
|
@ -6651,7 +6673,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}).set('prompt','是否弃置所有“军略”标记并对所有其他角色造成1点伤害?');
|
}).set('prompt','是否弃置所有“军略”标记并对所有其他角色造成1点伤害?');
|
||||||
}else{
|
}else{
|
||||||
event.finish();
|
event.finish();
|
||||||
};
|
}
|
||||||
'step 3'
|
'step 3'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var players=game.players.slice(0).sortBySeat();
|
var players=game.players.slice(0).sortBySeat();
|
||||||
|
@ -6659,8 +6681,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.removeMark('nzry_junlve',player.countMark('nzry_junlve'));
|
player.removeMark('nzry_junlve',player.countMark('nzry_junlve'));
|
||||||
for(var i=0;i<players.length;i++){
|
for(var i=0;i<players.length;i++){
|
||||||
if(players[i]!=player) players[i].damage();
|
if(players[i]!=player) players[i].damage();
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"nzry_dinghuo":{
|
"nzry_dinghuo":{
|
||||||
|
@ -6813,14 +6835,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var list=[];
|
var list=[];
|
||||||
for(var i in player.disabledSkills){
|
for(var i in player.disabledSkills){
|
||||||
if(player.disabledSkills[i].contains(skill)) list.push(i);
|
if(player.disabledSkills[i].contains(skill)) list.push(i);
|
||||||
};
|
}
|
||||||
if(list.length){
|
if(list.length){
|
||||||
var str='失效技能:';
|
var str='失效技能:';
|
||||||
for(var i=0;i<list.length;i++){
|
for(var i=0;i<list.length;i++){
|
||||||
if(lib.translate[list[i]+'_info']) str+=get.translation(list[i])+'、';
|
if(lib.translate[list[i]+'_info']) str+=get.translation(list[i])+'、';
|
||||||
};
|
}
|
||||||
return str.slice(0,str.length-1);
|
return str.slice(0,str.length-1);
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -6949,7 +6971,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
chooseButton.set('filterButton',function(button){
|
chooseButton.set('filterButton',function(button){
|
||||||
for(var i=0;i<ui.selected.buttons.length;i++){
|
for(var i=0;i<ui.selected.buttons.length;i++){
|
||||||
if(get.suit(button.link)==get.suit(ui.selected.buttons[i].link)) return false;
|
if(get.suit(button.link)==get.suit(ui.selected.buttons[i].link)) return false;
|
||||||
};
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
|
@ -6960,8 +6982,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
event.list1.push(list[i]);
|
event.list1.push(list[i]);
|
||||||
}else{
|
}else{
|
||||||
event.list2.push(list[i]);
|
event.list2.push(list[i]);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
if(event.list1.length&&event.list2.length){
|
if(event.list1.length&&event.list2.length){
|
||||||
game.loseAsync({
|
game.loseAsync({
|
||||||
lose_list:[
|
lose_list:[
|
||||||
|
@ -6975,7 +6997,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
target.discard(event.list2);
|
target.discard(event.list2);
|
||||||
}
|
}
|
||||||
else player.discard(event.list1);
|
else player.discard(event.list1);
|
||||||
};
|
}
|
||||||
'step 2'
|
'step 2'
|
||||||
if(event.list1.length+event.list2.length==4){
|
if(event.list1.length+event.list2.length==4){
|
||||||
if(event.list1.length==0) player.loseMaxHp();
|
if(event.list1.length==0) player.loseMaxHp();
|
||||||
|
@ -6986,13 +7008,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(evt.name=='phaseUse'){
|
if(evt.name=='phaseUse'){
|
||||||
evt.skipped=true;
|
evt.skipped=true;
|
||||||
break;
|
break;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
player.addTempSkill('drlt_poxi1',{player:'phaseAfter'});
|
player.addTempSkill('drlt_poxi1',{player:'phaseAfter'});
|
||||||
};
|
}
|
||||||
if(event.list1.length==3) player.recover();
|
if(event.list1.length==3) player.recover();
|
||||||
if(event.list1.length==4) player.draw(4);
|
if(event.list1.length==4) player.draw(4);
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:13,
|
order:13,
|
||||||
|
@ -7103,7 +7125,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var mark=player.countMark('drlt_jieying_mark');
|
var mark=player.countMark('drlt_jieying_mark');
|
||||||
player.removeMark('drlt_jieying_mark',mark);
|
player.removeMark('drlt_jieying_mark',mark);
|
||||||
target.addMark('drlt_jieying_mark',mark);
|
target.addMark('drlt_jieying_mark',mark);
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'3':{
|
'3':{
|
||||||
|
|
|
@ -1959,7 +1959,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
case 'jiu':return 3.01;
|
case 'jiu':return 3.01;
|
||||||
case 'sha':
|
case 'sha':
|
||||||
if(button.link[3]=='fire') return 2.95;
|
if(button.link[3]=='fire') return 2.95;
|
||||||
else if(button.link[3]=='fire') return 2.92;
|
else if(button.link[3]=='thunder') return 2.92;
|
||||||
else return 2.9;
|
else return 2.9;
|
||||||
default:return 2+_status.event.getRand()*2;
|
default:return 2+_status.event.getRand()*2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
name:'huicui',
|
name:'huicui',
|
||||||
connect:true,
|
connect:true,
|
||||||
character:{
|
character:{
|
||||||
|
dc_sunchen:['male','wu',4,['dczigu','dczuowei'],['unseen']],
|
||||||
dc_zhangmancheng:['male','qun',4,['dclvecheng','dczhongji']],
|
dc_zhangmancheng:['male','qun',4,['dclvecheng','dczhongji']],
|
||||||
yue_zhoufei:['female','wu',3,['dclingkong','dcxianshu']],
|
yue_zhoufei:['female','wu',3,['dclingkong','dcxianshu']],
|
||||||
dc_wuban:['male','shu',4,['dcyouzhan'],['clan:陈留吴氏','unseen']],
|
dc_wuban:['male','shu',4,['dcyouzhan'],['clan:陈留吴氏','unseen']],
|
||||||
|
@ -4137,7 +4138,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var cards=evt.cards.filterInD();
|
var cards=evt.cards.filterInD();
|
||||||
return get.value(cards,evt.player)*get.attitude(player,evt.player);
|
return get.value(cards,evt.player)*get.attitude(player,evt.player);
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
})
|
})
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
@ -5780,7 +5780,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
subSkill:{
|
subSkill:{
|
||||||
blocker:{
|
blocker:{
|
||||||
charlotte:true,
|
|
||||||
init:function(player,skill){
|
init:function(player,skill){
|
||||||
player.addSkillBlocker(skill);
|
player.addSkillBlocker(skill);
|
||||||
},
|
},
|
||||||
|
@ -10164,7 +10163,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
characterTitle:{
|
characterTitle:{
|
||||||
},
|
},
|
||||||
perfectPair:{},
|
|
||||||
characterFilter:{
|
characterFilter:{
|
||||||
},
|
},
|
||||||
dynamicTranslate:{
|
dynamicTranslate:{
|
||||||
|
|
|
@ -384,7 +384,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
onremove:true,
|
onremove:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!event.card.storage||!event.card.storage.jsrgzhenfeng) return false;
|
if(!event.card.storage||!event.card.storage.jsrgzhenfeng) return false;
|
||||||
debugger
|
// debugger
|
||||||
var str=event.target.getSkills(null,false,false).map(skill=>{
|
var str=event.target.getSkills(null,false,false).map(skill=>{
|
||||||
var info=get.info(skill);
|
var info=get.info(skill);
|
||||||
if(!info||info.charlotte) return;
|
if(!info||info.charlotte) return;
|
||||||
|
@ -1992,7 +1992,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
subSkill:{
|
subSkill:{
|
||||||
undist:{
|
undist:{
|
||||||
group:'undist',
|
group:'undist',
|
||||||
charlotte:true,
|
|
||||||
trigger:{
|
trigger:{
|
||||||
player:['useCardAfter','damageEnd'],
|
player:['useCardAfter','damageEnd'],
|
||||||
},
|
},
|
||||||
|
@ -2954,7 +2953,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(count==1) return true;
|
if(count==1) return true;
|
||||||
for(var i=0;i<ui.selected.buttons.length;i++){
|
for(var i=0;i<ui.selected.buttons.length;i++){
|
||||||
if(get.owner(button.link)==get.owner(ui.selected.buttons[i].link)) return false;
|
if(get.owner(button.link)==get.owner(ui.selected.buttons[i].link)) return false;
|
||||||
};
|
}
|
||||||
return true;
|
return true;
|
||||||
}).set('count',targets.length).set('ai',button=>{
|
}).set('count',targets.length).set('ai',button=>{
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
|
@ -4390,7 +4389,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var ind=skillx.lastIndexOf('_');
|
var ind=skillx.lastIndexOf('_');
|
||||||
if(ind==-1) break;
|
if(ind==-1) break;
|
||||||
skillx=skillx.slice(0,ind);
|
skillx=skillx.slice(0,ind);
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
if(popup!=false&&!infox.silent) infox.forced=false;
|
if(popup!=false&&!infox.silent) infox.forced=false;
|
||||||
if(!infox.charlotte&&infox.mod) delete infox.mod;
|
if(!infox.charlotte&&infox.mod) delete infox.mod;
|
||||||
|
|
|
@ -614,8 +614,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
var event=_status.event,evt=event;
|
var event=_status.event,evt=event;
|
||||||
if(event._backup) evt=event._backup;
|
if(event._backup) evt=event._backup;
|
||||||
var equip3=target.getCards('e',card=>get.subtype(card,false)=='equip3');
|
var equip3=target.getCards('e',card=>get.is.defendingMount(card,false));
|
||||||
var equip4=target.getCards('e',card=>get.subtype(card,false)=='equip4');
|
var equip4=target.getCards('e',card=>get.is.attackingMount(card,false));
|
||||||
if(equip3.length&&equip3.some(card=>evt.filterCard(get.autoViewAs({
|
if(equip3.length&&equip3.some(card=>evt.filterCard(get.autoViewAs({
|
||||||
name:'shan',
|
name:'shan',
|
||||||
storage:{psshouli:true},
|
storage:{psshouli:true},
|
||||||
|
@ -630,7 +630,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return game.hasPlayer(function(current){
|
return game.hasPlayer(function(current){
|
||||||
return evt.filterTarget(sha,player,current);
|
return evt.filterTarget(sha,player,current);
|
||||||
})
|
})
|
||||||
};
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
prompt:'将场上的一张坐骑牌当做【杀】或【闪】使用或打出',
|
prompt:'将场上的一张坐骑牌当做【杀】或【闪】使用或打出',
|
||||||
|
@ -639,8 +639,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var evt=event.getParent(2);
|
var evt=event.getParent(2);
|
||||||
evt.set('psshouli',true);
|
evt.set('psshouli',true);
|
||||||
var list=[];
|
var list=[];
|
||||||
var equip3=target.getCards('e',card=>get.subtype(card,false)=='equip3');
|
var equip3=target.getCards('e',card=>get.is.defendingMount(card,false));
|
||||||
var equip4=target.getCards('e',card=>get.subtype(card,false)=='equip4');
|
var equip4=target.getCards('e',card=>get.is.attackingMount(card,false));
|
||||||
var backupx=_status.event;
|
var backupx=_status.event;
|
||||||
_status.event=evt;
|
_status.event=evt;
|
||||||
try{
|
try{
|
||||||
|
@ -665,8 +665,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return false;
|
return false;
|
||||||
})){
|
})){
|
||||||
list.push('sha');
|
list.push('sha');
|
||||||
};
|
}
|
||||||
}catch(e){game.print(e)};
|
}catch(e){game.print(e)}
|
||||||
_status.event=backupx;
|
_status.event=backupx;
|
||||||
if(list.length==1){
|
if(list.length==1){
|
||||||
event.cardName=list[0];
|
event.cardName=list[0];
|
||||||
|
@ -680,13 +680,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}).set('cards',cards)
|
}).set('cards',cards)
|
||||||
}
|
}
|
||||||
else player.choosePlayerCard(true,target,'e').set('filterButton',function(button){
|
else player.choosePlayerCard(true,target,'e').set('filterButton',function(button){
|
||||||
var type=get.subtype(button.link);
|
var card=button.link;
|
||||||
return type=='equip3'||type=='equip4';
|
return get.is.attackingMount(card)||get.is.defendingMount(card);
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
var evt=event.getParent(2);
|
var evt=event.getParent(2);
|
||||||
if(result.bool&&result.links&&result.links.length){
|
if(result.bool&&result.links&&result.links.length){
|
||||||
var name=(event.cardName||(get.subtype(result.links[0])=='equip4'?'sha':'shan'));
|
var name=(event.cardName||(get.is.attackingMount(result.links[0])?'sha':'shan'));
|
||||||
if(evt.name=='chooseToUse'){
|
if(evt.name=='chooseToUse'){
|
||||||
game.broadcastAll(function(result,name){
|
game.broadcastAll(function(result,name){
|
||||||
lib.skill.psshouli_backup.viewAs={
|
lib.skill.psshouli_backup.viewAs={
|
||||||
|
@ -728,9 +728,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
respondSha:true,
|
respondSha:true,
|
||||||
respondShan:true,
|
respondShan:true,
|
||||||
skillTagFilter:function(player,tag){
|
skillTagFilter:function(player,tag){
|
||||||
var subtype=(tag=='respondSha'?'equip4':'equip3');
|
var func=get.is[tag=='respondSha'?'attackingMount':'defendingMount'];
|
||||||
return game.hasPlayer(function(current){
|
return game.hasPlayer(function(current){
|
||||||
return current.getEquip(subtype);
|
return current.hasCard(card=>func(card,false),'e');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
order:2,
|
order:2,
|
||||||
|
@ -1533,7 +1533,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.addToExpansion(result.cards[0],'give',player).gaintag.add('psshiyin');
|
player.addToExpansion(result.cards[0],'give',player).gaintag.add('psshiyin');
|
||||||
var card=player.getExpansions('psshiyin')[0];
|
var card=player.getExpansions('psshiyin')[0];
|
||||||
if(card) player.gain(card,'gain2');
|
if(card) player.gain(card,'gain2');
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1654,7 +1654,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(card.name=='du') addi-=5;
|
if(card.name=='du') addi-=5;
|
||||||
if(get.color(card)=='black') addi-=6;
|
if(get.color(card)=='black') addi-=6;
|
||||||
if(player==event.player){
|
if(player==event.player){
|
||||||
if(Boolean(event.small)){
|
if(event.small){
|
||||||
return -getn(card)-get.value(card)/2+addi;
|
return -getn(card)-get.value(card)/2+addi;
|
||||||
}
|
}
|
||||||
return getn(card)-get.value(card)/2+addi;
|
return getn(card)-get.value(card)/2+addi;
|
||||||
|
@ -2670,9 +2670,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return '没有“戮”';
|
return '没有“戮”';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
content:function(storage,player){
|
// content:function(storage,player){
|
||||||
return '共有'+get.cnNumber(storage.length)+'张“戮”';
|
// return '共有'+get.cnNumber(storage.length)+'张“戮”';
|
||||||
},
|
// },
|
||||||
},
|
},
|
||||||
group:'zyshilu_zhiheng',
|
group:'zyshilu_zhiheng',
|
||||||
subSkill:{
|
subSkill:{
|
||||||
|
@ -4601,7 +4601,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.logSkill('spyinzhi');
|
player.logSkill('spyinzhi');
|
||||||
event.goto(1);
|
event.goto(1);
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
spmingjian:{
|
spmingjian:{
|
||||||
|
|
|
@ -124,6 +124,8 @@ window.noname_character_rank={
|
||||||
'db_key_liyingxia',
|
'db_key_liyingxia',
|
||||||
'key_kiyu',
|
'key_kiyu',
|
||||||
'jsrg_pangtong',
|
'jsrg_pangtong',
|
||||||
|
'star_caoren',
|
||||||
|
'clan_xunyou',
|
||||||
],
|
],
|
||||||
a:[
|
a:[
|
||||||
'diy_zaozhirenjun',
|
'diy_zaozhirenjun',
|
||||||
|
@ -339,6 +341,7 @@ window.noname_character_rank={
|
||||||
'key_kotarou',
|
'key_kotarou',
|
||||||
'key_kyou',
|
'key_kyou',
|
||||||
'key_tomoyo',
|
'key_tomoyo',
|
||||||
|
'star_yuanshu',
|
||||||
],
|
],
|
||||||
am:[
|
am:[
|
||||||
'diy_caiwenji',
|
'diy_caiwenji',
|
||||||
|
@ -618,6 +621,7 @@ window.noname_character_rank={
|
||||||
'jsrg_xiahourong',
|
'jsrg_xiahourong',
|
||||||
'jsrg_sunshangxiang',
|
'jsrg_sunshangxiang',
|
||||||
'jsrg_machao',
|
'jsrg_machao',
|
||||||
|
'sunyu',
|
||||||
],
|
],
|
||||||
bp:[
|
bp:[
|
||||||
'chess_diaochan',
|
'chess_diaochan',
|
||||||
|
@ -976,6 +980,9 @@ window.noname_character_rank={
|
||||||
'zhangyan',
|
'zhangyan',
|
||||||
'jsrg_huangzhong',
|
'jsrg_huangzhong',
|
||||||
'jsrg_zhangchu',
|
'jsrg_zhangchu',
|
||||||
|
'ol_dingshangwan',
|
||||||
|
'ol_liwan',
|
||||||
|
'chengjichengcui',
|
||||||
],
|
],
|
||||||
b:[
|
b:[
|
||||||
'diy_feishi',
|
'diy_feishi',
|
||||||
|
@ -2023,6 +2030,9 @@ window.noname_character_rank={
|
||||||
'key_kotomi',
|
'key_kotomi',
|
||||||
'db_key_liyingxia',
|
'db_key_liyingxia',
|
||||||
'key_iriya',
|
'key_iriya',
|
||||||
|
'star_caoren',
|
||||||
|
'star_yuanshu',
|
||||||
|
'clan_xunyou',
|
||||||
],
|
],
|
||||||
rare:[
|
rare:[
|
||||||
'luoxian',
|
'luoxian',
|
||||||
|
@ -2486,6 +2496,8 @@ window.noname_character_rank={
|
||||||
'ol_wenqin',
|
'ol_wenqin',
|
||||||
'clan_wanghun',
|
'clan_wanghun',
|
||||||
'yue_zhoufei',
|
'yue_zhoufei',
|
||||||
|
'ol_dingshangwan',
|
||||||
|
'ol_liwan',
|
||||||
],
|
],
|
||||||
junk:[
|
junk:[
|
||||||
'sunshao',
|
'sunshao',
|
||||||
|
|
|
@ -331,10 +331,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
switch(button.link[2]){
|
switch(button.link[2]){
|
||||||
case 'tao':return 5;
|
case 'tao':return 5;
|
||||||
case 'jiu':return 3.01;
|
case 'jiu':return 3.01;
|
||||||
case 'shan':return 3.01;
|
|
||||||
case 'sha':
|
case 'sha':
|
||||||
if(button.link[3]=='fire') return 2.95;
|
if(button.link[3]=='fire') return 2.95;
|
||||||
else if(button.link[3]=='fire') return 2.92;
|
else if(button.link[3]=='thunder') return 2.92;
|
||||||
else return 2.9;
|
else return 2.9;
|
||||||
case 'shan':return 1;
|
case 'shan':return 1;
|
||||||
}
|
}
|
||||||
|
@ -1195,7 +1194,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var color=get.color(card),colors=player.getStorage('olshuangxiong_effect');
|
var color=get.color(card),colors=player.getStorage('olshuangxiong_effect');
|
||||||
for(var i of colors){
|
for(var i of colors){
|
||||||
if(color!=i) return true;
|
if(color!=i) return true;
|
||||||
};
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
prompt:function(){
|
prompt:function(){
|
||||||
|
@ -2305,7 +2304,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return current!=player;
|
return current!=player;
|
||||||
}).sortBySeat(target);
|
}).sortBySeat(target);
|
||||||
for(var target of players){
|
for(var target of players){
|
||||||
if(get.damageEffect(target,player,target,'fire')>=0){num=0;continue};
|
if(get.damageEffect(target,player,target,'fire')>=0){num=0;continue}
|
||||||
var shao=false;
|
var shao=false;
|
||||||
num++;
|
num++;
|
||||||
if(target.countCards('he',function(card){
|
if(target.countCards('he',function(card){
|
||||||
|
@ -6418,7 +6417,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
usable:1,
|
usable:1,
|
||||||
position:'hs',
|
|
||||||
viewAs:{
|
viewAs:{
|
||||||
name:'sha',
|
name:'sha',
|
||||||
changbiao:true,
|
changbiao:true,
|
||||||
|
@ -7373,7 +7371,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(!lib.skill.yongjin.filter(null,player,cards)){
|
if(!lib.skill.yongjin.filter(null,player,cards)){
|
||||||
event.finish();
|
event.finish();
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
var next=player.chooseTarget(2,function(card,player,target){
|
var next=player.chooseTarget(2,function(card,player,target){
|
||||||
if(ui.selected.targets.length){
|
if(ui.selected.targets.length){
|
||||||
var from=ui.selected.targets[0];
|
var from=ui.selected.targets[0];
|
||||||
|
@ -7655,7 +7653,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return evt&&evt.cards2&&evt.cards2.filter(function(i){
|
return evt&&evt.cards2&&evt.cards2.filter(function(i){
|
||||||
return get.name(i,evt.hs.contains(i)?player:false)=='sha';
|
return get.name(i,evt.hs.contains(i)?player:false)=='sha';
|
||||||
}).length>0;
|
}).length>0;
|
||||||
};
|
}
|
||||||
if(event.name=='gain'&&event.player==player) return false;
|
if(event.name=='gain'&&event.player==player) return false;
|
||||||
var evt=event.getl(player);
|
var evt=event.getl(player);
|
||||||
return evt&&evt.cards2&&evt.cards2.length>0;
|
return evt&&evt.cards2&&evt.cards2.length>0;
|
||||||
|
@ -9468,7 +9466,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player:function(player){
|
player:function(player){
|
||||||
if(player.hp<3) return false;
|
if(player.hp<3) return false;
|
||||||
var mindist=player.hp;
|
var mindist=player.hp;
|
||||||
if(player.countCards('hs',card=>player.canSave(card,player))) mindist++;
|
if(player.countCards('hs',card=>player.canSaveCard(card,player))) mindist++;
|
||||||
if(game.hasPlayer(function(current){
|
if(game.hasPlayer(function(current){
|
||||||
return (get.distance(player,current)<=mindist&&
|
return (get.distance(player,current)<=mindist&&
|
||||||
player.canUse('sha',current,false)&&
|
player.canUse('sha',current,false)&&
|
||||||
|
@ -11158,7 +11156,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(checkx>0) return checkx;
|
if(checkx>0) return checkx;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
};
|
}
|
||||||
if(attitude>0){
|
if(attitude>0){
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -11521,7 +11519,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else return 4;
|
else return 4;
|
||||||
};
|
}
|
||||||
return 3;
|
return 3;
|
||||||
}).set('logSkill',['new_liyu',trigger.player]);
|
}).set('logSkill',['new_liyu',trigger.player]);
|
||||||
'step 1'
|
'step 1'
|
||||||
|
@ -12033,7 +12031,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(get.attitude(_status.event.player,_status.currentPhase)<0&&_status.currentPhase.needsToDiscard()&&card.name!='du') return -1;
|
if(get.attitude(_status.event.player,_status.currentPhase)<0&&_status.currentPhase.needsToDiscard()&&card.name!='du') return -1;
|
||||||
for(var i=0;i<ui.selected.cards.length;i++){
|
for(var i=0;i<ui.selected.cards.length;i++){
|
||||||
if(get.type(ui.selected.cards[i])==get.type(card)||(ui.selected.cards[i].name=='du'&&card.name!='du')) return -1;
|
if(get.type(ui.selected.cards[i])==get.type(card)||(ui.selected.cards[i].name=='du'&&card.name!='du')) return -1;
|
||||||
};
|
}
|
||||||
if(card.name=='du') return 20;
|
if(card.name=='du') return 20;
|
||||||
return (_status.event.player.countCards('h')-_status.event.player.hp);
|
return (_status.event.player.countCards('h')-_status.event.player.hp);
|
||||||
},
|
},
|
||||||
|
@ -14312,7 +14310,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(!result.bool&&!event.directbool){
|
if(!result.bool&&!event.directbool){
|
||||||
//game.cardsDiscard(card);
|
//game.cardsDiscard(card);
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
player.addToExpansion(card,'gain2').gaintag.add('tuntian');
|
player.addToExpansion(card,'gain2').gaintag.add('tuntian');
|
||||||
},
|
},
|
||||||
group:'tuntian_dist',
|
group:'tuntian_dist',
|
||||||
|
@ -14931,8 +14929,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
refangzhu_info:'当你受到伤害后,你可以令一名其他角色选择一项:摸X张牌并将武将牌翻面,或弃置X张牌并失去1点体力。(X为你已损失的体力值)',
|
refangzhu_info:'当你受到伤害后,你可以令一名其他角色选择一项:摸X张牌并将武将牌翻面,或弃置X张牌并失去1点体力。(X为你已损失的体力值)',
|
||||||
rezaiqi:'再起',
|
rezaiqi:'再起',
|
||||||
rezaiqi_info:'结束阶段开始时,你可以令至多X名角色选择一项:1.摸一张牌,2.令你回复1点体力(X为本回合进入弃牌堆的红色牌数)。',
|
rezaiqi_info:'结束阶段开始时,你可以令至多X名角色选择一项:1.摸一张牌,2.令你回复1点体力(X为本回合进入弃牌堆的红色牌数)。',
|
||||||
ol_jiangwei:'界姜维',
|
|
||||||
ol_jiangwei_prefix:'界',
|
|
||||||
ol_caiwenji:'界蔡琰',
|
ol_caiwenji:'界蔡琰',
|
||||||
ol_caiwenji_prefix:'界',
|
ol_caiwenji_prefix:'界',
|
||||||
retuntian:'屯田',
|
retuntian:'屯田',
|
||||||
|
|
|
@ -101,6 +101,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return get.damageEffect(target,player,player);
|
return get.damageEffect(target,player,player);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
combo:'nzry_mingren',
|
||||||
},
|
},
|
||||||
group:'sbzhenliang_draw',
|
group:'sbzhenliang_draw',
|
||||||
subSkill:{
|
subSkill:{
|
||||||
|
@ -129,7 +130,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ai:{combo:'nzry_mingren'},
|
|
||||||
},
|
},
|
||||||
//小乔
|
//小乔
|
||||||
sbtianxiang:{
|
sbtianxiang:{
|
||||||
|
@ -1289,7 +1289,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
sblianhuan:{
|
sblianhuan:{
|
||||||
audio:2,
|
audio:2,
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
filterCard:{suit:'club'},
|
|
||||||
filter:(event,player)=>player.hasCard(card=>lib.skill.sblianhuan.filterCard(card,player),lib.skill.sblianhuan.position),
|
filter:(event,player)=>player.hasCard(card=>lib.skill.sblianhuan.filterCard(card,player),lib.skill.sblianhuan.position),
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
if(player.hasSkill('sblianhuan_blocker')) return false;
|
if(player.hasSkill('sblianhuan_blocker')) return false;
|
||||||
|
|
|
@ -750,7 +750,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.line(player,trigger.player);
|
player.line(player,trigger.player);
|
||||||
player.logSkill('drlt_zhenrong');
|
player.logSkill('drlt_zhenrong');
|
||||||
player.addToExpansion(result.links,trigger.player,'give','log').gaintag.add('drlt_zhenrong');
|
player.addToExpansion(result.links,trigger.player,'give','log').gaintag.add('drlt_zhenrong');
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"drlt_hongju":{
|
"drlt_hongju":{
|
||||||
|
@ -822,11 +822,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var cards=result.links;
|
var cards=result.links;
|
||||||
for(var i=0;i<cards.length;i++){
|
for(var i=0;i<cards.length;i++){
|
||||||
player.storage.drlt_zhenrong.remove(cards[i]);
|
player.storage.drlt_zhenrong.remove(cards[i]);
|
||||||
};
|
}
|
||||||
player.syncStorage('drlt_zhenrong');
|
player.syncStorage('drlt_zhenrong');
|
||||||
player.$throw(cards);
|
player.$throw(cards);
|
||||||
player.discardPlayerCard(target,'ej',1,true);
|
player.discardPlayerCard(target,'ej',1,true);
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:13,
|
order:13,
|
||||||
|
@ -1268,7 +1268,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.addTempSkill('drlt_yongsi1',{player:'phaseDiscardAfter'});
|
player.addTempSkill('drlt_yongsi1',{player:'phaseDiscardAfter'});
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1482,7 +1482,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var num=1;
|
var num=1;
|
||||||
if(get.type(result.cards[0])=='equip') num=2;
|
if(get.type(result.cards[0])=='equip') num=2;
|
||||||
player.draw(num);
|
player.draw(num);
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
drlt_wanglie:{
|
drlt_wanglie:{
|
||||||
|
@ -1820,7 +1820,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},'选择一名装备区里牌数大于你的角色').ai=function(target){
|
},'选择一名装备区里牌数大于你的角色').ai=function(target){
|
||||||
return -get.attitude(player,target)
|
return -get.attitude(player,target)
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
'step 2'
|
'step 2'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
event.target=result.targets[0];
|
event.target=result.targets[0];
|
||||||
|
@ -1846,7 +1846,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 3'
|
'step 3'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
target.give(result.cards,player);
|
target.give(result.cards,player);
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:11,
|
order:11,
|
||||||
|
@ -1958,14 +1958,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
else event._result={index:0};
|
else event._result={index:0};
|
||||||
}else{
|
}else{
|
||||||
event.finish();
|
event.finish();
|
||||||
};
|
}
|
||||||
'step 2'
|
'step 2'
|
||||||
player.logSkill('nzry_yili',target);
|
player.logSkill('nzry_yili',target);
|
||||||
if(result.index==1){
|
if(result.index==1){
|
||||||
player.removeMark('nzry_huaiju',1);
|
player.removeMark('nzry_huaiju',1);
|
||||||
}else{
|
}else{
|
||||||
player.loseHp();
|
player.loseHp();
|
||||||
};
|
}
|
||||||
target.addMark('nzry_huaiju',1);
|
target.addMark('nzry_huaiju',1);
|
||||||
target.addSkill('nzry_huaiju_ai');
|
target.addSkill('nzry_huaiju_ai');
|
||||||
},
|
},
|
||||||
|
@ -2024,7 +2024,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var num=0;
|
var num=0;
|
||||||
for(var i=0;i<targets.length;i++){
|
for(var i=0;i<targets.length;i++){
|
||||||
num+=targets[i].hp;
|
num+=targets[i].hp;
|
||||||
};
|
}
|
||||||
return num+target.hp<=_status.event.num;
|
return num+target.hp<=_status.event.num;
|
||||||
}).set('ai',function(target){
|
}).set('ai',function(target){
|
||||||
if(ui.selected.targets[0]!=undefined) return -1;
|
if(ui.selected.targets[0]!=undefined) return -1;
|
||||||
|
@ -2043,7 +2043,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.chooseTarget('请选择〖溃诛〗的目标',[1,event.num]).ai=function(target){
|
player.chooseTarget('请选择〖溃诛〗的目标',[1,event.num]).ai=function(target){
|
||||||
return get.attitude(player,target);
|
return get.attitude(player,target);
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
'step 3'
|
'step 3'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var targets=result.targets.sortBySeat();
|
var targets=result.targets.sortBySeat();
|
||||||
|
@ -2056,7 +2056,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var num=0;
|
var num=0;
|
||||||
for(var i=0;i<targets.length;i++){
|
for(var i=0;i<targets.length;i++){
|
||||||
num+=targets[i].hp;
|
num+=targets[i].hp;
|
||||||
};
|
}
|
||||||
if(num<event.num){
|
if(num<event.num){
|
||||||
event.bool=false;
|
event.bool=false;
|
||||||
event.goto(2);
|
event.goto(2);
|
||||||
|
@ -2066,11 +2066,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.logSkill('nzry_kuizhu',targets);
|
player.logSkill('nzry_kuizhu',targets);
|
||||||
for(var i=0;i<targets.length;i++){
|
for(var i=0;i<targets.length;i++){
|
||||||
targets[i].damage();
|
targets[i].damage();
|
||||||
};
|
}
|
||||||
//if(targets.length>=2) player.loseHp();
|
//if(targets.length>=2) player.loseHp();
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
rechezheng:{
|
rechezheng:{
|
||||||
|
@ -2122,7 +2122,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.line(result.targets);
|
player.line(result.targets);
|
||||||
player.discardPlayerCard(result.targets[0],'he',1,true);
|
player.discardPlayerCard(result.targets[0],'he',1,true);
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
group:'rechezheng',
|
group:'rechezheng',
|
||||||
},
|
},
|
||||||
|
@ -2234,7 +2234,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
player.markSkill('nzry_chenglve');
|
player.markSkill('nzry_chenglve');
|
||||||
player.addTempSkill('nzry_chenglve1');
|
player.addTempSkill('nzry_chenglve1');
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:2.7,
|
order:2.7,
|
||||||
|
@ -2252,13 +2252,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var cards=player.storage.nzry_chenglve1;
|
var cards=player.storage.nzry_chenglve1;
|
||||||
for(var i=0;i<cards.length;i++){
|
for(var i=0;i<cards.length;i++){
|
||||||
if(cards[i]==get.suit(card)) return Infinity;
|
if(cards[i]==get.suit(card)) return Infinity;
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
targetInRange:function(card,player){
|
targetInRange:function(card,player){
|
||||||
var cards=player.storage.nzry_chenglve1;
|
var cards=player.storage.nzry_chenglve1;
|
||||||
for(var i=0;i<cards.length;i++){
|
for(var i=0;i<cards.length;i++){
|
||||||
if(cards[i]==get.suit(card)) return true;
|
if(cards[i]==get.suit(card)) return true;
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onremove:true,
|
onremove:true,
|
||||||
|
@ -2388,7 +2388,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 2'
|
'step 2'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.addToExpansion(result.cards[0],player,'give','log').gaintag.add('nzry_mingren');
|
player.addToExpansion(result.cards[0],player,'give','log').gaintag.add('nzry_mingren');
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
2:{
|
2:{
|
||||||
|
@ -2425,7 +2425,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.addToExpansion(result.cards[0],'log','give',player).gaintag.add('nzry_mingren');
|
player.addToExpansion(result.cards[0],'log','give',player).gaintag.add('nzry_mingren');
|
||||||
var card=player.getExpansions('nzry_mingren')[0];
|
var card=player.getExpansions('nzry_mingren')[0];
|
||||||
if(card) player.gain(card,'gain2');
|
if(card) player.gain(card,'gain2');
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -2591,12 +2591,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.finish();
|
event.finish();
|
||||||
};
|
}
|
||||||
'step 2'
|
'step 2'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.line(result.targets);
|
player.line(result.targets);
|
||||||
result.targets[0].draw(4-result.targets[0].countCards('h'))
|
result.targets[0].draw(4-result.targets[0].countCards('h'))
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:1,
|
order:1,
|
||||||
|
@ -2633,7 +2633,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
trigger.source.storage.nzry_shenshi1=result.cards[0];
|
trigger.source.storage.nzry_shenshi1=result.cards[0];
|
||||||
trigger.source.storage.nzry_shenshi2=player;
|
trigger.source.storage.nzry_shenshi2=player;
|
||||||
trigger.source.addSkill('nzry_shenshi1');
|
trigger.source.addSkill('nzry_shenshi1');
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -2654,7 +2654,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(player.getCards('he').contains(card)&&4-pl.countCards('h')>0){
|
if(player.getCards('he').contains(card)&&4-pl.countCards('h')>0){
|
||||||
pl.draw(4-pl.countCards('h'));
|
pl.draw(4-pl.countCards('h'));
|
||||||
pl.logSkill('nzry_shenshi');
|
pl.logSkill('nzry_shenshi');
|
||||||
};
|
}
|
||||||
player.removeSkill('nzry_shenshi1');
|
player.removeSkill('nzry_shenshi1');
|
||||||
delete player.storage.nzry_shenshi1;
|
delete player.storage.nzry_shenshi1;
|
||||||
delete player.storage.nzry_shenshi2;
|
delete player.storage.nzry_shenshi2;
|
||||||
|
@ -3698,7 +3698,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 2'
|
'step 2'
|
||||||
if(!result.bool&&!event.directbool){
|
if(!result.bool&&!event.directbool){
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
player.addToExpansion(event.card,'gain2').gaintag.add('tuntian');
|
player.addToExpansion(event.card,'gain2').gaintag.add('tuntian');
|
||||||
},
|
},
|
||||||
callback:function(){
|
callback:function(){
|
||||||
|
@ -3731,7 +3731,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
locked:false,
|
|
||||||
ai:{
|
ai:{
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target,current){
|
target:function(card,player,target,current){
|
||||||
|
@ -7080,7 +7079,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(cards[i]!=card&&get.number(cards[i])==num){
|
if(cards[i]!=card&&get.number(cards[i])==num){
|
||||||
player.loseToDiscardpile(card);
|
player.loseToDiscardpile(card);
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
trigger.cancel();
|
trigger.cancel();
|
||||||
trigger.result={bool:true};
|
trigger.result={bool:true};
|
||||||
|
|
|
@ -435,6 +435,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
else{
|
else{
|
||||||
evt.finish();
|
evt.finish();
|
||||||
evt._triggered=null;
|
evt._triggered=null;
|
||||||
|
if(evt.name.startsWith('pre_')){
|
||||||
|
var evtx=evt.getParent();
|
||||||
|
evtx.finish();
|
||||||
|
evtx._triggered=null;
|
||||||
|
}
|
||||||
var nexts=trigger.next.slice();
|
var nexts=trigger.next.slice();
|
||||||
for(var next of nexts){
|
for(var next of nexts){
|
||||||
if(next.name=='judgeCallback') trigger.next.remove(next);
|
if(next.name=='judgeCallback') trigger.next.remove(next);
|
||||||
|
@ -2053,7 +2058,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(!list.contains(type)){
|
if(!list.contains(type)){
|
||||||
list.push(type);
|
list.push(type);
|
||||||
cards.push(ui.cardPile.childNodes[i])
|
cards.push(ui.cardPile.childNodes[i])
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
player.gain(cards,'gain2').gaintag.add('zhangming');
|
player.gain(cards,'gain2').gaintag.add('zhangming');
|
||||||
player.addTempSkill('zhangming_keep');
|
player.addTempSkill('zhangming_keep');
|
||||||
|
@ -4860,7 +4865,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(!list.contains(type)){
|
if(!list.contains(type)){
|
||||||
list.push(type);
|
list.push(type);
|
||||||
cards.push(ui.cardPile.childNodes[i])
|
cards.push(ui.cardPile.childNodes[i])
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
player.gain(cards,'gain2');
|
player.gain(cards,'gain2');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1574,7 +1574,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
chooseButton:{
|
chooseButton:{
|
||||||
dialog:function(event,player){
|
dialog:function(event,player){
|
||||||
return ui.create.dialog(
|
return ui.create.dialog(
|
||||||
'###缚豕###<div class="text center">重铸任意“缚豕”牌,视为使用一张【杀】并执行等量项</div>',
|
'###缚豕###<div class="text center">将任意“缚豕”牌置入弃牌堆,视为使用一张【杀】并执行等量项</div>',
|
||||||
player.getExpansions('olfushi'),
|
player.getExpansions('olfushi'),
|
||||||
[['额外目标','伤害-1','伤害+1'],'tdnodes'],
|
[['额外目标','伤害-1','伤害+1'],'tdnodes'],
|
||||||
'hidden'
|
'hidden'
|
||||||
|
@ -1686,7 +1686,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
delete event.result.skill;
|
delete event.result.skill;
|
||||||
event.result.card=new lib.element.VCard(lib.skill.olfushi_wusheng_backup.viewAs);
|
event.result.card=new lib.element.VCard(lib.skill.olfushi_wusheng_backup.viewAs);
|
||||||
event.result.cards=[];
|
event.result.cards=[];
|
||||||
player.recast(cards);
|
player.loseToDiscardpile(cards);
|
||||||
event.result.card.storage.olfushi_buff=controls;
|
event.result.card.storage.olfushi_buff=controls;
|
||||||
player.addTempSkill('olfushi_buff');
|
player.addTempSkill('olfushi_buff');
|
||||||
}
|
}
|
||||||
|
@ -1695,7 +1695,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
prompt:function(links,player){
|
prompt:function(links,player){
|
||||||
let controls=links.filter(button=>typeof button=='string');
|
let controls=links.filter(button=>typeof button=='string');
|
||||||
if(!controls.length) controls=['额外目标','伤害-1','伤害+1'];
|
if(!controls.length) controls=['额外目标','伤害-1','伤害+1'];
|
||||||
return `选择【杀】的目标(${controls.join('、')})`;
|
return `请选择【杀】的目标(${controls.join('、')})`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -1937,17 +1937,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
switch(get.sgn(get.attitude(player,target))){
|
switch(get.sgn(get.attitude(player,target))){
|
||||||
case 0:
|
case 0:
|
||||||
return 2;
|
return 2;
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
if(num1-1>=num2) return 0;
|
if(num1-1>=num2) return 0;
|
||||||
if(num1+1<=num2) return 1;
|
if(num1+1<=num2) return 1;
|
||||||
return 2;
|
return 2;
|
||||||
break;
|
|
||||||
case -1:
|
case -1:
|
||||||
if(num1-2<=num2) return 0;
|
if(num1-2<=num2) return 0;
|
||||||
if(num1+3>=num2) return 1;
|
if(num1+3>=num2) return 1;
|
||||||
return 2;
|
return 2;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}).set('prompt',get.prompt('olrunwei',trigger.player));
|
}).set('prompt',get.prompt('olrunwei',trigger.player));
|
||||||
'step 1'
|
'step 1'
|
||||||
|
@ -5690,7 +5687,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var cards1=list[0][1].slice(),cards2=list[1][1].slice();
|
var cards1=list[0][1].slice(),cards2=list[1][1].slice();
|
||||||
var card1=cards1.sort((a,b)=>get.value(b)-get.value(a))[0];
|
var card1=cards1.sort((a,b)=>get.value(b)-get.value(a))[0];
|
||||||
var card2=cards2.sort((a,b)=>get.value(a)-get.value(b))[0];
|
var card2=cards2.sort((a,b)=>get.value(a)-get.value(b))[0];
|
||||||
if(get.value(card1)>get.value(card2)){
|
if(card1&&card2&&get.value(card1)>get.value(card2)){
|
||||||
cards1.remove(card1);
|
cards1.remove(card1);
|
||||||
cards2.remove(card2);
|
cards2.remove(card2);
|
||||||
cards1.push(card2);
|
cards1.push(card2);
|
||||||
|
@ -6253,7 +6250,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
else used.push(name);
|
else used.push(name);
|
||||||
}
|
}
|
||||||
else used.push(name);
|
else used.push(name);
|
||||||
};
|
}
|
||||||
if(info.isRound) break;
|
if(info.isRound) break;
|
||||||
}
|
}
|
||||||
var vcards=[];
|
var vcards=[];
|
||||||
|
@ -7261,7 +7258,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(evt.card.nature) natures.remove(evt.card.nature);
|
if(evt.card.nature) natures.remove(evt.card.nature);
|
||||||
}
|
}
|
||||||
else tricks.remove(name);
|
else tricks.remove(name);
|
||||||
};
|
}
|
||||||
if(info.isRound) break;
|
if(info.isRound) break;
|
||||||
}
|
}
|
||||||
var vcards=[];
|
var vcards=[];
|
||||||
|
@ -12689,10 +12686,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return 5-val;
|
return 5-val;
|
||||||
}
|
}
|
||||||
switch(button.link){
|
switch(button.link){
|
||||||
case 3:return 4.5;break;
|
case 3:return 4.5;
|
||||||
case 4:return 4.4;break;
|
case 4:return 4.4;
|
||||||
case 5:return 4.3;break;
|
case 5:return 4.3;
|
||||||
case 2:return (3-player.hp)*1.5;break;
|
case 2:return (3-player.hp)*1.5;
|
||||||
case 1:{
|
case 1:{
|
||||||
if(game.hasPlayer(function(current){
|
if(game.hasPlayer(function(current){
|
||||||
return (get.realAttitude||get.attitude)(player,current)<0&&get.distance(player,current)>1;
|
return (get.realAttitude||get.attitude)(player,current)<0&&get.distance(player,current)>1;
|
||||||
|
@ -12913,7 +12910,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
filterCard:{color:'black'},
|
filterCard:{color:'black'},
|
||||||
position:'hes',
|
position:'hes',
|
||||||
audio:'niluan',
|
|
||||||
viewAsFilter:function(player){
|
viewAsFilter:function(player){
|
||||||
return player.countCards('hes',lib.skill.spniluan.filterCard)>0;
|
return player.countCards('hes',lib.skill.spniluan.filterCard)>0;
|
||||||
},
|
},
|
||||||
|
@ -13422,7 +13418,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
backup:function(links,player){
|
backup:function(links,player){
|
||||||
return {
|
return {
|
||||||
audio:'jingong',
|
audio:'jingong',
|
||||||
filterCard:true,
|
|
||||||
popname:true,
|
popname:true,
|
||||||
position:'hes',
|
position:'hes',
|
||||||
viewAs:{name:links[0][2]},
|
viewAs:{name:links[0][2]},
|
||||||
|
@ -14707,7 +14702,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
popup:false,
|
popup:false,
|
||||||
onremove:true,
|
|
||||||
firstDo:true,
|
firstDo:true,
|
||||||
init:function(player,skill){
|
init:function(player,skill){
|
||||||
player.storage[skill]=0;
|
player.storage[skill]=0;
|
||||||
|
@ -15627,7 +15621,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
backup:function(links,player){
|
backup:function(links,player){
|
||||||
return {
|
return {
|
||||||
audio:'jingong',
|
audio:'jingong',
|
||||||
filterCard:true,
|
|
||||||
popname:true,
|
popname:true,
|
||||||
position:'hes',
|
position:'hes',
|
||||||
viewAs:{name:links[0][2]},
|
viewAs:{name:links[0][2]},
|
||||||
|
@ -20721,7 +20714,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
next.set('filterButton',function(button){
|
next.set('filterButton',function(button){
|
||||||
if(button.link==2){
|
if(button.link==2){
|
||||||
return _status.event.bool1;
|
return _status.event.bool1;
|
||||||
};
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
next.set('bool1',trigger.player.isDamaged());
|
next.set('bool1',trigger.player.isDamaged());
|
||||||
|
@ -22621,7 +22614,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
"step 4"
|
"step 4"
|
||||||
target.give(result.cards,player);
|
target.give(result.cards,player);
|
||||||
},
|
},
|
||||||
audio:2,
|
|
||||||
},
|
},
|
||||||
xiongyi:{
|
xiongyi:{
|
||||||
skillAnimation:true,
|
skillAnimation:true,
|
||||||
|
@ -26454,7 +26446,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
skill_feiyi_B_info:'每回合每项限一次,当你的手牌数变为1后,你可以展示此唯一手牌A并摸一张牌,然后你选择一项:①本回合使用点数大于A的点数的牌额外结算一次;②本回合使用点数小于A的点数的牌额外结算一次。',
|
skill_feiyi_B_info:'每回合每项限一次,当你的手牌数变为1后,你可以展示此唯一手牌A并摸一张牌,然后你选择一项:①本回合使用点数大于A的点数的牌额外结算一次;②本回合使用点数小于A的点数的牌额外结算一次。',
|
||||||
lvboshe:'吕伯奢',
|
lvboshe:'吕伯奢',
|
||||||
olfushi:'缚豕',
|
olfushi:'缚豕',
|
||||||
olfushi_info:'①一名角色使用【杀】结算结束后,若你至其的距离不大于1,你将此【杀】对应的所有实体牌置于武将牌上。②当你需要使用一张【杀】时,你可以重铸任意张“缚豕”牌,视为使用一张【杀】并选择X项(X为你以此法重铸的牌数且至多为3):1.你为此【杀】额外指定一个目标;2.你选择此【杀】的一个目标角色,此牌对其造成的伤害-1;3.你选择此【杀】的一个目标角色,此【杀】对其造成的伤害+1。当此【杀】指定最后一个目标后,若此牌被选择的效果选项相邻且此牌的目标角色座位连续,则此【杀】不计入次数限制。',
|
olfushi_info:'①一名角色使用【杀】结算结束后,若你至其的距离不大于1,你将此【杀】对应的所有实体牌置于武将牌上。②当你需要使用一张【杀】时,你可以将任意张“缚豕”牌置入弃牌堆,视为使用一张【杀】并选择X项(X为你以此法重铸的牌数且至多为3):1.你为此【杀】额外指定一个目标;2.你选择此【杀】的一个目标角色,此牌对其造成的伤害-1;3.你选择此【杀】的一个目标角色,此【杀】对其造成的伤害+1。当此【杀】指定最后一个目标后,若此牌被选择的效果选项相邻且此牌的目标角色座位连续,则此【杀】不计入次数限制。',
|
||||||
oldongdao:'东道',
|
oldongdao:'东道',
|
||||||
oldongdao_info:'农民的回合结束时:阴,你可以令地主进行一个额外回合;阳,其可以进行一个额外回合。',
|
oldongdao_info:'农民的回合结束时:阴,你可以令地主进行一个额外回合;阳,其可以进行一个额外回合。',
|
||||||
zhangyan:'张燕',
|
zhangyan:'张燕',
|
||||||
|
|
352
character/sp2.js
352
character/sp2.js
|
@ -4,7 +4,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
name:'sp2',
|
name:'sp2',
|
||||||
connect:true,
|
connect:true,
|
||||||
character:{
|
character:{
|
||||||
|
star_yuanshu:['male','qun',4,['starcanxi','starpizhi','starzhonggu'],['zhu']],
|
||||||
star_caoren:['male','wei',4,['starsujun','starlifeng']],
|
star_caoren:['male','wei',4,['starsujun','starlifeng']],
|
||||||
|
mp_liuling:['male','jin',3,['mpjiusong','mpmaotao','mpbishi'],['doublegroup:wei:qun:jin']],
|
||||||
dc_jikang:['male','wei',3,['new_qingxian','dcjuexiang']],
|
dc_jikang:['male','wei',3,['new_qingxian','dcjuexiang']],
|
||||||
dc_jsp_guanyu:['male','wei',4,['new_rewusheng','dcdanji']],
|
dc_jsp_guanyu:['male','wei',4,['new_rewusheng','dcdanji']],
|
||||||
dc_mengda:['male','wei',4,['dclibang','dcwujie']],
|
dc_mengda:['male','wei',4,['dclibang','dcwujie']],
|
||||||
|
@ -55,7 +57,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
dongxie:['female','qun',4,['dcjiaoxia','dchumei']],
|
dongxie:['female','qun',4,['dcjiaoxia','dchumei']],
|
||||||
wangrong:['female','qun',3,['minsi','jijing','zhuide']],
|
wangrong:['female','qun',3,['minsi','jijing','zhuide']],
|
||||||
ol_dingyuan:['male','qun',4,['cixiao','xianshuai']],
|
ol_dingyuan:['male','qun',4,['cixiao','xianshuai']],
|
||||||
xin_baosanniang:['female','shu',3,['decadewuniang','decadexushen']],
|
|
||||||
re_hejin:['male','qun',4,['spmouzhu','spyanhuo']],
|
re_hejin:['male','qun',4,['spmouzhu','spyanhuo']],
|
||||||
re_hansui:['male','qun',4,['spniluan','spweiwu']],
|
re_hansui:['male','qun',4,['spniluan','spweiwu']],
|
||||||
liuhong:['male','qun',4,['yujue','tuxing']],
|
liuhong:['male','qun',4,['yujue','tuxing']],
|
||||||
|
@ -108,11 +109,210 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
sp_xuzhou:['re_taoqian','caosong','zhangmiao','qiuliju'],
|
sp_xuzhou:['re_taoqian','caosong','zhangmiao','qiuliju'],
|
||||||
sp_zhongyuan:['re_hucheer','re_zoushi','caoanmin','re_dongcheng'],
|
sp_zhongyuan:['re_hucheer','re_zoushi','caoanmin','re_dongcheng'],
|
||||||
sp_xiaohu:['haomeng','yanfuren','yanrou','dc_zhuling'],
|
sp_xiaohu:['haomeng','yanfuren','yanrou','dc_zhuling'],
|
||||||
sp_star:['star_caoren'],
|
sp_star:['star_caoren','star_yuanshu'],
|
||||||
sp_decade:['caobuxing','re_maliang','xin_baosanniang','dc_jikang'],
|
mini_qixian:['mp_liuling'],
|
||||||
|
sp_decade:['caobuxing','re_maliang','dc_jikang'],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
|
//星袁术
|
||||||
|
starcanxi:{
|
||||||
|
audio:2,
|
||||||
|
trigger:{
|
||||||
|
global:['phaseBefore','roundStart'],
|
||||||
|
player:'enterGame',
|
||||||
|
},
|
||||||
|
filter:function(event,player,name){
|
||||||
|
if(name=='roundStart') return player.getSkills().some(skill=>skill.indexOf('starcanxi_')==0);
|
||||||
|
return event.name!='phase'||game.phaseNumber==0;
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
if(event.triggername!='roundStart'){
|
||||||
|
var list=game.filterPlayer().reduce((list,target)=>list.add(target.group),[]);
|
||||||
|
list.sort((a,b)=>lib.group.indexOf(a)-lib.group.indexOf(b));
|
||||||
|
list.forEach(group=>lib.skill.starcanxi.create(group,player));
|
||||||
|
}
|
||||||
|
'step 1'
|
||||||
|
var groups=player.getSkills().filter(skill=>skill.indexOf('starcanxi_')==0);
|
||||||
|
groups=groups.map(group=>group.slice(10));
|
||||||
|
groups.sort((a,b)=>lib.group.indexOf(a)-lib.group.indexOf(b));
|
||||||
|
var map={};
|
||||||
|
groups.forEach(group=>map[group]=get.translation(group+'2'));
|
||||||
|
event.map=map;
|
||||||
|
player.chooseButton([
|
||||||
|
'###残玺###<div class="text center">请选择势力和效果</div>',
|
||||||
|
[Object.values(map),'tdnodes'],
|
||||||
|
[[
|
||||||
|
['wangsheng','<div class="popup text" style="width:calc(100% - 10px);display:inline-block"><div class="skill">【妄生】</div><div>被选择势力角色每回合首次造成的伤害+1且计算与其他角色间的距离-1</div></div>'],
|
||||||
|
['xiangsi','<div class="popup text" style="width:calc(100% - 10px);display:inline-block"><div class="skill">【向死】</div><div>其他被选择势力角色每回合首次回复体力后失去1点体力且每回合对你使用的第一张牌无效</div></div>']
|
||||||
|
],'textbutton']
|
||||||
|
],2,true).set('filterButton',function(button){
|
||||||
|
var list=['wangsheng','xiangsi'];
|
||||||
|
if(!ui.selected.buttons.length) return true;
|
||||||
|
return list.includes(ui.selected.buttons[0].link)!=list.includes(button.link);
|
||||||
|
}).set('ai',function(button){
|
||||||
|
var player=_status.event.player;
|
||||||
|
var map=_status.event.map,list=['wangsheng','xiangsi'];
|
||||||
|
var getNum=function(group,effect){
|
||||||
|
var num=0,sgn=effect=='wangsheng'?1.05:-1;
|
||||||
|
game.countPlayer(function(current){
|
||||||
|
if(!(current==player&&sgn==-1)) num+=get.sgn(get.attitude(player,current))*sgn;
|
||||||
|
});
|
||||||
|
return num;
|
||||||
|
};
|
||||||
|
var listx=[];
|
||||||
|
Object.keys(map).forEach(group=>list.forEach(effect=>listx.add([group,effect])));
|
||||||
|
listx.sort((a,b)=>getNum(b[0],b[1])-getNum(a[0],a[1]));
|
||||||
|
if(button.link==map[listx[0][0]]||button.link==listx[0][1]) return 1;
|
||||||
|
return 0;
|
||||||
|
}).set('map',map);
|
||||||
|
'step 2'
|
||||||
|
if(result.bool){
|
||||||
|
if(!Object.keys(event.map).some(group=>event.map[group]==result.links[0])) result.links.reverse();
|
||||||
|
player.popup(result.links[0]);
|
||||||
|
var group=Object.keys(event.map).find(group=>event.map[group]==result.links[0]);
|
||||||
|
var skill='starcanxi_'+result.links[1];
|
||||||
|
player.popup(skill);
|
||||||
|
game.log(player,'选择了','#g'+result.links[0],'、','#y'+get.translation(skill));
|
||||||
|
player.addTempSkill(skill,'roundStart');
|
||||||
|
player.markAuto(skill,[group]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
create:function(group,player){
|
||||||
|
if(!lib.skill['starcanxi_'+group]){
|
||||||
|
lib.skill['starcanxi_'+group]={
|
||||||
|
mark:true,
|
||||||
|
charlotte:true,
|
||||||
|
onremove:function(player){
|
||||||
|
player.addMark('starpizhi',1,false);
|
||||||
|
},
|
||||||
|
intro:{content:'玉玺的一角'},
|
||||||
|
};
|
||||||
|
lib.translate['starcanxi_'+group]='残玺·'+get.translation(group+'2');
|
||||||
|
lib.skill['starcanxi_'+group].marktext=get.translation(group);
|
||||||
|
lib.translate['starcanxi_'+group+'_bg']=get.translation(group);
|
||||||
|
}
|
||||||
|
player.addSkill('starcanxi_'+group);
|
||||||
|
},
|
||||||
|
subSkill:{
|
||||||
|
wangsheng:{
|
||||||
|
charlotte:true,
|
||||||
|
onremove:true,
|
||||||
|
trigger:{global:'damageBegin1'},
|
||||||
|
filter:function(event,player){
|
||||||
|
if(!event.source||!player.getStorage('starcanxi_wangsheng').includes(event.source.group)) return false;
|
||||||
|
return !event.source.getHistory('sourceDamage').length;
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
logTarget:'source',
|
||||||
|
content:function(){
|
||||||
|
trigger.num++;
|
||||||
|
},
|
||||||
|
group:'starcanxi_remove',
|
||||||
|
global:'starcanxi_effect',
|
||||||
|
intro:{content:'$势力角色每回合首次造成的伤害+1且计算与其他角色间的距离-1'},
|
||||||
|
},
|
||||||
|
xiangsi:{
|
||||||
|
charlotte:true,
|
||||||
|
onremove:true,
|
||||||
|
trigger:{global:'recoverEnd'},
|
||||||
|
filter:function(event,player){
|
||||||
|
if(!player.getStorage('starcanxi_xiangsi').includes(event.player.group)||event.player==player) return false;
|
||||||
|
return game.getGlobalHistory('changeHp',function(evt){
|
||||||
|
return evt.getParent().name=='recover'&&evt.player==event.player;
|
||||||
|
}).length==1;
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
logTarget:'player',
|
||||||
|
content:function(){
|
||||||
|
trigger.player.loseHp();
|
||||||
|
},
|
||||||
|
group:['starcanxi_remove','starcanxi_cancel'],
|
||||||
|
global:'starcanxi_effect',
|
||||||
|
intro:{content:'其他$势力角色每回合首次回复体力后失去1点体力且每回合对你使用的第一张牌无效'},
|
||||||
|
},
|
||||||
|
cancel:{
|
||||||
|
charlotte:true,
|
||||||
|
trigger:{global:'useCard'},
|
||||||
|
filter:function(event,player){
|
||||||
|
if(!event.targets||!event.targets.includes(player)||!player.getStorage('starcanxi_xiangsi').includes(event.player.group)||event.player==player) return false;
|
||||||
|
return event.player.getHistory('useCard',evt=>evt.targets&&evt.targets.includes(player)).indexOf(event)==0;
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
logTarget:'player',
|
||||||
|
content:function(){
|
||||||
|
trigger.excluded.add(player);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
effect:{
|
||||||
|
mod:{
|
||||||
|
globalFrom:function(from,to,distance){
|
||||||
|
if(game.hasPlayer(target=>target.getStorage('starcanxi_wangsheng').includes(from.group))) return distance-1;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
effect:{
|
||||||
|
player_use:function(card,player,target){
|
||||||
|
var targets=game.filterPlayer(targetx=>targetx!=player&&targetx.getStorage('starcanxi_xiangsi').includes(player.group));
|
||||||
|
if(!targets.length) return;
|
||||||
|
if(get.tag(card,'recover')&&target==player&&target.hp>2) return 0;
|
||||||
|
if(get.tag(card,'damage')&&targets.includes(target)) return 0.5;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
remove:{
|
||||||
|
charlotte:true,
|
||||||
|
trigger:{player:'die'},
|
||||||
|
forced:true,
|
||||||
|
popup:false,
|
||||||
|
firstDo:true,
|
||||||
|
forceDie:true,
|
||||||
|
content:function(){
|
||||||
|
player.removeSkill('starcanxi_wangsheng');
|
||||||
|
player.removeSkill('starcanxi_xiangsi');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
starpizhi:{
|
||||||
|
audio:2,
|
||||||
|
trigger:{player:'phaseEnd',global:'die'},
|
||||||
|
filter:function(event,player){
|
||||||
|
if(event.name=='phase') return player.hasMark('starpizhi');
|
||||||
|
var groups=player.getSkills().filter(skill=>skill.indexOf('starcanxi_')==0);
|
||||||
|
groups=groups.map(group=>group.slice(10));
|
||||||
|
return groups.includes(event.player.group);
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
if(trigger.name=='die'){
|
||||||
|
var skills=player.getSkills().filter(skill=>skill.indexOf('starcanxi_')==0&&skill.slice(10)==trigger.player.group);
|
||||||
|
player.removeSkill(skills);
|
||||||
|
}
|
||||||
|
'step 1'
|
||||||
|
player.draw(player.countMark('starpizhi'));
|
||||||
|
},
|
||||||
|
intro:{content:'已失去#个“玺角”'},
|
||||||
|
ai:{combo:'starcanxi'},
|
||||||
|
},
|
||||||
|
starzhonggu:{
|
||||||
|
unique:true,
|
||||||
|
audio:2,
|
||||||
|
trigger:{player:'phaseDrawBegin2'},
|
||||||
|
filter:function(event,player){
|
||||||
|
return !event.numFixed;
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
zhuSkill:true,
|
||||||
|
content:function(){
|
||||||
|
var num=(game.roundNumber>=game.countPlayer(current=>current.group=='qun')?2:-1);
|
||||||
|
trigger.num+=num;
|
||||||
|
},
|
||||||
|
},
|
||||||
//星曹仁
|
//星曹仁
|
||||||
starsujun:{
|
starsujun:{
|
||||||
audio:2,
|
audio:2,
|
||||||
|
@ -139,7 +339,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
enable:'chooseToUse',
|
enable:'chooseToUse',
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!event.filterCard({name:'sha'},player,event)&&!event.filterCard({name:'wuxie'},player,event)) return false;
|
if(!event.filterCard({name:'sha'},player,event)&&!event.filterCard({name:'wuxie'},player,event)) return false;
|
||||||
return player.countCards('h',card=>{
|
return player.countCards('hs',card=>{
|
||||||
return !player.getStorage('starlifeng_count').contains(get.color(card,player))||_status.connectMode;
|
return !player.getStorage('starlifeng_count').contains(get.color(card,player))||_status.connectMode;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -165,7 +365,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
event.getParent().addCount=false;
|
event.getParent().addCount=false;
|
||||||
},
|
},
|
||||||
popname:true,
|
popname:true,
|
||||||
position:'h',
|
|
||||||
viewAs:{
|
viewAs:{
|
||||||
name:links[0][2],
|
name:links[0][2],
|
||||||
},
|
},
|
||||||
|
@ -185,7 +384,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
hiddenCard:function(player,name){
|
hiddenCard:function(player,name){
|
||||||
if(name=='wuxie') return player.countCards('h',card=>{
|
if(name=='wuxie') return player.countCards('hs',card=>{
|
||||||
return !player.getStorage('starlifeng_count').contains(get.color(card,player))||_status.connectMode;
|
return !player.getStorage('starlifeng_count').contains(get.color(card,player))||_status.connectMode;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -193,7 +392,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
respondSha:true,
|
respondSha:true,
|
||||||
skillTagFilter:function(player,tag,arg){
|
skillTagFilter:function(player,tag,arg){
|
||||||
if(arg=='respond') return false;
|
if(arg=='respond') return false;
|
||||||
if(!player.countCards('h',card=>{
|
if(!player.countCards('hs',card=>{
|
||||||
return !player.getStorage('starlifeng_count').contains(get.color(card,player))||_status.connectMode;
|
return !player.getStorage('starlifeng_count').contains(get.color(card,player))||_status.connectMode;
|
||||||
})) return false;
|
})) return false;
|
||||||
},
|
},
|
||||||
|
@ -222,6 +421,94 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
//小程序刘伶
|
||||||
|
mpjiusong:{
|
||||||
|
audio:2,
|
||||||
|
trigger:{global:'useCard'},
|
||||||
|
filter:function(event,player){
|
||||||
|
return event.card.name=='jiu'&&player.countMark('mpjiusong')<3;
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
locked:false,
|
||||||
|
content:function(){
|
||||||
|
player.addMark('mpjiusong');
|
||||||
|
},
|
||||||
|
marktext:'醉',
|
||||||
|
intro:{
|
||||||
|
name:'醉(酒颂/酕醄)',
|
||||||
|
name2:'醉',
|
||||||
|
content:'mark',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mpmaotao:{
|
||||||
|
audio:2,
|
||||||
|
trigger:{global:'useCardToPlayer'},
|
||||||
|
filter:function(event,player){
|
||||||
|
if(event.targets.length!=1||!event.isFirstTarget) return false;
|
||||||
|
return event.player!=player&&player.countMark('mpjiusong');
|
||||||
|
},
|
||||||
|
prompt2:function(event,player){
|
||||||
|
let list;
|
||||||
|
if(get.type(event.card)!='delay') list=game.filterPlayer(current=>{
|
||||||
|
return lib.filter.targetEnabled2(event.card,event.player,current);
|
||||||
|
});
|
||||||
|
else list=game.filterPlayer(current=>current.canAddJudge(event.card));
|
||||||
|
return `移去1枚“醉”,${list.length>1?`令${get.translation(event.card)}目标改为${get.translation(list)}中的一名随机角色。若新目标与原目标相同,你`:''}获得牌堆中的一张【酒】。`
|
||||||
|
},
|
||||||
|
check:function(event,player){
|
||||||
|
const eff=get.effect(event.target,event.card,player,player);
|
||||||
|
let list;
|
||||||
|
if(get.type(event.card)!='delay') list=game.filterPlayer(current=>{
|
||||||
|
return lib.filter.targetEnabled2(event.card,event.player,current);
|
||||||
|
});
|
||||||
|
else list=game.filterPlayer(current=>current.canAddJudge(event.card));
|
||||||
|
let list2=list.filter(current=>get.effect(current,event.card,player,player)>eff);
|
||||||
|
let list3=list.filter(current=>get.effect(current,event.card,player,player)>0);
|
||||||
|
return list2.length>=list.length/2||player.countMark('mpjiusong')>=2&&list3.length>=list.length/2;
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
player.removeMark('mpjiusong',1);
|
||||||
|
var list,oriTarget=trigger.target;
|
||||||
|
trigger.targets.remove(oriTarget);
|
||||||
|
trigger.getParent().triggeredTargets1.remove(oriTarget);
|
||||||
|
trigger.untrigger();
|
||||||
|
game.delayx();
|
||||||
|
if(get.type(trigger.card)!='delay') list=game.filterPlayer(current=>{
|
||||||
|
return lib.filter.targetEnabled2(trigger.card,trigger.player,current);
|
||||||
|
});
|
||||||
|
else list=game.filterPlayer(current=>current.canAddJudge(trigger.card));
|
||||||
|
if(list.length) target=list.randomGet();
|
||||||
|
trigger.targets.push(target);
|
||||||
|
trigger.player.line(target,'thunder');
|
||||||
|
game.log(trigger.card,'的目标被改为',target);
|
||||||
|
if(target==oriTarget){
|
||||||
|
var card=get.cardPile2('jiu');
|
||||||
|
if(card) player.gain(card,'gain2');
|
||||||
|
else{
|
||||||
|
player.chat('没酒了!');
|
||||||
|
game.log('但是牌堆中已经没有','#y酒','了!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mpbishi:{
|
||||||
|
audio:2,
|
||||||
|
forced:true,
|
||||||
|
trigger:{global:'useCard1'},
|
||||||
|
filter:function(event,player){
|
||||||
|
if(get.type2(event.card)!='trick'||!get.tag(event.card,'damage')) return false;
|
||||||
|
if(!lib.skill.xunshi.isXunshi(event.card)) return false;
|
||||||
|
const targets=event.targets.slice();
|
||||||
|
targets.remove(event.player);
|
||||||
|
return targets.length==game.countPlayer()-2;
|
||||||
|
},
|
||||||
|
content:function*(){},
|
||||||
|
mod:{
|
||||||
|
targetEnabled:function(card){
|
||||||
|
if(get.type2(card)=='trick'&&get.tag(card,'damage')>0) return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
//十周年嵇康
|
//十周年嵇康
|
||||||
dcjuexiang: {
|
dcjuexiang: {
|
||||||
derivation: 'dccanyun',
|
derivation: 'dccanyun',
|
||||||
|
@ -669,7 +956,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
dcwujie:{
|
dcwujie:{
|
||||||
audio:2,
|
audio:2,
|
||||||
forced:true,
|
|
||||||
trigger:{
|
trigger:{
|
||||||
global:['discardBegin','drawBegin'],
|
global:['discardBegin','drawBegin'],
|
||||||
},
|
},
|
||||||
|
@ -748,7 +1034,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(!num) delete player.getStat().skill[skillx];
|
if(!num) delete player.getStat().skill[skillx];
|
||||||
else player.getStat().skill[skillx]=num;
|
else player.getStat().skill[skillx]=num;
|
||||||
var bool3=!(bool1&&!bool2);
|
var bool3=!(bool1&&!bool2);
|
||||||
}catch(e){}
|
} catch (e) {
|
||||||
|
console.trace(e);
|
||||||
|
}
|
||||||
if(!bool1&&!bool2&&get.skillInfoTranslation(skill,player).indexOf('出牌阶段限一次')==-1) return false;
|
if(!bool1&&!bool2&&get.skillInfoTranslation(skill,player).indexOf('出牌阶段限一次')==-1) return false;
|
||||||
if((bool1||bool2)&&bool3) return false;
|
if((bool1||bool2)&&bool3) return false;
|
||||||
}
|
}
|
||||||
|
@ -2033,7 +2321,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
subSkill:{
|
subSkill:{
|
||||||
blocker:{
|
blocker:{
|
||||||
charlotte:true,
|
|
||||||
init:function(player,skill){
|
init:function(player,skill){
|
||||||
player.addSkillBlocker(skill);
|
player.addSkillBlocker(skill);
|
||||||
},
|
},
|
||||||
|
@ -2428,7 +2715,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(eff2>0) return eff1>0;
|
if(eff2>0) return eff1>0;
|
||||||
return player.hp>2&&eff2<eff1;
|
return player.hp>2&&eff2<eff1;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
logTarget:'player',
|
logTarget:'player',
|
||||||
shaRelated:true,
|
shaRelated:true,
|
||||||
|
@ -4111,10 +4397,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return 5-val;
|
return 5-val;
|
||||||
}
|
}
|
||||||
switch(num){
|
switch(num){
|
||||||
case 'equip3':return 4.5;break;
|
case 'equip3':return 4.5;
|
||||||
case 'equip4':return 4.4;break;
|
case 'equip4':return 4.4;
|
||||||
case 'equip5':return 4.3;break;
|
case 'equip5':return 4.3;
|
||||||
case 'equip2':return (3-player.hp)*1.5;break;
|
case 'equip2':return (3-player.hp)*1.5;
|
||||||
case 'equip1':{
|
case 'equip1':{
|
||||||
if(game.hasPlayer(function(current){
|
if(game.hasPlayer(function(current){
|
||||||
return (get.realAttitude||get.attitude)(player,current)<0&&get.distance(player,current)>1;
|
return (get.realAttitude||get.attitude)(player,current)<0&&get.distance(player,current)>1;
|
||||||
|
@ -4533,7 +4819,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.chooseTarget('请选择【抗歌】的目标','其于回合外摸牌后,你摸等量的牌;其进入濒死状态时,你可令其回复体力至1点;其死亡后,你弃置所有牌并失去1点体力',lib.filter.notMe,true).set('ai',function(target){
|
player.chooseTarget('请选择【抗歌】的目标','其于回合外摸牌后,你摸等量的牌;其进入濒死状态时,你可令其回复体力至1点;其死亡后,你弃置所有牌并失去1点体力',lib.filter.notMe,true).set('ai',function(target){
|
||||||
return get.attitude(_status.event.player,target)>0;
|
return get.attitude(_status.event.player,target);
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
@ -8945,7 +9231,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
else{
|
else{
|
||||||
target.$damagepop('K','thunder');
|
target.$damagepop('K','thunder');
|
||||||
event.num=13;
|
event.num=13;
|
||||||
};
|
}
|
||||||
game.log(target,'选择的点数是','#y'+get.strNumber(event.num));
|
game.log(target,'选择的点数是','#y'+get.strNumber(event.num));
|
||||||
player.storage.xinfu_lveming++;
|
player.storage.xinfu_lveming++;
|
||||||
player.judge(function(card){
|
player.judge(function(card){
|
||||||
|
@ -9292,7 +9578,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
else{
|
else{
|
||||||
player.logSkill('xinfu_zhenxing');
|
player.logSkill('xinfu_zhenxing');
|
||||||
event.num={一张:1,两张:2,三张:3}[result.control];
|
event.num={一张:1,两张:2,三张:3}[result.control];
|
||||||
};
|
}
|
||||||
'step 2'
|
'step 2'
|
||||||
event.cards=get.cards(num);
|
event.cards=get.cards(num);
|
||||||
player.chooseButton(['【镇行】:请选择要获得的牌',event.cards]).set('filterButton',function(button){
|
player.chooseButton(['【镇行】:请选择要获得的牌',event.cards]).set('filterButton',function(button){
|
||||||
|
@ -9330,8 +9616,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var num2=ui.cardPile.childElementCount;
|
var num2=ui.cardPile.childElementCount;
|
||||||
var num3=num2;
|
var num3=num2;
|
||||||
if(num1>num2) num3=0;
|
if(num1>num2) num3=0;
|
||||||
else if(!player.storage.xinfu_qianxin){}
|
else if(player.storage.xinfu_qianxin){
|
||||||
else{
|
|
||||||
for(var i=0;i<num2;i++){
|
for(var i=0;i<num2;i++){
|
||||||
if(player.storage.xinfu_qianxin.contains(ui.cardPile.childNodes[i])){
|
if(player.storage.xinfu_qianxin.contains(ui.cardPile.childNodes[i])){
|
||||||
num3=0;break;
|
num3=0;break;
|
||||||
|
@ -9731,7 +10016,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(player.storage.xinfu_dianhu2&&player.storage.xinfu_dianhu2.isIn()){
|
if(player.storage.xinfu_dianhu2&&player.storage.xinfu_dianhu2.isIn()){
|
||||||
if(event.name=='damage') return event.source==player.storage.xinfu_dianhu2;
|
if(event.name=='damage') return event.source==player.storage.xinfu_dianhu2;
|
||||||
return true;
|
return true;
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
@ -9961,9 +10246,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
zhangwen:'张温(193年—230年),字惠恕,吴郡吴县(今江苏苏州)人。少修节操,容貌奇伟。孙权召拜议郎、选曹尚书,徙太子太傅。黄武三年(224),以辅义中郎将身份出使蜀汉,孙权原先害怕诸葛亮会有意留难张温,但张温不担心。在呈上蜀汉朝廷的文书刻意称颂蜀汉,以表明和解的诚意,重建两国关系。他在蜀汉表现出色,得蜀汉朝廷重视。回东吴后不久,被调进豫章的军队,事业上再无进展。孙权一方面介怀他出使蜀汉时称颂蜀汉,又嫌他声名太盛,恐怕张温不会尽忠地由他任用。当时正好碰上暨艳事件,暨艳是张温引荐的臣子,但他滥用职权,升迁评定等只看自己喜恶。事件被揭发后暨艳及同党徐彪都自杀。孙权见此,于是以张温与暨艳、徐彪等人多有来往而下罪张温,后更将张温发还到家乡吴郡。将军骆统曾上书为张温辩解,但孙权不理会。六年后,张温病逝。',
|
zhangwen:'张温(193年—230年),字惠恕,吴郡吴县(今江苏苏州)人。少修节操,容貌奇伟。孙权召拜议郎、选曹尚书,徙太子太傅。黄武三年(224),以辅义中郎将身份出使蜀汉,孙权原先害怕诸葛亮会有意留难张温,但张温不担心。在呈上蜀汉朝廷的文书刻意称颂蜀汉,以表明和解的诚意,重建两国关系。他在蜀汉表现出色,得蜀汉朝廷重视。回东吴后不久,被调进豫章的军队,事业上再无进展。孙权一方面介怀他出使蜀汉时称颂蜀汉,又嫌他声名太盛,恐怕张温不会尽忠地由他任用。当时正好碰上暨艳事件,暨艳是张温引荐的臣子,但他滥用职权,升迁评定等只看自己喜恶。事件被揭发后暨艳及同党徐彪都自杀。孙权见此,于是以张温与暨艳、徐彪等人多有来往而下罪张温,后更将张温发还到家乡吴郡。将军骆统曾上书为张温辩解,但孙权不理会。六年后,张温病逝。',
|
||||||
lisu:'李肃(?-192年),五原(治今内蒙古包头西北)人。永汉三年四月,司徒王允、尚书仆射士孙瑞、卓将吕布共谋诛卓。是时,天子有疾新愈,大会未央殿。布使同郡骑都尉肃等、将亲兵十馀人,伪著卫士服守掖门。布怀诏书。卓至,肃等格卓。卓惊呼布所在。布曰“有诏”,遂杀卓,夷三族。后卓女婿中郎将牛辅典兵别屯陕,分遣校尉李傕、郭汜、张济略陈留、颍川诸县。卓死,吕布使李肃至陕,欲以诏命诛辅。辅等逆与肃战,肃败走弘农,布诛肃。',
|
lisu:'李肃(?-192年),五原(治今内蒙古包头西北)人。永汉三年四月,司徒王允、尚书仆射士孙瑞、卓将吕布共谋诛卓。是时,天子有疾新愈,大会未央殿。布使同郡骑都尉肃等、将亲兵十馀人,伪著卫士服守掖门。布怀诏书。卓至,肃等格卓。卓惊呼布所在。布曰“有诏”,遂杀卓,夷三族。后卓女婿中郎将牛辅典兵别屯陕,分遣校尉李傕、郭汜、张济略陈留、颍川诸县。卓死,吕布使李肃至陕,欲以诏命诛辅。辅等逆与肃战,肃败走弘农,布诛肃。',
|
||||||
xinpi:'辛毗(生卒年不详),字佐治,颍川阳翟人。三国时期曹魏大臣。原居陇西(郡治在今甘肃临洮县),东汉光武帝建武年间,其先人东迁。当初,辛毗跟随其兄事袁绍。曹操任司空时,征召辛毗,他不受命。官渡战后,辛毗事袁绍的儿子袁谭。公元204年,曹操攻下邺城,上表推荐辛毗任议郎,后为丞相长史。公元220年,曹丕即皇帝位,以辛毗为侍中,赐爵关内侯,后赐广平亭侯。魏明帝即位,封辛毗颍乡侯,食邑三百户,后为卫尉。公元234年,诸葛亮屯兵渭南,司马懿上表魏明帝。魏明帝任辛毗为大将军军师,加使持节号。诸葛亮病逝后,辛毗返回,仍任卫尉。不久,逝世,谥肃侯。',
|
xinpi:'辛毗(生卒年不详),字佐治,颍川阳翟人。三国时期曹魏大臣。原居陇西(郡治在今甘肃临洮县),东汉光武帝建武年间,其先人东迁。当初,辛毗跟随其兄事袁绍。曹操任司空时,征召辛毗,他不受命。官渡战后,辛毗事袁绍的儿子袁谭。公元204年,曹操攻下邺城,上表推荐辛毗任议郎,后为丞相长史。公元220年,曹丕即皇帝位,以辛毗为侍中,赐爵关内侯,后赐广平亭侯。魏明帝即位,封辛毗颍乡侯,食邑三百户,后为卫尉。公元234年,诸葛亮屯兵渭南,司马懿上表魏明帝。魏明帝任辛毗为大将军军师,加使持节号。诸葛亮病逝后,辛毗返回,仍任卫尉。不久,逝世,谥肃侯。',
|
||||||
zhangchangpu:"钟会的母亲。《母夫人张氏传》:夫人张氏,字昌蒲,太原兹氏人,太傅定陵成侯之命妇也。",
|
|
||||||
xugong:"许贡是东汉末官吏。先后任吴郡都尉、太守,欲送密信给曹操,要曹操注意孙策,却被孙策发现而被杀。许贡生前招揽了一些门客,当中有三人不忘故主,千方百计想要手刃仇人。建安五年(公元200年),广陵太守陈登派人秘密联系孙策治下的山贼余党,企图颠覆孙策在江东的统治。孙策决定讨伐陈登,行军到丹徒时,许贡门客终于找到了机会。因为孙策有单骑出猎,在野外思考的习惯,三门客趁孙策轻装外出打猎时,放冷箭射中孙策面颊。这些门客后来在与孙策的搏斗中,被赶到的侍卫杀死。孙策此后因为伤口感染,并且俊美的容貌被毁,终于不治身亡,去世时年仅26岁。",
|
|
||||||
mangyachang:"南蛮王孟获的部将,使一口截头大刀,骑一匹黄骠马。率军与蜀军交战,战败王平。后被平北将军马岱斩杀。只出现在《三国演义》里,正史中无此人。",
|
|
||||||
|
|
||||||
liuzan:'字正明,会稽长山人人,曾任左护军,有两子:留略、留平。少为会稽郡吏,曾参与镇压黄巾起义,后被东吴大将凌统所引用,任屯骑校尉。吴五凤二年(公元255年)留赞任左护军,随孙峻征淮南,因病撤军,被魏将蒋班围困于道,力战而死,时年73岁。',
|
liuzan:'字正明,会稽长山人人,曾任左护军,有两子:留略、留平。少为会稽郡吏,曾参与镇压黄巾起义,后被东吴大将凌统所引用,任屯骑校尉。吴五凤二年(公元255年)留赞任左护军,随孙峻征淮南,因病撤军,被魏将蒋班围困于道,力战而死,时年73岁。',
|
||||||
zhujun:'朱儁(?-195年),字公伟。会稽郡上虞县(今浙江绍兴上虞区)人。东汉末年名将。朱儁出身寒门,赡养母亲,以好义轻财闻名,受乡里敬重。后被太守徐珪举为孝廉,任兰陵令,颇有治绩。再升任交州刺史,以家兵五千大破叛军,平定交州。战后以功封都亭侯,入朝为谏议大夫。光和七年(184年),黄巾起义爆发,朱儁以右中郎将、持节平定三郡之地,以功进封西乡侯,迁镇贼中郎将。又率军讨平黄巾,“威声满天下”。中平二年(185年),进拜右车骑将军,更封钱塘侯。后为河内太守,击退进逼的张燕。权臣董卓秉政时,想任朱儁为副手,遭其婉拒。其后出逃荆州,更屯军中牟,徐州刺史陶谦等欲推举他为太师,并传檄各州牧伯,相邀讨伐李傕、奉迎天子。但朱儁却奉诏入京任太仆。初平三年(192年),升任太尉、录尚书事。兴平元年(194年),行骠骑将军事,持节镇关东,因故未成行。兴平二年(195年),李傕与郭汜相互攻杀,郭汜扣留朱儁作为人质。朱儁性格刚烈,即日发病而死。',
|
zhujun:'朱儁(?-195年),字公伟。会稽郡上虞县(今浙江绍兴上虞区)人。东汉末年名将。朱儁出身寒门,赡养母亲,以好义轻财闻名,受乡里敬重。后被太守徐珪举为孝廉,任兰陵令,颇有治绩。再升任交州刺史,以家兵五千大破叛军,平定交州。战后以功封都亭侯,入朝为谏议大夫。光和七年(184年),黄巾起义爆发,朱儁以右中郎将、持节平定三郡之地,以功进封西乡侯,迁镇贼中郎将。又率军讨平黄巾,“威声满天下”。中平二年(185年),进拜右车骑将军,更封钱塘侯。后为河内太守,击退进逼的张燕。权臣董卓秉政时,想任朱儁为副手,遭其婉拒。其后出逃荆州,更屯军中牟,徐州刺史陶谦等欲推举他为太师,并传檄各州牧伯,相邀讨伐李傕、奉迎天子。但朱儁却奉诏入京任太仆。初平三年(192年),升任太尉、录尚书事。兴平元年(194年),行骠骑将军事,持节镇关东,因故未成行。兴平二年(195年),李傕与郭汜相互攻杀,郭汜扣留朱儁作为人质。朱儁性格刚烈,即日发病而死。',
|
||||||
|
@ -9976,7 +10258,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
zhangmiao:'张邈(?-195年),字孟卓,东平寿张(今山东东平县)人。东汉大臣、名士,“八厨”之一。举孝廉出身,授骑都尉,出任陈留太守。参与讨伐董卓,参加汴水之战,归附于曹操。兴平元年(194年),趁着曹操讨伐徐州牧陶谦,联合陈宫发动叛乱,迎立吕布为兖州牧。受到曹操讨伐,兵败投奔徐州牧刘备。兴平二年,张邈向袁术借兵途中,被部下所杀。',
|
zhangmiao:'张邈(?-195年),字孟卓,东平寿张(今山东东平县)人。东汉大臣、名士,“八厨”之一。举孝廉出身,授骑都尉,出任陈留太守。参与讨伐董卓,参加汴水之战,归附于曹操。兴平元年(194年),趁着曹操讨伐徐州牧陶谦,联合陈宫发动叛乱,迎立吕布为兖州牧。受到曹操讨伐,兵败投奔徐州牧刘备。兴平二年,张邈向袁术借兵途中,被部下所杀。',
|
||||||
duanwei:'段煨(?~209年),字忠明,武威郡姑臧(今甘肃省武威市)人也。东汉末年将领,东汉太尉段颎同族兄弟,与太尉贾诩、张济、宣威侯张绣乃是同乡。原为董卓帐下将领,奉命屯兵华阴,勤劳农业。兴平二年(195年),迎接汉献帝刘协东归洛阳,供给衣食补给,与护驾将领杨定不和,引发激战十余天,听从汉献帝刘协劝解。东汉建安三年(198年),攻打黄白城,击杀李傕,夷其三族,封为镇远将军、闅乡亭侯、北地太守,累迁大鸿胪、金光禄大夫。建安十四年(209年),寿终正寝。',
|
duanwei:'段煨(?~209年),字忠明,武威郡姑臧(今甘肃省武威市)人也。东汉末年将领,东汉太尉段颎同族兄弟,与太尉贾诩、张济、宣威侯张绣乃是同乡。原为董卓帐下将领,奉命屯兵华阴,勤劳农业。兴平二年(195年),迎接汉献帝刘协东归洛阳,供给衣食补给,与护驾将领杨定不和,引发激战十余天,听从汉献帝刘协劝解。东汉建安三年(198年),攻打黄白城,击杀李傕,夷其三族,封为镇远将军、闅乡亭侯、北地太守,累迁大鸿胪、金光禄大夫。建安十四年(209年),寿终正寝。',
|
||||||
zhangheng:'张横,生卒年不详,武威郡姑臧人,东汉末年凉州军阀之一。与梁兴、贾诩、段煨乃是同乡。建安三年(198),张横与梁兴、段煨等斩杀李傕。十六年(211),同韩遂、马超联合,起兵反抗曹操,兵败后不知所终。',
|
zhangheng:'张横,生卒年不详,武威郡姑臧人,东汉末年凉州军阀之一。与梁兴、贾诩、段煨乃是同乡。建安三年(198),张横与梁兴、段煨等斩杀李傕。十六年(211),同韩遂、马超联合,起兵反抗曹操,兵败后不知所终。',
|
||||||
tangji:'唐姬,会稽太守唐瑁女,弘农怀王刘辩的妃子。刘辩死后,唐姬回归故里,因节烈不愿改嫁他人,后被汉献帝下诏封为弘农王妃。',
|
|
||||||
wenqin:'文钦(?~258年),字仲若,沛国谯郡(今安徽省亳州市)人,三国时期曹魏将领,曹操部将文稷之子。魏明帝太和年间文钦任牙门将、五营校督,后拜庐江太守、冠军将军,嘉平元年(249年),曹爽及其同党在高平陵之变中被杀,文钦心中不安,执政的司马氏集团为了安抚文钦,升其为前将军、扬州刺史,任职期间结交镇东将军毌丘俭。击退吴国太傅诸葛恪进攻,取得一定战果。正元二年(255年),文钦与镇东将军毌丘俭在扬州起兵讨伐司马师,兵败后投奔吴国,被封为镇北大将军、幽州牧,封谯侯。甘露二年(257年),文钦随吴军援救起兵反抗司马氏的诸葛诞,此后因被司马昭大军围困,军情告急,文钦与诸葛诞本就有矛盾,对文钦日益不满的诸葛诞遂将文钦杀死。淮南平定之后,文钦遗体被其二子收敛安葬。',
|
wenqin:'文钦(?~258年),字仲若,沛国谯郡(今安徽省亳州市)人,三国时期曹魏将领,曹操部将文稷之子。魏明帝太和年间文钦任牙门将、五营校督,后拜庐江太守、冠军将军,嘉平元年(249年),曹爽及其同党在高平陵之变中被杀,文钦心中不安,执政的司马氏集团为了安抚文钦,升其为前将军、扬州刺史,任职期间结交镇东将军毌丘俭。击退吴国太傅诸葛恪进攻,取得一定战果。正元二年(255年),文钦与镇东将军毌丘俭在扬州起兵讨伐司马师,兵败后投奔吴国,被封为镇北大将军、幽州牧,封谯侯。甘露二年(257年),文钦随吴军援救起兵反抗司马氏的诸葛诞,此后因被司马昭大军围困,军情告急,文钦与诸葛诞本就有矛盾,对文钦日益不满的诸葛诞遂将文钦杀死。淮南平定之后,文钦遗体被其二子收敛安葬。',
|
||||||
qiuliju:'丘力居,东汉末年的辽西乌丸大人。拉拢中山太守张纯反叛东汉,寇略青、徐、幽、冀四州,杀略吏民。死时认为儿子楼班年幼,于是让从子蹋顿总摄三王部。',
|
qiuliju:'丘力居,东汉末年的辽西乌丸大人。拉拢中山太守张纯反叛东汉,寇略青、徐、幽、冀四州,杀略吏民。死时认为儿子楼班年幼,于是让从子蹋顿总摄三王部。',
|
||||||
liuba:'刘巴(?-222年),字子初,荆州零陵郡烝阳县(今湖南省衡阳县、邵东县一带)人,东汉末年至三国时期蜀汉时期官员、名士。刘巴少知名,荆州牧刘表多次征用推举,刘巴均不应就。曹操征伐荆州,荆州士人多归刘备,刘巴却北上投靠曹操。后受曹操命令招降荆南三郡,不料先为刘备所得,刘巴不能复命曹操,遂远至交趾,又辗转进入益州。刘备平定益州后,刘巴归附刘备,为左将军西曹掾,法正死后接任尚书令。章武二年(222年)去世。刘巴博学多才,为刘备解决入蜀后的财政困难问题,又与诸葛亮等共制蜀汉的法律文件《蜀科》。为人简朴清高,退无私交,曹魏大臣陈群甚敬重之。所著录于《刘令君集》。',
|
liuba:'刘巴(?-222年),字子初,荆州零陵郡烝阳县(今湖南省衡阳县、邵东县一带)人,东汉末年至三国时期蜀汉时期官员、名士。刘巴少知名,荆州牧刘表多次征用推举,刘巴均不应就。曹操征伐荆州,荆州士人多归刘备,刘巴却北上投靠曹操。后受曹操命令招降荆南三郡,不料先为刘备所得,刘巴不能复命曹操,遂远至交趾,又辗转进入益州。刘备平定益州后,刘巴归附刘备,为左将军西曹掾,法正死后接任尚书令。章武二年(222年)去世。刘巴博学多才,为刘备解决入蜀后的财政困难问题,又与诸葛亮等共制蜀汉的法律文件《蜀科》。为人简朴清高,退无私交,曹魏大臣陈群甚敬重之。所著录于《刘令君集》。',
|
||||||
|
@ -10006,12 +10287,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
guānning:'关宁,《三国演义》的虚构人物,为关定之子,关平的哥哥,学文。关羽前往冀州寻找刘备时曾居于关定庄,关定命关宁、关平二子出拜。后关羽同刘备回到关定庄时,关羽向刘备介绍关宁、关平二人,关定即提出让关平拜关羽为义父。',
|
guānning:'关宁,《三国演义》的虚构人物,为关定之子,关平的哥哥,学文。关羽前往冀州寻找刘备时曾居于关定庄,关定命关宁、关平二子出拜。后关羽同刘备回到关定庄时,关羽向刘备介绍关宁、关平二人,关定即提出让关平拜关羽为义父。',
|
||||||
mushun:'穆顺,小说《三国演义》中的人物,男,东汉末宦官。献帝欲修书与国舅伏完,共谋图曹公。因顺为宦官中之忠义可托者,乃命顺往送书。顺藏书于发中,潜出禁宫,径至完宅,将书呈上。及完回书付顺,顺乃藏于头髻内,辞完回宫。然公闻信,先于宫门等候,顺回遇公,公喝左右,遍搜身上,并无夹带,放行。忽然风吹落其帽。公又唤回,取帽视之,遍观无物,还帽令戴。顺双手倒戴其帽。公心疑,令左右搜其头发中,搜出伏完书来。公见书大怒,执下顺于密室问之,顺不肯招。当晚将顺、完等宗族二百余口,皆斩于市。',
|
mushun:'穆顺,小说《三国演义》中的人物,男,东汉末宦官。献帝欲修书与国舅伏完,共谋图曹公。因顺为宦官中之忠义可托者,乃命顺往送书。顺藏书于发中,潜出禁宫,径至完宅,将书呈上。及完回书付顺,顺乃藏于头髻内,辞完回宫。然公闻信,先于宫门等候,顺回遇公,公喝左右,遍搜身上,并无夹带,放行。忽然风吹落其帽。公又唤回,取帽视之,遍观无物,还帽令戴。顺双手倒戴其帽。公心疑,令左右搜其头发中,搜出伏完书来。公见书大怒,执下顺于密室问之,顺不肯招。当晚将顺、完等宗族二百余口,皆斩于市。',
|
||||||
jsp_guanyu:'关羽,字云长。曾水淹七军、擒于禁、斩庞德、威震华夏,吓得曹操差点迁都躲避,但是东吴偷袭荆州,关羽兵败被害。后传说吕蒙因关羽之魂索命而死。',
|
jsp_guanyu:'关羽,字云长。曾水淹七军、擒于禁、斩庞德、威震华夏,吓得曹操差点迁都躲避,但是东吴偷袭荆州,关羽兵败被害。后传说吕蒙因关羽之魂索命而死。',
|
||||||
|
liuling:'刘伶(约221年-约300年),字伯伦,西晋沛国(治今安徽濉溪县西北)人,竹林七贤之一,中国魏晋时期作家,名士。<br>刘伶自幼便失去了父爱,因其父亲身材矮小,及至长大成人后,刘伶身高也不过六尺。魏齐王曹芳正始之末(249年),刘伶已成为当世名重一时的名士,并且常与嵇康、阮籍、阮咸集会于山阳竹林之下,饮酒赋诗,弹琴作歌。晋武帝司马炎泰始初年(265年)前后,曾做过一段时间的建威参军,不久朝廷下诏,入宫中策问。他大谈老庄,强调无为而治,非但没有得到重用,反而连参军之职也被罢免了,从此再无仕进。晋惠帝司马衷永康元年(300年)前后,以寿而终。<br>刘伶有“品酒第一人”的美称,也被酒行业传颂至今,后人以古瀑河边上的井水酿酒,还取刘伶墓地的黄土垒成窖池酿酒,为了纪念刘伶,当地百姓也将“润泉涌”更名为“刘伶醉”。其传世作品仅有《酒德颂》《北芒客舍》两篇,其中《酒德颂》所表现出的藐视一切存在的气概,敌视礼教之士的反抗精神,既高扬了人格的力量,批判了当时的黑暗政治,同时也抒发了压抑的愤世之情,充满了浪漫色彩,气魄豪迈,用辞又骈偶间行,有无意追求而自至的特点,对后代影响极大。',
|
||||||
},
|
},
|
||||||
characterTitle:{
|
characterTitle:{
|
||||||
chunyuqiong:'#b对决限定武将',
|
chunyuqiong:'#b对决限定武将',
|
||||||
sp_xuyou:'#g4v4限定武将',
|
sp_xuyou:'#g4v4限定武将',
|
||||||
},
|
},
|
||||||
perfectPair:{},
|
|
||||||
characterFilter:{
|
characterFilter:{
|
||||||
chunyuqiong:function(mode){
|
chunyuqiong:function(mode){
|
||||||
return mode!='identity'&&mode!='guozhan';
|
return mode!='identity'&&mode!='guozhan';
|
||||||
|
@ -10600,12 +10881,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
dcjuexiang_info:'当你死亡时,杀死你的角色弃置其装备区内的所有牌并失去1点体力,然后你可以令一名其他角色获得〖残韵〗。',
|
dcjuexiang_info:'当你死亡时,杀死你的角色弃置其装备区内的所有牌并失去1点体力,然后你可以令一名其他角色获得〖残韵〗。',
|
||||||
dccanyun:'残韵',
|
dccanyun:'残韵',
|
||||||
dccanyun_info:'每名角色限一次。出牌阶段,你可以弃置一张牌并选择一名其他角色,然后若其装备区里的牌数:小于你,其回复1点体力;大于你,其失去1点体力;等于你,其摸一张牌。若你的体力值为1,你摸一张牌。',
|
dccanyun_info:'每名角色限一次。出牌阶段,你可以弃置一张牌并选择一名其他角色,然后若其装备区里的牌数:小于你,其回复1点体力;大于你,其失去1点体力;等于你,其摸一张牌。若你的体力值为1,你摸一张牌。',
|
||||||
|
mp_liuling:'刘伶',
|
||||||
|
mpjiusong:'酒颂',
|
||||||
|
mpjiusong_info:'当一名角色使用【酒】时,你获得1枚“醉”标记(“醉”数至多为3)。',
|
||||||
|
mpmaotao:'酕醄',
|
||||||
|
mpmaotao_info:'当其他角色使用牌指定唯一目标时,你可以移去1枚“醉”,令此牌的目标改为随机一名合法角色(无距离限制)。若目标角色与原目标相同,你从牌堆中获得一张【酒】。',
|
||||||
|
mpbishi:'避世',
|
||||||
|
mpbishi_info:'锁定技。你不能成为伤害类锦囊牌的目标。',
|
||||||
star_caoren:'星曹仁',
|
star_caoren:'星曹仁',
|
||||||
star_caoren_prefix:'星',
|
star_caoren_prefix:'星',
|
||||||
starsujun:'肃军',
|
starsujun:'肃军',
|
||||||
starsujun_info:'当你使用一张牌时,若你手牌中的基本牌和非基本牌的牌数相等,你可以摸两张牌。',
|
starsujun_info:'当你使用一张牌时,若你手牌中的基本牌和非基本牌的牌数相等,你可以摸两张牌。',
|
||||||
starlifeng:'砺锋',
|
starlifeng:'砺锋',
|
||||||
starlifeng_info:'你可以将一张本回合未有角色使用过的颜色的手牌当做不计入次数的【杀】或【无懈可击】使用。',
|
starlifeng_info:'你可以将一张本回合未有角色使用过的颜色的手牌当做不计入次数的【杀】或【无懈可击】使用。',
|
||||||
|
star_yuanshu:'星袁术',
|
||||||
|
star_yuanshu_prefix:'星',
|
||||||
|
starcanxi:'残玺',
|
||||||
|
starcanxi_wangsheng:'妄生',
|
||||||
|
starcanxi_xiangsi:'向死',
|
||||||
|
starcanxi_cancel:'向死',
|
||||||
|
starcanxi_info:'锁定技。游戏开始时,你获得场上所有角色的势力对应的“玺角”标记,然后选择一个“玺角”对应势力并选择以下一项;一轮开始时,你选择一个“玺角”对应势力并选择以下一项:①妄生:本轮被选择势力角色每回合首次造成的伤害+1且计算与其他角色间的距离-1;②向死:本轮其他被选择势力角色每回合首次回复体力后失去1点体力且每回合对你使用的第一张牌无效。',
|
||||||
|
starpizhi:'圮秩',
|
||||||
|
starpizhi_info:'锁定技。①一名角色死亡后,若你拥有该角色对应的“玺角”标记,你失去之并摸X张牌。②结束阶段,你摸X张牌。(X为你本局游戏失去的“玺角”标记数)',
|
||||||
|
starzhonggu:'冢骨',
|
||||||
|
starzhonggu_info:'主公技,锁定技。摸牌阶段,若游戏轮数大于等于场上的群势力角色数,则你额外摸两张牌,否则你少摸一张牌。',
|
||||||
|
|
||||||
sp_whlw:"文和乱武",
|
sp_whlw:"文和乱武",
|
||||||
sp_zlzy:"逐鹿中原",
|
sp_zlzy:"逐鹿中原",
|
||||||
|
@ -10625,6 +10924,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
sp_danqi:'千里单骑',
|
sp_danqi:'千里单骑',
|
||||||
sp_star:'将星系列',
|
sp_star:'将星系列',
|
||||||
sp_decade:'其他新服武将',
|
sp_decade:'其他新服武将',
|
||||||
|
mini_qixian:'小程序·竹林七贤',
|
||||||
},
|
},
|
||||||
pinyins:{
|
pinyins:{
|
||||||
卑弥呼:['Himiko']
|
卑弥呼:['Himiko']
|
||||||
|
|
|
@ -1114,9 +1114,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
paoxiao:{
|
paoxiao:{
|
||||||
audio:2,
|
audio:2,
|
||||||
firstDo:true,
|
firstDo:true,
|
||||||
audioname2:{old_guanzhang:'old_fuhun'},
|
|
||||||
audioname:['re_zhangfei','guanzhang','xiahouba'],
|
audioname:['re_zhangfei','guanzhang','xiahouba'],
|
||||||
audioname2:{
|
audioname2: {
|
||||||
|
old_guanzhang:'old_fuhun',
|
||||||
dc_xiahouba:'paoxiao_xiahouba',
|
dc_xiahouba:'paoxiao_xiahouba',
|
||||||
},
|
},
|
||||||
trigger:{player:'useCard1'},
|
trigger:{player:'useCard1'},
|
||||||
|
|
558
character/tw.js
558
character/tw.js
|
@ -12,7 +12,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
tw_yunchouyong:['tw_zongyu','tw_chendong','tw_sunyi'],
|
tw_yunchouyong:['tw_zongyu','tw_chendong','tw_sunyi'],
|
||||||
tw_yunchouyan:['tw_jiangqing'],
|
tw_yunchouyan:['tw_jiangqing'],
|
||||||
tw_zhu:['tw_beimihu','tw_ol_sunjian','ol_liuyu','tw_menghuo'],
|
tw_zhu:['tw_beimihu','tw_ol_sunjian','ol_liuyu','tw_menghuo'],
|
||||||
tw_swordsman:['xia_xushu','xia_wangyue','xia_liyàn','xia_tongyuan','xia_lusu','xia_dianwei','xia_zhaoe','xia_xiahouzie'],
|
tw_swordsman:['xia_liubei','xia_xiahousone','xia_xiahoudun','xia_zhangwei','xia_xushu','xia_wangyue','xia_liyàn','xia_tongyuan','xia_lusu','xia_dianwei','xia_zhaoe','xia_xiahouzie'],
|
||||||
tw_mobile:['nashime','tw_gexuan','tw_zhugeguo'],
|
tw_mobile:['nashime','tw_gexuan','tw_zhugeguo'],
|
||||||
tw_mobile2:['tw_chengpu','tw_guohuai','old_quancong','tw_caoxiu','tw_guanqiujian','tw_re_fazheng','tw_madai','tw_zhangfei','tw_guyong','tw_handang','tw_xuezong','tw_yl_luzhi'],
|
tw_mobile2:['tw_chengpu','tw_guohuai','old_quancong','tw_caoxiu','tw_guanqiujian','tw_re_fazheng','tw_madai','tw_zhangfei','tw_guyong','tw_handang','tw_xuezong','tw_yl_luzhi'],
|
||||||
tw_yijiang:['tw_caoang','tw_caohong','tw_zumao','tw_dingfeng','tw_maliang','tw_xiahouba'],
|
tw_yijiang:['tw_caoang','tw_caohong','tw_zumao','tw_dingfeng','tw_maliang','tw_xiahouba'],
|
||||||
|
@ -20,6 +20,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
character:{
|
character:{
|
||||||
|
xia_liubei:['male','shu',4,['twshenyi','twxinghan']],
|
||||||
|
xia_xiahousone:['female','qun',3,['twchengxi']],
|
||||||
|
xia_xiahoudun:['male','qun',4,['twdanlie']],
|
||||||
|
xia_zhangwei:['female','qun',3,['twhuzhong','twfenwang']],
|
||||||
tw_zhanghong:['male','wu',3,['twquanqian','twrouke']],
|
tw_zhanghong:['male','wu',3,['twquanqian','twrouke']],
|
||||||
tw_zhangzhao:['male','wu',3,['twlijian','twchungang']],
|
tw_zhangzhao:['male','wu',3,['twlijian','twchungang']],
|
||||||
tw_ol_sunjian:['male','wu','4/5',['gzyinghun','wulie','twpolu'],['zhu']],
|
tw_ol_sunjian:['male','wu','4/5',['gzyinghun','wulie','twpolu'],['zhu']],
|
||||||
|
@ -123,6 +127,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
kaisa:["male","western",4,["zhengfu"]],
|
kaisa:["male","western",4,["zhengfu"]],
|
||||||
},
|
},
|
||||||
characterIntro:{
|
characterIntro:{
|
||||||
|
xiahousone:'夏侯子萼,游卡桌游《三国杀阵面对决》中虚构的人物。在《阵面对决》中,设定为在貂蝉不在时血婆娑的实际首领。在海外服中,设定为夏侯惇的养女,继承了夏侯紫萼的血婆娑,之后“夏侯紫萼”这个名字就被隐匿于历史之中,而“夏侯子萼”则成为了血婆娑的首领“血蔷薇”的固定名号。',
|
||||||
|
zhangwei:'张葳,游卡桌游《三国杀阵面对决》中虚构的人物。在《阵面对决》中,设定为被夏侯子萼救下后加入的血婆娑成员。在海外服中,设定为张奂的养女,张奂为宦官迫害时与其失散,为神秘女子所救并学得武艺,后与夏侯紫萼一起建立血婆娑。在李儒分成时为了保护百姓而牺牲。',
|
||||||
nashime:'难升米(なしめ,或なんしょうまい)是倭国大夫。景初二年六月,受女王卑弥呼之命,与都市牛利出使魏国,被魏国拜为率善中郎将。',
|
nashime:'难升米(なしめ,或なんしょうまい)是倭国大夫。景初二年六月,受女王卑弥呼之命,与都市牛利出使魏国,被魏国拜为率善中郎将。',
|
||||||
jiachong:'贾充(217年—282年),字公闾,平阳襄陵(今山西襄汾)人,三国曹魏至西晋时期大臣,曹魏豫州刺史贾逵之子。西晋王朝的开国元勋。出身平阳贾氏。曾参与镇压淮南二叛和弑杀魏帝曹髦,因此深得司马氏信任,其女儿贾褒(一名荃)及贾南风分别嫁予司马炎弟司马攸及次子司马衷,与司马氏结为姻亲,地位显赫。晋朝建立后,转任车骑将军、散骑常侍、尚书仆射,后升任司空、太尉等要职。更封鲁郡公。咸宁末,为使持节、假黄钺、大都督征讨吴国。吴国平定后,增邑八千户。太康三年(282年),贾充去世。西晋朝廷追赠他为太宰,礼官议谥曰荒,司马炎不采纳,改谥为武。有集五卷。',
|
jiachong:'贾充(217年—282年),字公闾,平阳襄陵(今山西襄汾)人,三国曹魏至西晋时期大臣,曹魏豫州刺史贾逵之子。西晋王朝的开国元勋。出身平阳贾氏。曾参与镇压淮南二叛和弑杀魏帝曹髦,因此深得司马氏信任,其女儿贾褒(一名荃)及贾南风分别嫁予司马炎弟司马攸及次子司马衷,与司马氏结为姻亲,地位显赫。晋朝建立后,转任车骑将军、散骑常侍、尚书仆射,后升任司空、太尉等要职。更封鲁郡公。咸宁末,为使持节、假黄钺、大都督征讨吴国。吴国平定后,增邑八千户。太康三年(282年),贾充去世。西晋朝廷追赠他为太宰,礼官议谥曰荒,司马炎不采纳,改谥为武。有集五卷。',
|
||||||
duosidawang:'朵思大王是《三国演义》中人物,南蛮秃龙洞的元帅,孟获弟弟孟优的朋友,据说是南蛮第一智者。',
|
duosidawang:'朵思大王是《三国演义》中人物,南蛮秃龙洞的元帅,孟获弟弟孟优的朋友,据说是南蛮第一智者。',
|
||||||
|
@ -278,6 +284,526 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
|
//夏侯惇
|
||||||
|
twdanlie:{
|
||||||
|
audio:2,
|
||||||
|
enable:'phaseUse',
|
||||||
|
filter:function(event,player){
|
||||||
|
return game.hasPlayer(target=>player.canCompare(target));
|
||||||
|
},
|
||||||
|
filterTarget:function(card,player,target){
|
||||||
|
return player.canCompare(target);
|
||||||
|
},
|
||||||
|
usable:1,
|
||||||
|
selectTarget:[1,3],
|
||||||
|
multitarget:true,
|
||||||
|
multiline:true,
|
||||||
|
group:'twdanlie_add',
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
player.chooseToCompare(targets).setContent('chooseToCompareMeanwhile');
|
||||||
|
'step 1'
|
||||||
|
if(result.winner&&result.winner==player){
|
||||||
|
player.line(targets);
|
||||||
|
targets.forEach(target=>target.damage());
|
||||||
|
}
|
||||||
|
else player.loseHp();
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
order:10,
|
||||||
|
result:{
|
||||||
|
target:function(player,target){
|
||||||
|
var att=get.attitude(player,target);
|
||||||
|
if(att>=0) return 0;
|
||||||
|
if(player.getHp()>2) return -get.damageEffect(target,player,player)-10/target.countCards('h');
|
||||||
|
var hs=player.getCards('h').sort((a,b)=>b.number-a.number);
|
||||||
|
var ts=target.getCards('h').sort((a,b)=>b.number-a.number);
|
||||||
|
if(!hs.length||!ts.length) return 0;
|
||||||
|
if(Math.min(13,hs[0].number+player.getDamagedHp())>ts[0].number) return -get.damageEffect(target,player,player);
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
subSkill:{
|
||||||
|
add:{
|
||||||
|
audio:'twdanlie',
|
||||||
|
trigger:{player:'compare',target:'compare'},
|
||||||
|
filter:function(event,player){
|
||||||
|
if(!player.isDamaged()) return false;
|
||||||
|
if(player!=event.target&&event.iwhile) return false;
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
locked:false,
|
||||||
|
content:function(){
|
||||||
|
var num=player.getDamagedHp();
|
||||||
|
if(player==trigger.player){
|
||||||
|
trigger.num1+=num;
|
||||||
|
if(trigger.num1>13) trigger.num1=13;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
trigger.num2+=num;
|
||||||
|
if(trigger.num2>13) trigger.num2=13;
|
||||||
|
}
|
||||||
|
game.log(player,'的拼点牌点数+',num);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
//张葳
|
||||||
|
twhuzhong:{
|
||||||
|
audio:2,
|
||||||
|
trigger:{player:'useCardToPlayer'},
|
||||||
|
filter:function(event,player){
|
||||||
|
return event.card.name=='sha'&&!game.hasNature(event.card,'linked')&&event.targets.length==1&&player.isPhaseUsing()&&((player.countCards('h')&&game.hasPlayer(target=>!event.targets.includes(target)&&player.canUse(event.card,target)))||event.target.countCards('h')>0);
|
||||||
|
},
|
||||||
|
direct:true,
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
var target=trigger.target;
|
||||||
|
event.target=target;
|
||||||
|
var list=['cancel2'];
|
||||||
|
var choiceList=[
|
||||||
|
'弃置一张手牌,令此【杀】可以额外指定一个目标',
|
||||||
|
'令其弃置一张手牌,若此【杀】造成伤害,则你摸一张牌且本阶段可以额外使用一张【杀】;若此【杀】未造成伤害,你受到其对你造成的1点伤害',
|
||||||
|
];
|
||||||
|
if(target.countCards('h')) list.unshift('其弃置');
|
||||||
|
else choiceList[1]='<span style="opacity:0.5">'+choiceList[1]+'</span>';
|
||||||
|
if(player.countCards('h')&&game.hasPlayer(targetx=>!trigger.targets.includes(targetx)&&player.canUse(trigger.card,targetx))) list.unshift('你弃置');
|
||||||
|
else choiceList[0]='<span style="opacity:0.5">'+choiceList[0]+'</span>';
|
||||||
|
player.chooseControl(list).set('choiceList',choiceList).set('ai',()=>{
|
||||||
|
var controls=_status.event.controls;
|
||||||
|
var trigger=_status.event.getTrigger();
|
||||||
|
var player=trigger.player;
|
||||||
|
var target=trigger.target;
|
||||||
|
if(controls.contains('其弃置')&&_status.event.goon) return '其弃置';
|
||||||
|
if(controls.contains('你弃置')){
|
||||||
|
if(game.hasPlayer(targetx=>!trigger.targets.includes(targetx)&&player.canUse(trigger.card,targetx)&&get.effect(targetx,trigger.card,player,player)>0)) return '你弃置';
|
||||||
|
}
|
||||||
|
return 'cancel2';
|
||||||
|
}).set('goon',function(){
|
||||||
|
var d1=true;
|
||||||
|
if(player.hasSkill('jueqing')||player.hasSkill('gangzhi')) d1=false;
|
||||||
|
if(!target.mayHaveShan()||player.hasSkillTag('directHit_ai',true,{
|
||||||
|
target:target,
|
||||||
|
card:trigger.card,
|
||||||
|
},true)){
|
||||||
|
if(!target.hasSkill('gangzhi')) d1=false;
|
||||||
|
if(!target.hasSkillTag('filterDamage',null,{
|
||||||
|
player:player,
|
||||||
|
card:trigger.card,
|
||||||
|
})&&get.attitude(player,target)<0) return true;
|
||||||
|
}
|
||||||
|
if(d1) return get.damageEffect(player,player,player)>0;
|
||||||
|
return false;
|
||||||
|
}());
|
||||||
|
'step 1'
|
||||||
|
if(result.control!='cancel2'){
|
||||||
|
player.logSkill('twhuzhong',target);
|
||||||
|
if(result.control=='其弃置'){
|
||||||
|
target.chooseToDiscard('h',true);
|
||||||
|
player.when('useCardAfter').filter(evt=>evt==trigger.getParent()).then(()=>{
|
||||||
|
if(player.getHistory('sourceDamage',evt=>evt.card==trigger.card).length){
|
||||||
|
player.draw();
|
||||||
|
player.addTempSkill('twhuzhong_sha','phaseUseAfter');
|
||||||
|
player.addMark('twhuzhong_sha',1,false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
target.line(player);
|
||||||
|
player.damage(1,target);
|
||||||
|
}
|
||||||
|
}).vars({target:target});
|
||||||
|
event.finish();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
player.chooseToDiscard('h',true);
|
||||||
|
player.chooseTarget('请选择'+get.translation(trigger.card)+'的额外目标',function(card,player,target){
|
||||||
|
var trigger=_status.event.getTrigger();
|
||||||
|
return !trigger.targets.includes(target)&&player.canUse(trigger.card,target);
|
||||||
|
}).set('ai',function(target){
|
||||||
|
var player=_status.event.player;
|
||||||
|
var trigger=_status.event.getTrigger();
|
||||||
|
return get.effect(target,trigger.card,player,player);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else event.finish();
|
||||||
|
'step 2'
|
||||||
|
if(result.bool){
|
||||||
|
player.line(result.targets);
|
||||||
|
trigger.getParent().targets.addArray(result.targets);
|
||||||
|
game.log(result.targets,'成为了',trigger.card,'的额外目标');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
subSkill:{
|
||||||
|
sha:{
|
||||||
|
charlotte:true,
|
||||||
|
onremove:true,
|
||||||
|
mod:{
|
||||||
|
cardUsable:function(card,player,num){
|
||||||
|
if(card.name=='sha') return num+player.countMark('twhuzhong_sha');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
twfenwang:{
|
||||||
|
audio:2,
|
||||||
|
trigger:{source:'damageBegin2',player:'damageBegin4'},
|
||||||
|
filter:function(event,player,name){
|
||||||
|
if(name=='damageBegin2'){
|
||||||
|
return !event.hasNature()&&player.countCards('h')>event.player.countCards('h');
|
||||||
|
}
|
||||||
|
return event.hasNature();
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
if(event.triggername=='damageBegin2'){
|
||||||
|
player.line(trigger.player);
|
||||||
|
trigger.num++;
|
||||||
|
event.finish();
|
||||||
|
}
|
||||||
|
else player.chooseToDiscard('h','弃置一张手牌,或令此伤害+1').set('ai',function(card){
|
||||||
|
return 8-get.value(card);
|
||||||
|
});
|
||||||
|
'step 1'
|
||||||
|
if(!result.bool) trigger.num++;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
//夏侯子萼
|
||||||
|
//差点和夏侯紫萼搞混
|
||||||
|
twchengxi:{
|
||||||
|
audio:2,
|
||||||
|
enable:'phaseUse',
|
||||||
|
filter:function(event,player){
|
||||||
|
return game.hasPlayer(target=>lib.skill.twchengxi.filterTarget(null,player,target));
|
||||||
|
},
|
||||||
|
filterTarget:function(card,player,target){
|
||||||
|
if(player.getStorage('twchengxi_used').contains(target)||target==player) return false;
|
||||||
|
return !player.hasSkillTag('noCompareSource')&&target.countCards('h')>0&&!target.hasSkillTag('noCompareTarget');
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
if(!player.storage.twchengxi_used){
|
||||||
|
player.when('phaseUseAfter').then(()=>delete player.storage.twchengxi_used);
|
||||||
|
}
|
||||||
|
player.markAuto('twchengxi_used',[target]);
|
||||||
|
player.draw();
|
||||||
|
'step 1'
|
||||||
|
if(player.canCompare(target)) player.chooseToCompare(target);
|
||||||
|
else event.finish();
|
||||||
|
'step 2'
|
||||||
|
if(result.bool){
|
||||||
|
player.addSkill('twchengxi_effect');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
var card={name:'sha',isCard:true};
|
||||||
|
if(target.canUse(card,player,false)) target.useCard(card,player,false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
order:8,
|
||||||
|
result:{
|
||||||
|
target:function(player,target){
|
||||||
|
if(player.hasSkill('twchengxi_effect')) return 0;
|
||||||
|
var hs=player.getCards('h').sort((a,b)=>b.number-a.number);
|
||||||
|
var ts=target.getCards('h').sort((a,b)=>b.number-a.number);
|
||||||
|
if(!hs.length||!ts.length) return 0;
|
||||||
|
if(hs[0].number>ts[0].number) return -3;
|
||||||
|
if(!target.canUse({name:'sha',isCard:true},player,false)) return -1;
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
subSkill:{
|
||||||
|
effect:{
|
||||||
|
charlotte:true,
|
||||||
|
trigger:{player:'useCard1'},
|
||||||
|
filter:function(event,player){
|
||||||
|
return get.type(event.card)=='basic'||get.type(event.card)=='trick';
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
popup:false,
|
||||||
|
content:function(){
|
||||||
|
player.removeSkill('twchengxi_effect');
|
||||||
|
player.when('useCardAfter').filter(evt=>evt==trigger).then(()=>{
|
||||||
|
if(trigger.targets){
|
||||||
|
var card={
|
||||||
|
name:trigger.card.name,
|
||||||
|
isCard:true,
|
||||||
|
};
|
||||||
|
var targets=trigger.targets.filter(i=>i.isIn()&&player.canUse(card,i,false));
|
||||||
|
if(targets.length) player.useCard(card,targets,false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
mark:true,
|
||||||
|
marktext:'袭',
|
||||||
|
intro:{content:'使用的下一张基本牌或非延时锦囊牌结算完毕后视为对相同目标再使用一张无次数限制的同名牌'},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
//侠刘备
|
||||||
|
twshenyi:{
|
||||||
|
audio:2,
|
||||||
|
trigger:{global:'damageEnd'},
|
||||||
|
filter:function(event,player){
|
||||||
|
if(!event.player.isIn()) return false;
|
||||||
|
if(event.player.getHistory('damage').indexOf(event)!=0) return false;
|
||||||
|
return event.player==player||player.inRange(event.player);
|
||||||
|
},
|
||||||
|
usable:1,
|
||||||
|
direct:true,
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
var list=get.inpileVCardList(info=>{
|
||||||
|
return ['basic','trick','delay'].includes(info[0])&&!player.getStorage('twshenyi').includes(info[2]);
|
||||||
|
});
|
||||||
|
var dialog=[`###${get.prompt('twshenyi',trigger.player)}###<div class="text center">从牌堆中将一张牌作为“侠义”置于武将牌上${player!=trigger.player&&player.countCards('h')?',然后将所有手牌交给其':''}</div>`,[list,'vcard']];
|
||||||
|
player.chooseButton(dialog).set('ai',function(button){
|
||||||
|
var trigger=_status.event.getTrigger();
|
||||||
|
var player=_status.event.player,name=button.link[2];
|
||||||
|
if(get.attitude(player,trigger.player)<=0) return 0;
|
||||||
|
if(!get.cardPile2(card=>card.name==name)) return 0;
|
||||||
|
var value=get.value({name:name});
|
||||||
|
if(['tao','jiu','caochuan','wuxie'].includes(name)&&get.event().getRand()>0.4) return value*2;
|
||||||
|
return value;
|
||||||
|
});
|
||||||
|
'step 1'
|
||||||
|
if(result.bool){
|
||||||
|
var name=result.links[0][2],nature=result.links[0][3];
|
||||||
|
var cardx={name:name,nature:nature};
|
||||||
|
player.logSkill('twshenyi',trigger.player);
|
||||||
|
player.popup(cardx);
|
||||||
|
player.markAuto('twshenyi',[name]);
|
||||||
|
game.log(player,'声明了',`#y${get.translation(cardx)}`);
|
||||||
|
var card=get.cardPile2(card=>get.name(card,false)==name&&get.nature(card,false)==nature);
|
||||||
|
if(card) player.addToExpansion([card],'gain2').gaintag.add('twshenyi');
|
||||||
|
else{
|
||||||
|
player.chat('无牌可得?!');
|
||||||
|
game.log('但是牌堆中已经没有','#y'+get.translation(name),'了!');
|
||||||
|
}
|
||||||
|
if(trigger.player!=player&&player.countCards('h')){
|
||||||
|
game.delayex();
|
||||||
|
var skill='twshenyi_'+player.playerid;
|
||||||
|
game.broadcastAll(lib.skill.twshenyi.createGainTag,skill,player.name);
|
||||||
|
game.addVideo('skill',player,['twshenyi',[skill,player.name]]);
|
||||||
|
player.give(player.getCards('h'),trigger.player).gaintag.add(skill);
|
||||||
|
player.addSkill('twshenyi_draw');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else player.storage.counttrigger.twshenyi--;
|
||||||
|
},
|
||||||
|
video:(player,info)=>lib.skill.twshenyi.createGainTag(info[0],info[1]),
|
||||||
|
createGainTag:function(skill,name){
|
||||||
|
if(!lib.skill[skill]){
|
||||||
|
lib.skill[skill]={charlotte:true};
|
||||||
|
lib.translate[skill]='义·'+get.translation(name);
|
||||||
|
}
|
||||||
|
if(!_status.postReconnect.twshenyi){
|
||||||
|
_status.postReconnect.twshenyi=[
|
||||||
|
lib.skill.twshenyi.createGainTag,[],[]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
_status.postReconnect.twshenyi[1].add(skill);
|
||||||
|
_status.postReconnect.twshenyi[2].add(name);
|
||||||
|
},
|
||||||
|
marktext:'义',
|
||||||
|
intro:{
|
||||||
|
name:'侠义',
|
||||||
|
content:'expansion',
|
||||||
|
markcount:'expansion',
|
||||||
|
},
|
||||||
|
onremove:function(player,skill){
|
||||||
|
delete player.storage[skill];
|
||||||
|
//var cards=player.getExpansions(skill);
|
||||||
|
//if(cards.length) player.loseToDiscardpile(cards);
|
||||||
|
},
|
||||||
|
subSkill:{
|
||||||
|
draw:{
|
||||||
|
charlotte:true,
|
||||||
|
audio:'twshenyi',
|
||||||
|
trigger:{
|
||||||
|
global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'],
|
||||||
|
},
|
||||||
|
filter:function(event,player){
|
||||||
|
var skill='twshenyi_'+player.playerid;
|
||||||
|
return game.hasPlayer(target=>{
|
||||||
|
var evt=event.getl(target);
|
||||||
|
if(!evt||!evt.hs||!evt.hs.length) return false;
|
||||||
|
for(let i in evt.gaintag_map){
|
||||||
|
if(evt.gaintag_map[i].includes(skill)) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
direct:true,
|
||||||
|
content:function(){
|
||||||
|
var skill='twshenyi_'+player.playerid;
|
||||||
|
var num=0;
|
||||||
|
var targets=game.filterPlayer(target=>{
|
||||||
|
var evt=trigger.getl(target);
|
||||||
|
var numx=0;
|
||||||
|
if(!evt||!evt.hs||!evt.hs.length) return false;
|
||||||
|
for(var i in evt.gaintag_map){
|
||||||
|
if(evt.gaintag_map[i].includes(skill)) numx++;
|
||||||
|
}
|
||||||
|
if(numx>0) return num+=numx;
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
if(num>0){
|
||||||
|
player.logSkill('twshenyi_draw',targets);
|
||||||
|
player.draw(num);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
twxinghan:{
|
||||||
|
audio:2,
|
||||||
|
trigger:{player:'phaseZhunbeiBegin'},
|
||||||
|
filter:function(event,player){
|
||||||
|
return player.getExpansions('twshenyi').length>game.countPlayer();
|
||||||
|
},
|
||||||
|
check:function(event,player){
|
||||||
|
if(player.hp>=3||(player.countCards('h')>=4&&player.getExpansions('twshenyi').every(card=>!player.hasValueTarget(card)||!get.tag(card,'damage')||!lib.skill.xunshi.isXunshi(card)))) return false;
|
||||||
|
return player.getExpansions('twshenyi').some(card=>player.hasValueTarget(card));
|
||||||
|
},
|
||||||
|
direct:true,
|
||||||
|
content:function*(event,map){
|
||||||
|
var player=map.player;
|
||||||
|
var result=yield player.chooseBool().set('createDialog',[
|
||||||
|
get.prompt('twxinghan'),
|
||||||
|
`<div class="text center">按顺序使用以下“侠义”牌。但是回合结束时你须弃置所有手牌并失去X点体力(X为你的体力值-1且X至少为1)</div>`,
|
||||||
|
player.getExpansions('twshenyi').filter(card=>player.hasUseTarget(card)).reverse(),
|
||||||
|
'hidden',
|
||||||
|
]).set('choice',lib.skill.twxinghan.check(null,player));
|
||||||
|
if(!result.bool){
|
||||||
|
event.finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
while(true){
|
||||||
|
var cards=player.getExpansions('twshenyi').filter(card=>player.hasUseTarget(card)).reverse();
|
||||||
|
if(!cards.length) break;
|
||||||
|
yield player.chooseUseTarget(true,cards[0],false);
|
||||||
|
}
|
||||||
|
player.when('phaseEnd').then(()=>{
|
||||||
|
if(player.countCards('h')) player.chooseToDiscard(player.countCards('h'),true);
|
||||||
|
var num=Math.max(1,player.getHp()-1);
|
||||||
|
player.loseHp(num);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
group:'twxinghan_init',
|
||||||
|
subSkill:{
|
||||||
|
init:{
|
||||||
|
audio:'twxinghan',
|
||||||
|
trigger:{
|
||||||
|
player:['loseEnd','dying','die','dyingAfter'],
|
||||||
|
global:['equipEnd','addJudgeEnd','gainEnd','loseAsyncEnd','addToExpansionEnd'],
|
||||||
|
},
|
||||||
|
filter:function(event,player){
|
||||||
|
return (player.getExpansions('twshenyi').length&&event.name!='die'&&(!player.countCards('h')||player.isDying()))^player.hasSkill('twxinghan_in');
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
firstDo:true,
|
||||||
|
silent:true,
|
||||||
|
forceDie:true,
|
||||||
|
content:function(){
|
||||||
|
if(player.getExpansions('twshenyi').length&&trigger.name!='die'&&(!player.countCards('h')||player.isDying())){
|
||||||
|
var cards=player.getExpansions('twshenyi');
|
||||||
|
var cardsx=cards.map(card=>{
|
||||||
|
var cardx=ui.create.card();
|
||||||
|
cardx.init(get.cardInfo(card));
|
||||||
|
cardx._cardid=card.cardid;
|
||||||
|
return cardx;
|
||||||
|
});
|
||||||
|
player.directgains(cardsx,null,'twxinghan');
|
||||||
|
player.addSkill('twxinghan_in');
|
||||||
|
}
|
||||||
|
else player.removeSkill('twxinghan_in');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
in:{
|
||||||
|
charlotte:true,
|
||||||
|
audio:'twxinghan',
|
||||||
|
trigger:{player:'addToExpansionEnd'},
|
||||||
|
filter:function(event,player){
|
||||||
|
return event.gaintag.contains('twshenyi');
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
locked:false,
|
||||||
|
silent:true,
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
var cards2=player.getCards('s',card=>card.hasGaintag('twxinghan'));
|
||||||
|
if(player.isOnline2()){
|
||||||
|
player.send(function(cards,player){
|
||||||
|
cards.forEach(i=>i.delete());
|
||||||
|
if(player==game.me) ui.updatehl();
|
||||||
|
},cards2,player);
|
||||||
|
}
|
||||||
|
cards2.forEach(i=>i.delete());
|
||||||
|
if(player==game.me) ui.updatehl();
|
||||||
|
'step 1'
|
||||||
|
var cards=player.getExpansions('twshenyi');
|
||||||
|
var cardsx=cards.map(card=>{
|
||||||
|
var cardx=ui.create.card();
|
||||||
|
cardx.init(get.cardInfo(card));
|
||||||
|
cardx._cardid=card.cardid;
|
||||||
|
return cardx;
|
||||||
|
});
|
||||||
|
player.directgains(cardsx,null,'twxinghan');
|
||||||
|
},
|
||||||
|
onremove:function(player){
|
||||||
|
var cards2=player.getCards('s',card=>card.hasGaintag('twxinghan'));
|
||||||
|
if(player.isOnline2()){
|
||||||
|
player.send(function(cards,player){
|
||||||
|
cards.forEach(i=>i.delete());
|
||||||
|
if(player==game.me) ui.updatehl();
|
||||||
|
},cards2,player);
|
||||||
|
}
|
||||||
|
cards2.forEach(i=>i.delete());
|
||||||
|
if(player==game.me) ui.updatehl();
|
||||||
|
},
|
||||||
|
group:'twxinghan_use',
|
||||||
|
},
|
||||||
|
use:{
|
||||||
|
charlotte:true,
|
||||||
|
trigger:{player:['useCardBefore','respondBefore']},
|
||||||
|
filter:function(event,player){
|
||||||
|
var cards=player.getCards('s',card=>card.hasGaintag('twxinghan')&&card._cardid);
|
||||||
|
return event.cards&&event.cards.some(card=>{
|
||||||
|
return cards.includes(card);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
popup:false,
|
||||||
|
firstDo:true,
|
||||||
|
content:function(){
|
||||||
|
var idList=player.getCards('s',card=>card.hasGaintag('twxinghan')).map(i=>i._cardid);
|
||||||
|
var cards=player.getExpansions('twshenyi');
|
||||||
|
var cards2=[];
|
||||||
|
for(var card of trigger.cards){
|
||||||
|
var cardx=cards.find(cardx=>cardx.cardid==card._cardid);
|
||||||
|
if(cardx) cards2.push(cardx);
|
||||||
|
}
|
||||||
|
var cards3=trigger.cards.slice();
|
||||||
|
trigger.cards=cards2;
|
||||||
|
trigger.card.cards=cards2;
|
||||||
|
if(player.isOnline2()){
|
||||||
|
player.send(function(cards,player){
|
||||||
|
cards.forEach(i=>i.delete());
|
||||||
|
if(player==game.me) ui.updatehl();
|
||||||
|
},cards3,player);
|
||||||
|
}
|
||||||
|
cards3.forEach(i=>i.delete());
|
||||||
|
if(player==game.me) ui.updatehl();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
//张纮
|
//张纮
|
||||||
twquanqian:{
|
twquanqian:{
|
||||||
audio:2,
|
audio:2,
|
||||||
|
@ -462,10 +988,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
switch(get.sgn(att)){
|
switch(get.sgn(att)){
|
||||||
case 1:
|
case 1:
|
||||||
return [cards,[]];
|
return [cards,[]];
|
||||||
break;
|
|
||||||
case 0:
|
case 0:
|
||||||
return [cardx,cardy];
|
return [cardx,cardy];
|
||||||
break;
|
|
||||||
case -1:
|
case -1:
|
||||||
var num=Math.ceil(cards.length/2)+(cards.length%2==0?1:0);
|
var num=Math.ceil(cards.length/2)+(cards.length%2==0?1:0);
|
||||||
if(num>1&&player.hasSkill('twchungang')) num--;
|
if(num>1&&player.hasSkill('twchungang')) num--;
|
||||||
|
@ -475,7 +999,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
cardy.sort((a,b)=>get.value(b)-get.value(a));
|
cardy.sort((a,b)=>get.value(b)-get.value(a));
|
||||||
cardx.addArray(cardy.slice(num,cardy.length));
|
cardx.addArray(cardy.slice(num,cardy.length));
|
||||||
return [cardx,cardy.slice(0,num)];
|
return [cardx,cardy.slice(0,num)];
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}).set('cards',cards);
|
}).set('cards',cards);
|
||||||
'step 1'
|
'step 1'
|
||||||
|
@ -5226,7 +5749,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
direct:true,
|
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var target=lib.skill.twenyuan1.logTarget(trigger,player)[0];
|
var target=lib.skill.twenyuan1.logTarget(trigger,player)[0];
|
||||||
|
@ -5508,7 +6030,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
})){
|
})){
|
||||||
event.finish();
|
event.finish();
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
player.chooseTarget(get.prompt('twzhengrong'),'将一名其他角色的一张牌置于武将牌上,称为“荣”',function(card,player,target){
|
player.chooseTarget(get.prompt('twzhengrong'),'将一名其他角色的一张牌置于武将牌上,称为“荣”',function(card,player,target){
|
||||||
return target!=player&&target.countCards('he');
|
return target!=player&&target.countCards('he');
|
||||||
}).set('ai',function(target){
|
}).set('ai',function(target){
|
||||||
|
@ -5937,7 +6459,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.addToExpansion(result.cards[0],'log','give',player).gaintag.add('twmingren');
|
player.addToExpansion(result.cards[0],'log','give',player).gaintag.add('twmingren');
|
||||||
var card=player.getExpansions('twmingren')[0];
|
var card=player.getExpansions('twmingren')[0];
|
||||||
if(card) player.gain(card,'gain2');
|
if(card) player.gain(card,'gain2');
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -8329,7 +8851,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return 6+get.effect(player,card,target,target);
|
return 6+get.effect(player,card,target,target);
|
||||||
}
|
}
|
||||||
return get.effect(target,{name:'guohe_copy2'},player,player)/2+get.effect(target,card,player,player);
|
return get.effect(target,{name:'guohe_copy2'},player,player)/2+get.effect(target,card,player,player);
|
||||||
});;
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
event.targets=result.targets;
|
event.targets=result.targets;
|
||||||
|
@ -11254,7 +11776,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var checkx=get.color(card,player)==get.color(judging);
|
var checkx=get.color(card,player)==get.color(judging);
|
||||||
if(checkx>0) return checkx;
|
if(checkx>0) return checkx;
|
||||||
return 0;
|
return 0;
|
||||||
};
|
}
|
||||||
return result*(attitude>0?1:-1);
|
return result*(attitude>0?1:-1);
|
||||||
}).set('judging',trigger.player.judging[0]);
|
}).set('judging',trigger.player.judging[0]);
|
||||||
'step 1'
|
'step 1'
|
||||||
|
@ -14698,6 +15220,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
kaisa:"凯撒",
|
kaisa:"凯撒",
|
||||||
zhengfu:"征服",
|
zhengfu:"征服",
|
||||||
zhengfu_info:"当你使用【杀】指定目标时,你可以选择一种牌的类别,然后除非目标角色交给你一种该类别的牌,否则其不能闪避此【杀】。",
|
zhengfu_info:"当你使用【杀】指定目标时,你可以选择一种牌的类别,然后除非目标角色交给你一种该类别的牌,否则其不能闪避此【杀】。",
|
||||||
|
xia_xiahoudun:'侠夏侯惇',
|
||||||
|
xia_xiahoudun_prefix:'侠',
|
||||||
|
twdanlie:'胆烈',
|
||||||
|
twdanlie_info:'①出牌阶段限一次。你可以与至多三名其他角色共同拼点。若你赢,你对没赢的角色依次造成1点伤害;若你没赢,你失去1点体力。②你的拼点牌点数+X(X为你已损失的体力值)。',
|
||||||
|
xia_zhangwei:'张葳',
|
||||||
|
twhuzhong:'护众',
|
||||||
|
twhuzhong_info:'当你于出牌阶段使用无属性【杀】指定唯一目标角色时,你可以选择一项:①弃置一张手牌,然后你可以为此牌额外选择一个目标;②令其弃置一张手牌,此牌结算完毕后,若此牌造成过伤害,则你摸一张牌且本阶段可以额外使用一张【杀】,否则其对你造成1点伤害。',
|
||||||
|
twfenwang:'焚亡',
|
||||||
|
twfenwang_info:'①当你受到属性伤害时,你须弃置一张牌或令此伤害+1。②当你对其他角色造成非属性伤害时,若你的手牌数大于其,则此伤害+1。',
|
||||||
|
xia_xiahousone:'夏侯子萼',
|
||||||
|
twchengxi:'承袭',
|
||||||
|
twchengxi_info:'出牌阶段每名角色限一次,你可以摸一张牌并与一名其他角色拼点。若你赢,你使用的下一张基本牌或非延时锦囊牌结算完毕后,你视为对原目标使用一张无次数限制的同名牌;若你没赢,其视为对你使用一张无距离限制的【杀】。',
|
||||||
|
xia_liubei:'侠刘备',
|
||||||
|
xia_liubei_prefix:'侠',
|
||||||
|
twshenyi:'伸义',
|
||||||
|
twshenyi_info:'每回合限一次。当你或你攻击范围内的一名角色于一回合内首次受到伤害后,你可以声明一种基本牌或锦囊牌(每种牌名限一次),然后从牌堆中将一张同名牌称为“侠义”置于武将牌上。若受伤角色不为你,则你将所有手牌交给其,且当其失去一张你以此法交给其的牌后,你摸一张牌。',
|
||||||
|
twxinghan:'兴汉',
|
||||||
|
twxinghan_info:'①当你没有手牌时或你处于濒死状态时,你可以如手牌般使用或打出“侠义”牌。②准备阶段,若“侠义”牌数大于存活角色数,则你可以依次使用其中所有可以使用的牌。然后你获得如下效果:回合结束时,你弃置所有手牌并失去X点体力(X为你的体力值-1且X至少为1)。',
|
||||||
|
|
||||||
tw_mobile:'海外服·稀有专属',
|
tw_mobile:'海外服·稀有专属',
|
||||||
tw_yunchouzhi:'运筹帷幄·智',
|
tw_yunchouzhi:'运筹帷幄·智',
|
||||||
|
|
|
@ -8,6 +8,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
dc_xujing:['male','shu',3,['dcshangyu','dccaixia']],
|
dc_xujing:['male','shu',3,['dcshangyu','dccaixia']],
|
||||||
dc_zhaoxiang:['female','shu',4,['refanghun','refuhan']],
|
dc_zhaoxiang:['female','shu',4,['refanghun','refuhan']],
|
||||||
dc_guansuo:['male','shu',4,['xinzhengnan','xiefang']],
|
dc_guansuo:['male','shu',4,['xinzhengnan','xiefang']],
|
||||||
|
xin_baosanniang:['female','shu',3,['decadewuniang','decadexushen']],
|
||||||
dc_shixie:['male','qun',3,['rebiluan','ollixia']],
|
dc_shixie:['male','qun',3,['rebiluan','ollixia']],
|
||||||
dc_sp_machao:['male','qun',4,['zhuiji','dc_olshichou']],
|
dc_sp_machao:['male','qun',4,['zhuiji','dc_olshichou']],
|
||||||
old_huangfusong:['male','qun',4,['xinfenyue']],
|
old_huangfusong:['male','qun',4,['xinfenyue']],
|
||||||
|
@ -28,7 +29,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
zhangjinyun:['female','shu',3,['dchuizhi','dcjijiao']],
|
zhangjinyun:['female','shu',3,['dchuizhi','dcjijiao']],
|
||||||
huanfan:['male','wei',3,['dcjianzheng','dcfumou']],
|
huanfan:['male','wei',3,['dcjianzheng','dcfumou']],
|
||||||
chentai:['male','wei',4,['dcctjiuxian','dcchenyong']],
|
chentai:['male','wei',4,['dcctjiuxian','dcchenyong']],
|
||||||
sunyu:['male','wu',3,['dcquanshou','dcshexue'],['unseen']],
|
sunyu:['male','wu',3,['dcquanshou','dcshexue']],
|
||||||
xizheng:['male','shu',3,['dcdanyi','dcwencan']],
|
xizheng:['male','shu',3,['dcdanyi','dcwencan']],
|
||||||
dc_ruiji:['female','wu',4,['dcwangyuan','dclingyin','dcliying']],
|
dc_ruiji:['female','wu',4,['dcwangyuan','dclingyin','dcliying']],
|
||||||
zerong:['male','qun',4,['dccansi','dcfozong']],
|
zerong:['male','qun',4,['dccansi','dcfozong']],
|
||||||
|
@ -95,7 +96,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
sp2_doukou:['re_xinxianying','huaman','xuelingyun','dc_ruiji','duanqiaoxiao','tianshangyi'],
|
sp2_doukou:['re_xinxianying','huaman','xuelingyun','dc_ruiji','duanqiaoxiao','tianshangyi'],
|
||||||
sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong','huanfan','xizheng'],
|
sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong','huanfan','xizheng'],
|
||||||
sp2_yuxiu:['dongguiren','dc_tengfanglan','zhangjinyun','zhoubuyi','dc_xujing'],
|
sp2_yuxiu:['dongguiren','dc_tengfanglan','zhangjinyun','zhoubuyi','dc_xujing'],
|
||||||
sp2_qifu:['dc_guansuo','dc_zhaoxiang'],
|
sp2_qifu:['dc_guansuo','xin_baosanniang','dc_zhaoxiang'],
|
||||||
sp2_gaoshan:['wanglang','liuhui'],
|
sp2_gaoshan:['wanglang','liuhui'],
|
||||||
sp2_wumiao:['wu_zhugeliang','wu_luxun'],
|
sp2_wumiao:['wu_zhugeliang','wu_luxun'],
|
||||||
}
|
}
|
||||||
|
@ -155,7 +156,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(shown.length<cards.length){
|
if(shown.length<cards.length){
|
||||||
var num=cards.length-shown.length;
|
var num=cards.length-shown.length;
|
||||||
player.$draw(num);
|
player.$draw(num);
|
||||||
game.log(player,'从牌堆获得了',num,'张点数为8的牌');
|
game.log(player,'从牌堆获得了',get.cnNumber(num),'张点数为8的牌');
|
||||||
}
|
}
|
||||||
if(shown.length>0){
|
if(shown.length>0){
|
||||||
player.$gain2(shown,false);
|
player.$gain2(shown,false);
|
||||||
|
@ -1506,7 +1507,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(type=='equip'&&game.hasPlayer(current=>{
|
if(type=='equip'&&game.hasPlayer(current=>{
|
||||||
return current.canEquip(card);
|
return current.canEquip(card);
|
||||||
})||type=='delay'&&game.hasPlayer(current=>{
|
})||type=='delay'&&game.hasPlayer(current=>{
|
||||||
return !current.storage._disableJudge&&!current.hasJudge(card.name);
|
return current.canAddJudge(card);
|
||||||
})) choices.unshift('场上');
|
})) choices.unshift('场上');
|
||||||
player.chooseControl(choices).set('prompt','请选择要将'+get.translation(card)+'置于的位置').set('ai',()=>{
|
player.chooseControl(choices).set('prompt','请选择要将'+get.translation(card)+'置于的位置').set('ai',()=>{
|
||||||
return _status.event.choice;
|
return _status.event.choice;
|
||||||
|
@ -1526,7 +1527,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return _status.event.targets.contains(target);
|
return _status.event.targets.contains(target);
|
||||||
}).set('targets',game.filterPlayer(current=>{
|
}).set('targets',game.filterPlayer(current=>{
|
||||||
if(type=='equip') return current.canEquip(card);
|
if(type=='equip') return current.canEquip(card);
|
||||||
if(type=='delay') return !current.storage._disableJudge&&!current.hasJudge(card.name);
|
if(type=='delay') return current.canAddJudge(card);
|
||||||
return false;
|
return false;
|
||||||
})).set('ai',target=>{
|
})).set('ai',target=>{
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
|
@ -1539,7 +1540,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.$throw(card,1000);
|
player.$throw(card,1000);
|
||||||
var next=player.lose(card,ui.cardPile);
|
var next=player.lose(card,ui.cardPile,'visible');
|
||||||
if(result.control=='牌堆顶') next.insert_card=true;
|
if(result.control=='牌堆顶') next.insert_card=true;
|
||||||
game.log(player,'将',card,'置于了','#y'+result.control);
|
game.log(player,'将',card,'置于了','#y'+result.control);
|
||||||
}
|
}
|
||||||
|
@ -1555,7 +1556,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
target.addJudge(card);
|
target.addJudge(card);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(event.count<4) event.goto(1);
|
|
||||||
'step 5'
|
'step 5'
|
||||||
game.countPlayer(current=>{
|
game.countPlayer(current=>{
|
||||||
var count=current.countCards('e');
|
var count=current.countCards('e');
|
||||||
|
@ -1564,7 +1564,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
current.link(false);
|
current.link(false);
|
||||||
current.turnOver(false);
|
current.turnOver(false);
|
||||||
}
|
}
|
||||||
|
event.equipCount[current.playerid]=count;
|
||||||
});
|
});
|
||||||
|
if(event.count<4) event.goto(1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//杜预
|
//杜预
|
||||||
|
@ -3145,11 +3147,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
trigger:{global:'phaseBegin'},
|
trigger:{global:'phaseBegin'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.player.countCards('h')<event.player.maxHp;
|
return event.player.countCards('h')<=event.player.maxHp;
|
||||||
},
|
},
|
||||||
logTarget:'player',
|
logTarget:'player',
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
return get.attitude(player,event.player)>0||event.player.maxHp-event.player.countCards('h')<=2;
|
if(get.attitude(player,event.player)>0) return true;
|
||||||
|
const draw=event.player.maxHp-event.player.countCards('h');
|
||||||
|
return draw<=2&&event.player.getHp(true)-draw>=1;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
@ -3161,7 +3165,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var draw=Math.min(5,Math.max(0,trigger.player.maxHp-trigger.player.countCards('h')));
|
var draw=Math.min(5,Math.max(0,trigger.player.maxHp-trigger.player.countCards('h')));
|
||||||
if(get.attitude(trigger.player,player)>0){
|
if(get.attitude(trigger.player,player)>0){
|
||||||
if(draw>=3||trigger.player.getCardUsable('sha')>1) return '选项一';
|
if(draw>=3||trigger.player.getCardUsable('sha')>1) return '选项一';
|
||||||
if(draw<=1&&trigger.player.countCards('hs',card=>{
|
if(!draw||draw<=1&&trigger.player.countCards('hs',card=>{
|
||||||
return get.name(card)=='sha'&&trigger.player.hasValueTarget(card);
|
return get.name(card)=='sha'&&trigger.player.hasValueTarget(card);
|
||||||
})) return '选项二';
|
})) return '选项二';
|
||||||
return '选项一';
|
return '选项一';
|
||||||
|
@ -3212,7 +3216,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
popup:false,
|
popup:false,
|
||||||
charlotte:true,
|
charlotte:true,
|
||||||
onremove:true,
|
onremove:true,
|
||||||
marktext:'守',
|
marktext:'<span style="text-decoration: line-through;">守</span>',
|
||||||
intro:{content:'本回合使用的牌被抵消后,$摸一张牌'},
|
intro:{content:'本回合使用的牌被抵消后,$摸一张牌'},
|
||||||
content:function(){
|
content:function(){
|
||||||
var targets=player.getStorage('dcquanshou_respond');
|
var targets=player.getStorage('dcquanshou_respond');
|
||||||
|
@ -3232,7 +3236,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{player:'phaseUseBegin'},
|
trigger:{player:'phaseUseBegin'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
var card=lib.skill.dcshexue.getLast();
|
var card=lib.skill.dcshexue.getLast();
|
||||||
return card&&player.hasUseTarget(card);
|
return card&&player.hasUseTarget(card,false);
|
||||||
},
|
},
|
||||||
getLast:function(){
|
getLast:function(){
|
||||||
for(var current of game.filterPlayer()){
|
for(var current of game.filterPlayer()){
|
||||||
|
@ -3258,10 +3262,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var card=lib.skill.dcshexue.getLast();
|
var card=lib.skill.dcshexue.getLast();
|
||||||
game.broadcastAll(function(card){
|
game.broadcastAll(function(card){
|
||||||
lib.skill.dcshexue_backup.viewAs=card;
|
lib.skill.dcshexue_backup.viewAs=card;
|
||||||
lib.skill.dcshexue_backup.prompt='设学:是否将一张牌当做'+get.translation(card)+'使用?';
|
|
||||||
},card);
|
},card);
|
||||||
var next=player.chooseToUse();
|
var next=player.chooseToUse();
|
||||||
next.set('openskilldialog','设学:是否将一张牌当做'+get.translation(card)+'使用?');
|
next.set('openskilldialog',`###${get.prompt('dcshexue')}###将一张牌当做${get.translation(card.nature)||''}【${get.translation(card.name)}】使用`);
|
||||||
next.set('norestore',true);
|
next.set('norestore',true);
|
||||||
next.set('addCount',false);
|
next.set('addCount',false);
|
||||||
next.set('_backupevent','dcshexue_backup');
|
next.set('_backupevent','dcshexue_backup');
|
||||||
|
@ -3277,6 +3280,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filterCard:function(card){
|
filterCard:function(card){
|
||||||
return get.itemtype(card)=='card';
|
return get.itemtype(card)=='card';
|
||||||
},
|
},
|
||||||
|
filterTarget:lib.filter.targetEnabled,
|
||||||
position:'hes',
|
position:'hes',
|
||||||
selectCard:1,
|
selectCard:1,
|
||||||
check:(card)=>6-get.value(card),
|
check:(card)=>6-get.value(card),
|
||||||
|
@ -3297,6 +3301,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var card=history[history.length-1].card;
|
var card=history[history.length-1].card;
|
||||||
return '令下一回合的角色于其出牌阶段开始时选择是否将一张牌当做'+(get.translation(card.nature)||'')+'【'+get.translation(card.name)+'】使用';
|
return '令下一回合的角色于其出牌阶段开始时选择是否将一张牌当做'+(get.translation(card.nature)||'')+'【'+get.translation(card.name)+'】使用';
|
||||||
},
|
},
|
||||||
|
check:function(event,player){
|
||||||
|
let evt=event.getParent('phase').getParent();
|
||||||
|
let nextPlayer=player.getNext();
|
||||||
|
if(evt&&evt.next&&evt.next.length){
|
||||||
|
nextPlayer=evt.next[0].player;
|
||||||
|
}
|
||||||
|
return get.attitude(player,nextPlayer)>0;
|
||||||
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
var history=player.getHistory('useCard',evt=>{
|
var history=player.getHistory('useCard',evt=>{
|
||||||
return evt.getParent('phaseUse')==trigger&&(get.type(evt.card)=='basic'||get.type(evt.card)=='trick');
|
return evt.getParent('phaseUse')==trigger&&(get.type(evt.card)=='basic'||get.type(evt.card)=='trick');
|
||||||
|
@ -3311,7 +3323,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
study:{
|
study:{
|
||||||
trigger:{player:'phaseUseBegin'},
|
trigger:{player:'phaseUseBegin'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.getStorage('dcshexue_study').some(i=>event.player.hasUseTarget(i));
|
return player.getStorage('dcshexue_study').some(i=>event.player.hasUseTarget(i,false));
|
||||||
},
|
},
|
||||||
onremove:true,
|
onremove:true,
|
||||||
charlotte:true,
|
charlotte:true,
|
||||||
|
@ -3321,13 +3333,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
event.cards=player.getStorage('dcshexue_study');
|
event.cards=player.getStorage('dcshexue_study');
|
||||||
'step 1'
|
'step 1'
|
||||||
var card=cards.pop();
|
var card=cards.pop();
|
||||||
if(trigger.player.hasUseTarget(card)){
|
if(trigger.player.hasUseTarget(card,false)){
|
||||||
game.broadcastAll(function(card){
|
game.broadcastAll(function(card){
|
||||||
lib.skill.dcshexue_backup.viewAs=card;
|
lib.skill.dcshexue_backup.viewAs=card;
|
||||||
lib.skill.dcshexue_backup.prompt='设学:是否将一张牌当做'+get.translation(card)+'使用?';
|
lib.skill.dcshexue_backup.prompt='设学:是否将一张牌当做'+get.translation(card)+'使用?';
|
||||||
},card);
|
},card);
|
||||||
var next=trigger.player.chooseToUse();
|
var next=trigger.player.chooseToUse();
|
||||||
next.set('openskilldialog','设学:是否将一张牌当做'+get.translation(card)+'使用?');
|
next.set('openskilldialog',`###${get.prompt('dcshexue_study')}###将一张牌当做${get.translation(card.nature)||''}【${get.translation(card.name)}】使用`);
|
||||||
next.set('norestore',true);
|
next.set('norestore',true);
|
||||||
next.set('addCount',false);
|
next.set('addCount',false);
|
||||||
next.set('_backupevent','dcshexue_backup');
|
next.set('_backupevent','dcshexue_backup');
|
||||||
|
@ -4245,7 +4257,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
try{
|
try{
|
||||||
targetsx=game.filterPlayer(current=>player.inRange(current));
|
targetsx=game.filterPlayer(current=>player.inRange(current));
|
||||||
}
|
}
|
||||||
catch(e){player.storage.dcyuanmo_range=_tmp};
|
catch(e){
|
||||||
|
player.storage.dcyuanmo_range=_tmp
|
||||||
|
}
|
||||||
player.storage.dcyuanmo_range=_tmp;
|
player.storage.dcyuanmo_range=_tmp;
|
||||||
targetsx.removeArray(targets);
|
targetsx.removeArray(targets);
|
||||||
return targetsx.reduce((p,c)=>{
|
return targetsx.reduce((p,c)=>{
|
||||||
|
@ -6061,7 +6075,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
dcshoutan:{
|
dcshoutan:{
|
||||||
audio:2,
|
audio:2,
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
selectCard:-1,
|
|
||||||
position:'h',
|
position:'h',
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(player.hasSkill('dcyaoyi')) return !player.hasSkill('dcshoutan_blocker',null,null,false);
|
if(player.hasSkill('dcyaoyi')) return !player.hasSkill('dcshoutan_blocker',null,null,false);
|
||||||
|
@ -8908,7 +8921,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(blacks.length>0){
|
if(blacks.length>0){
|
||||||
dialog.push('<div class="text center">黑色牌</div>');
|
dialog.push('<div class="text center">黑色牌</div>');
|
||||||
dialog.push(blacks);
|
dialog.push(blacks);
|
||||||
};
|
}
|
||||||
player.chooseButton(dialog,true).set('ai',function(button){
|
player.chooseButton(dialog,true).set('ai',function(button){
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
var color=get.color(button.link),cards=player.getExpansions('syjiqiao');
|
var color=get.color(button.link),cards=player.getExpansions('syjiqiao');
|
||||||
|
@ -9255,7 +9268,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
switch(button.link){
|
switch(button.link){
|
||||||
case 0:
|
case 0:
|
||||||
return 2;
|
return 2;
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
return Math.max(0.5,player.countCards('hs',function(card){
|
return Math.max(0.5,player.countCards('hs',function(card){
|
||||||
return get.name(card)=='sha'&&player.hasValueTarget(card);
|
return get.name(card)=='sha'&&player.hasValueTarget(card);
|
||||||
|
@ -9264,10 +9276,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}).map(function(target){
|
}).map(function(target){
|
||||||
return get.damageEffect(target,player,player);
|
return get.damageEffect(target,player,player);
|
||||||
}));
|
}));
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
return player.needsToDiscard()/4;
|
return player.needsToDiscard()/4;
|
||||||
break;
|
|
||||||
case 3:
|
case 3:
|
||||||
var num=0;
|
var num=0;
|
||||||
return 0.8*Math.max.apply(Math,game.filterPlayer(function(current){
|
return 0.8*Math.max.apply(Math,game.filterPlayer(function(current){
|
||||||
|
@ -9275,7 +9285,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}).map(function(target){
|
}).map(function(target){
|
||||||
return get.effect(target,{name:'shunshou_copy'},player,player);
|
return get.effect(target,{name:'shunshou_copy'},player,player);
|
||||||
}));
|
}));
|
||||||
break;
|
|
||||||
case 4:
|
case 4:
|
||||||
var num=0;
|
var num=0;
|
||||||
game.countPlayer(function(current){
|
game.countPlayer(function(current){
|
||||||
|
@ -9285,7 +9294,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return num*0.8;
|
return num*0.8;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(player.getDamagedHp()>0) next.set('selectButton',[1,1+player.getDamagedHp()]);
|
if(player.getDamagedHp()>0) next.set('selectButton',[1,1+player.getDamagedHp()]);
|
||||||
|
@ -10230,7 +10238,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
usable:1,
|
usable:1,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return !player.storage.zunwei||player.storage.zunwei.length<3;
|
let storage=player.getStorage('zunwei');
|
||||||
|
return storage.length<3&&game.hasPlayer(current=>{
|
||||||
|
return player.isDamaged()&¤t.getHp()>player.getHp()&&!storage.includes(0)||
|
||||||
|
current.countCards('h')>player.countCards('h')&&!storage.includes(1)||
|
||||||
|
current.countCards('e')>player.countCards('e')&&!storage.includes(2);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
chooseButton:{
|
chooseButton:{
|
||||||
dialog:function(event,player){
|
dialog:function(event,player){
|
||||||
|
@ -10241,12 +10254,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
];
|
];
|
||||||
var choiceList=ui.create.dialog('尊位:请选择一项','forcebutton','hidden');
|
var choiceList=ui.create.dialog('尊位:请选择一项','forcebutton','hidden');
|
||||||
choiceList.add([list.map((item,i)=>{
|
choiceList.add([list.map((item,i)=>{
|
||||||
|
if(player.getStorage('zunwei').includes(i)) item=`<span style="text-decoration: line-through;">${item}</span>`;
|
||||||
return [i,item];
|
return [i,item];
|
||||||
}),'textbutton'])
|
}),'textbutton'])
|
||||||
return choiceList;
|
return choiceList;
|
||||||
},
|
},
|
||||||
filter:function(button){
|
filter:function(button){
|
||||||
return button._filterButton;
|
const player=get.player();
|
||||||
|
if(player.getStorage('zunwei').includes(button.link)) return false;
|
||||||
|
if(button.link==0){
|
||||||
|
if(!player.isDamaged()) return false;
|
||||||
|
return game.hasPlayer(current=>{
|
||||||
|
return current.getHp()>player.getHp();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if(button.link==1){
|
||||||
|
return game.hasPlayer(current=>{
|
||||||
|
return current.countCards('h')>player.countCards('h');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if(button.link==2){
|
||||||
|
return game.hasPlayer(current=>{
|
||||||
|
return current.countCards('e')>player.countCards('e');
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
backup:function(links){
|
backup:function(links){
|
||||||
var next=get.copy(lib.skill.zunwei.backups[links[0]]);
|
var next=get.copy(lib.skill.zunwei.backups[links[0]]);
|
||||||
|
@ -11852,7 +11883,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
//filter:function(event,player){
|
//filter:function(event,player){
|
||||||
// return player.storage.gxlianhua&&player.storage.gxlianhua.red+player.storage.gxlianhua.black>0;
|
// return player.storage.gxlianhua&&player.storage.gxlianhua.red+player.storage.gxlianhua.black>0;
|
||||||
//},
|
//},
|
||||||
forced:true,
|
|
||||||
content:function(){
|
content:function(){
|
||||||
var cards=[];
|
var cards=[];
|
||||||
var cards2=[];
|
var cards2=[];
|
||||||
|
@ -12308,7 +12338,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return '当你使用或打出'+(player.hasSkill('dczhangcai_all')?'':'点数为8的')+'牌时,你可以摸X张牌(X为你手牌区里'+(player.hasSkill('dczhangcai_all')?'与此牌点数相同':'点数为8')+'的牌数且至少为1)。';
|
return '当你使用或打出'+(player.hasSkill('dczhangcai_all')?'':'点数为8的')+'牌时,你可以摸X张牌(X为你手牌区里'+(player.hasSkill('dczhangcai_all')?'与此牌点数相同':'点数为8')+'的牌数且至少为1)。';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
perfectPair:{},
|
|
||||||
characterReplace:{
|
characterReplace:{
|
||||||
wenyang:['wenyang','db_wenyang','diy_wenyang'],
|
wenyang:['wenyang','db_wenyang','diy_wenyang'],
|
||||||
gexuan:['gexuan','tw_gexuan'],
|
gexuan:['gexuan','tw_gexuan'],
|
||||||
|
@ -12686,9 +12715,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
dcchenyong_info:'结束阶段,你可以摸X张牌(X为本回合你使用过的牌的类型数)。',
|
dcchenyong_info:'结束阶段,你可以摸X张牌(X为本回合你使用过的牌的类型数)。',
|
||||||
sunyu:'孙瑜',
|
sunyu:'孙瑜',
|
||||||
dcquanshou:'劝守',
|
dcquanshou:'劝守',
|
||||||
dcquanshou_info:'一名角色的回合开始时,若其手牌数小于其体力上限,你可以令其选择一项:1.将手牌摸至体力上限,然后本回合使用【杀】的次数上限-1(至多摸五张);2.其本回合使用牌被抵消后,你摸一张牌。',
|
dcquanshou_info:'一名角色的回合开始时,若其手牌数不大于其体力上限,你可以令其选择一项:1.将手牌摸至体力上限,然后本回合使用【杀】的次数上限-1(至多摸五张);2.其本回合使用牌被抵消后,你摸一张牌。',
|
||||||
dcshexue:'设学',
|
dcshexue:'设学',
|
||||||
dcshexue_info:'①出牌阶段开始时,你可以将一张牌当做于上回合的角色于其出牌阶段内使用的最后一张基本牌或普通锦囊牌使用。②出牌阶段结束时,你可以令下回合的角色于其出牌阶段开始时可以将一张牌当做你于此阶段内使用的最后一张基本牌或普通锦囊牌使用。',
|
dcshexue_info:'①出牌阶段开始时,你可以将一张牌当做上回合的角色于其出牌阶段内使用的最后一张基本牌或普通锦囊牌使用。②出牌阶段结束时,你可以令下回合的角色于其出牌阶段开始时可以将一张牌当做你于此阶段内使用的最后一张基本牌或普通锦囊牌使用(一名角色因〖设学〗使用的牌均无距离和次数限制)。',
|
||||||
xizheng:'郤正',
|
xizheng:'郤正',
|
||||||
dcdanyi:'耽意',
|
dcdanyi:'耽意',
|
||||||
dcdanyi_info:'当你使用牌指定第一个目标后,若此牌的目标与你使用的上一张牌目标相同,你可以摸X张牌(X为此牌目标数)。',
|
dcdanyi_info:'当你使用牌指定第一个目标后,若此牌的目标与你使用的上一张牌目标相同,你可以摸X张牌(X为此牌目标数)。',
|
||||||
|
|
|
@ -811,7 +811,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
limited:true,
|
limited:true,
|
||||||
enable:"phaseUse",
|
enable:"phaseUse",
|
||||||
filter:function(event,player){;
|
filter:function(event,player){
|
||||||
return player.countCards('e')>0;
|
return player.countCards('e')>0;
|
||||||
},
|
},
|
||||||
filterTarget:lib.filter.notMe,
|
filterTarget:lib.filter.notMe,
|
||||||
|
|
|
@ -415,21 +415,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
subSkill:{
|
subSkill:{
|
||||||
effect:{
|
effect:{
|
||||||
audio:'qingbei',
|
audio:'qingbei',
|
||||||
trigger:{
|
trigger:{player:'useCardAfter'},
|
||||||
player:'useCardAfter',
|
|
||||||
},
|
|
||||||
forced:true,
|
|
||||||
charlotte:true,
|
charlotte:true,
|
||||||
onremove:true,
|
onremove:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
|
if(!lib.suit.includes(get.suit(event.card))) return false;
|
||||||
return player.getStorage('qingbei_effect').length;
|
return player.getStorage('qingbei_effect').length;
|
||||||
},
|
},
|
||||||
|
direct:true,
|
||||||
|
firstDo:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
player.draw(player.getStorage('qingbei_effect').length);
|
player.draw(player.getStorage('qingbei_effect').length);
|
||||||
},
|
},
|
||||||
mark:true,
|
mark:true,
|
||||||
intro:{
|
intro:{
|
||||||
content:(storage)=>`本轮内不能使用${get.translation(storage)}花色的牌,且使用牌后摸${get.cnNumber(storage.length)}张牌`,
|
content:(storage)=>`本轮内不能使用${get.translation(storage)}花色的牌,且使用一张有花色的牌后摸${get.cnNumber(storage.length)}张牌`,
|
||||||
},
|
},
|
||||||
mod:{
|
mod:{
|
||||||
cardEnabled:function(card,player){
|
cardEnabled:function(card,player){
|
||||||
|
@ -2210,7 +2210,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
next.set('filterButton',function(button){
|
next.set('filterButton',function(button){
|
||||||
if(button.link==0){
|
if(button.link==0){
|
||||||
return _status.event.bool1;
|
return _status.event.bool1;
|
||||||
};
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
next.set('bool1',lib.skill.xinbenxi.filterx(trigger,player));
|
next.set('bool1',lib.skill.xinbenxi.filterx(trigger,player));
|
||||||
|
@ -3151,7 +3151,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
for(var i=0;i<storage.length;i++){
|
for(var i=0;i<storage.length;i++){
|
||||||
str+='、';
|
str+='、';
|
||||||
str+=get.translation(storage[i]);
|
str+=get.translation(storage[i]);
|
||||||
};
|
}
|
||||||
str=str.slice(1);
|
str=str.slice(1);
|
||||||
str2+=('<br><li>已对'+str+'发动过〖残韵〗');
|
str2+=('<br><li>已对'+str+'发动过〖残韵〗');
|
||||||
}
|
}
|
||||||
|
@ -4169,7 +4169,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(!player.storage.juexiang_lie){
|
if(!player.storage.juexiang_lie){
|
||||||
event.finish();
|
event.finish();
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
player.storage.juexiang_lie--;
|
player.storage.juexiang_lie--;
|
||||||
}
|
}
|
||||||
player.chooseTarget(get.prompt2('juexiang_lie'),function(card,player,target){
|
player.chooseTarget(get.prompt2('juexiang_lie'),function(card,player,target){
|
||||||
|
@ -5409,8 +5409,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
ai:{
|
ai:{
|
||||||
skillTagFilter:function(player){
|
skillTagFilter:function(player){
|
||||||
if(!player.countCards('hes')||player.hasSkill('taoluan3')) return false;
|
if(!player.countCards('hes')||player.hasSkill('taoluan3')) return false;
|
||||||
if(!player.storage.taoluan.contains('tao')){}
|
if(!player.storage.taoluan.contains('tao')){ /* empty */ }
|
||||||
else if(player.isDying()&&!player.storage.taoluan.contains('jiu')){}
|
else if(player.isDying()&&!player.storage.taoluan.contains('jiu')){ /* empty */ }
|
||||||
else return false;
|
else return false;
|
||||||
},
|
},
|
||||||
order:4,
|
order:4,
|
||||||
|
@ -6473,7 +6473,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return current!=player;
|
return current!=player;
|
||||||
}).sortBySeat(player);
|
}).sortBySeat(player);
|
||||||
for(var target of players){
|
for(var target of players){
|
||||||
if(get.damageEffect(target,player,target,'fire')>=0){num=0;continue};
|
if(get.damageEffect(target,player,target,'fire')>=0){num=0;continue}
|
||||||
var shao=false;
|
var shao=false;
|
||||||
num++;
|
num++;
|
||||||
if(target.countCards('he',function(card){
|
if(target.countCards('he',function(card){
|
||||||
|
@ -8766,10 +8766,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
switch(button.link[2]){
|
switch(button.link[2]){
|
||||||
case 'tao':return 5;
|
case 'tao':return 5;
|
||||||
case 'jiu':return 3.01;
|
case 'jiu':return 3.01;
|
||||||
case 'shan':return 3.01;
|
|
||||||
case 'sha':
|
case 'sha':
|
||||||
if(button.link[3]=='fire') return 2.95;
|
if(button.link[3]=='fire') return 2.95;
|
||||||
else if(button.link[3]=='fire') return 2.92;
|
else if(button.link[3]=='thunder') return 2.92;
|
||||||
else return 2.9;
|
else return 2.9;
|
||||||
case 'shan':return 1;
|
case 'shan':return 1;
|
||||||
}
|
}
|
||||||
|
@ -14696,7 +14695,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
cuguo_info:'锁定技。当你于一回合使用牌首次被抵消后,你弃置一张牌,视为对此牌的目标角色使用一张该被抵消的牌。此牌结算结束后,若此牌被抵消,你失去1点体力。',
|
cuguo_info:'锁定技。当你于一回合使用牌首次被抵消后,你弃置一张牌,视为对此牌的目标角色使用一张该被抵消的牌。此牌结算结束后,若此牌被抵消,你失去1点体力。',
|
||||||
chenshi:'陈式',
|
chenshi:'陈式',
|
||||||
qingbei:'擎北',
|
qingbei:'擎北',
|
||||||
qingbei_info:'一轮游戏开始时,你可以选择任意种花色,你不能于本轮内使用这些花色的牌。然后当你于本轮使用牌结算结束后,你摸等同于你上一次〖擎北〗选择过的花色数的牌。',
|
qingbei_info:'一轮游戏开始时,你可以选择任意种花色,你不能于本轮内使用这些花色的牌。然后当你于本轮使用一张有花色的牌结算结束后,你摸等同于你上一次〖擎北〗选择过的花色数的牌。',
|
||||||
feiyao:'费曜',
|
feiyao:'费曜',
|
||||||
zhenfeng:'镇锋',
|
zhenfeng:'镇锋',
|
||||||
zhenfeng_info:'每回合限一次。当其他角色于其回合内使用牌时,若其手牌数不大于其体力值,你可以猜测其手牌中与此牌类别相同的牌数。若你猜对,你摸X张牌并视为对其使用一张【杀】(X为你连续猜对的次数且至多为5);若你猜错且差值大于1,其视为对你使用一张【杀】。',
|
zhenfeng_info:'每回合限一次。当其他角色于其回合内使用牌时,若其手牌数不大于其体力值,你可以猜测其手牌中与此牌类别相同的牌数。若你猜对,你摸X张牌并视为对其使用一张【杀】(X为你连续猜对的次数且至多为5);若你猜错且差值大于1,其视为对你使用一张【杀】。',
|
||||||
|
|
|
@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
name:'yingbian',
|
name:'yingbian',
|
||||||
connect:true,
|
connect:true,
|
||||||
character:{
|
character:{
|
||||||
|
chengjichengcui:['male','jin',6,['oltousui','olchuming']],
|
||||||
wangxiang:['male','jin',3,['bingxin']],
|
wangxiang:['male','jin',3,['bingxin']],
|
||||||
jin_jiachong:['male','jin',3,['xiongshu','jianhui']],
|
jin_jiachong:['male','jin',3,['xiongshu','jianhui']],
|
||||||
xuangongzhu:['female','jin',3,['gaoling','qimei','ybzhuiji'],['hiddenSkill']],
|
xuangongzhu:['female','jin',3,['gaoling','qimei','ybzhuiji'],['hiddenSkill']],
|
||||||
|
@ -37,6 +38,151 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
|
//二成
|
||||||
|
oltousui:{
|
||||||
|
audio:2,
|
||||||
|
enable:'chooseToUse',
|
||||||
|
viewAsFilter:function(player){
|
||||||
|
return player.countCards('he');
|
||||||
|
},
|
||||||
|
viewAs:{
|
||||||
|
name:'sha',
|
||||||
|
suit:'none',
|
||||||
|
number:null,
|
||||||
|
isCard:true,
|
||||||
|
},
|
||||||
|
filterCard:true,
|
||||||
|
selectCard:[1,Infinity],
|
||||||
|
position:'he',
|
||||||
|
check:function(card){
|
||||||
|
const player=get.player();
|
||||||
|
return 4.5+(player.hasSkill('olchuming')?1:0)-1.5*ui.selected.cards.length-get.value(card);
|
||||||
|
},
|
||||||
|
popname:true,
|
||||||
|
ignoreMod:true,
|
||||||
|
precontent:function*(event,map){
|
||||||
|
var player=map.player;
|
||||||
|
var evt=event.getParent();
|
||||||
|
if(evt.dialog&&typeof evt.dialog=='object') evt.dialog.close();
|
||||||
|
player.logSkill('oltousui');
|
||||||
|
delete event.result.skill;
|
||||||
|
var cards=event.result.cards;
|
||||||
|
player.loseToDiscardpile(cards,ui.cardPile,false,'blank').log=false;
|
||||||
|
var shownCards=cards.filter(i=>get.position(i)=='e'),handcardsLength=cards.length-shownCards.length;
|
||||||
|
if(shownCards.length){
|
||||||
|
player.$throw(shownCards,null);
|
||||||
|
game.log(player,'将',shownCards,'置于了牌堆底');
|
||||||
|
}
|
||||||
|
if(handcardsLength>0){
|
||||||
|
player.$throw(handcardsLength,null);
|
||||||
|
game.log(player,'将',get.cnNumber(handcardsLength),'张牌置于了牌堆底');
|
||||||
|
}
|
||||||
|
game.delayex();
|
||||||
|
var viewAs=new lib.element.VCard({name:event.result.card.name,isCard:true});
|
||||||
|
event.result.card=viewAs;
|
||||||
|
event.result.cards=[];
|
||||||
|
event.result._apply_args={
|
||||||
|
shanReq:cards.length,
|
||||||
|
oncard:()=>{
|
||||||
|
var evt=get.event();
|
||||||
|
for(var target of evt.targets){
|
||||||
|
var id=target.playerid;
|
||||||
|
var map=evt.customArgs;
|
||||||
|
if(!map[id]) map[id]={};
|
||||||
|
map[id].shanRequired=evt.shanReq;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
order:function(item,player){
|
||||||
|
return get.order({name:'sha'})+0.1;
|
||||||
|
},
|
||||||
|
result:{player:1},
|
||||||
|
keepdu:true,
|
||||||
|
respondSha:true,
|
||||||
|
skillTagFilter:(player,tag,arg)=>{
|
||||||
|
if(tag=='respondSha'&&arg!='use') return false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
olchuming:{
|
||||||
|
audio:2,
|
||||||
|
trigger:{
|
||||||
|
source:'damageBegin1',
|
||||||
|
player:'damageBegin3',
|
||||||
|
},
|
||||||
|
filter:function(event,player){
|
||||||
|
return event.source!=event.player;
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
content:function*(event,map){
|
||||||
|
var player=map.player,trigger=map.trigger;
|
||||||
|
if(!trigger.card||!trigger.cards.length){
|
||||||
|
trigger.num++;
|
||||||
|
event.finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
var target=trigger[trigger.source==player?'player':'source'];
|
||||||
|
trigger._olchuming=true;
|
||||||
|
target.addTempSkill('olchuming_effect');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
effect:{
|
||||||
|
player:function(card,player,target){
|
||||||
|
if(!get.tag(card,'damage')) return;
|
||||||
|
if(!lib.card[card.name]||!card.cards||!card.cards.length) return [1,0,1,-1];
|
||||||
|
return [1,-1];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
subSkill:{
|
||||||
|
effect:{
|
||||||
|
charlotte:true,
|
||||||
|
trigger:{global:'phaseEnd'},
|
||||||
|
forced:true,
|
||||||
|
popup:false,
|
||||||
|
content:function*(event,map){
|
||||||
|
var player=map.player;
|
||||||
|
var mapx={};
|
||||||
|
var history=player.getHistory('damage').concat(player.getHistory('sourceDamage'));
|
||||||
|
history.forEach(evt=>{
|
||||||
|
if(!evt._olchuming) return;
|
||||||
|
var target=evt[evt.source==player?'player':'source'];
|
||||||
|
if(!target.isIn()) return;
|
||||||
|
if(!mapx[target.playerid]) mapx[target.playerid]=[];
|
||||||
|
mapx[target.playerid].addArray(evt.cards.filterInD('d'));
|
||||||
|
});
|
||||||
|
var entries=Object.entries(mapx).map(entry=>{
|
||||||
|
return [(_status.connectMode?lib.playerOL:game.playerMap)[entry[0]],entry[1]];
|
||||||
|
});
|
||||||
|
if(!entries.length){
|
||||||
|
event.finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
player.logSkill('olchuming_effect',entries.map(i=>i[0]));
|
||||||
|
entries.sort((a,b)=>lib.sort.seat(a[0],b[0]));
|
||||||
|
for(var entry of entries){
|
||||||
|
var current=entry[0],cards=entry[1];
|
||||||
|
var list=['jiedao','guohe'].filter(i=>player.canUse(new lib.element.VCard({name:i,cards:cards}),current,false));
|
||||||
|
if(!list.length) return;
|
||||||
|
var result=({});
|
||||||
|
if(list.length==1) result={bool:true,links:[['','',list[0]]]};
|
||||||
|
else result=yield player.chooseButton([`畜鸣:请选择要对${get.translation(current)}使用的牌`,[list,'vcard']],true).set('ai',button=>{
|
||||||
|
var player=get.player();
|
||||||
|
return get.effect(get.event('currentTarget'),{name:button.link[2]},player,player);
|
||||||
|
}).set('currentTarget',current);
|
||||||
|
if(result.bool){
|
||||||
|
var card=get.autoViewAs({name:result.links[0][2]},cards);
|
||||||
|
if(player.canUse(card,current,false)) player.useCard(card,cards,current,false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
bingxin:{
|
bingxin:{
|
||||||
audio:2,
|
audio:2,
|
||||||
enable:'chooseToUse',
|
enable:'chooseToUse',
|
||||||
|
@ -295,7 +441,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
logTarget:'target',
|
|
||||||
marktext:'嫕',
|
marktext:'嫕',
|
||||||
intro:{
|
intro:{
|
||||||
markcount:'expansion',
|
markcount:'expansion',
|
||||||
|
@ -531,7 +676,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(trigger.name=='lose'){
|
if(trigger.name=='lose'){
|
||||||
for(var i in trigger.gaintag_map){
|
for(var i in trigger.gaintag_map){
|
||||||
if(trigger.gaintag_map[i].contains('huaiyuanx')) num++;
|
if(trigger.gaintag_map[i].contains('huaiyuanx')) num++;
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
else player.getHistory('lose',function(evt){
|
else player.getHistory('lose',function(evt){
|
||||||
if(trigger!=evt.getParent()) return false;
|
if(trigger!=evt.getParent()) return false;
|
||||||
|
@ -2671,7 +2816,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var type=get.type(card);
|
var type=get.type(card);
|
||||||
return (type=='basic'||type=='trick');
|
return (type=='basic'||type=='trick');
|
||||||
},
|
},
|
||||||
log:false,
|
|
||||||
visible:true,
|
visible:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target!=player&&target.hasZhuSkill('ruilve',player)&&!target.hasSkill('ruilve3');
|
return target!=player&&target.hasZhuSkill('ruilve',player)&&!target.hasSkill('ruilve3');
|
||||||
|
@ -3588,9 +3732,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
xuangongzhu:'高陵宣公主(?—?)司马氏,晋宣帝司马懿第二女。司马氏下嫁杜预。其侄司马炎登基时,司马氏已经去世。泰始年间(265年—274年)追赠高陵公主。',
|
xuangongzhu:'高陵宣公主(?—?)司马氏,晋宣帝司马懿第二女。司马氏下嫁杜预。其侄司马炎登基时,司马氏已经去世。泰始年间(265年—274年)追赠高陵公主。',
|
||||||
jin_guohuai:'郭槐(237年-296年),字媛韶,太原阳曲(今山西太原)人,魏晋权臣贾充的妻子。父亲是曹魏城阳郡太守郭配,伯父是曹魏名将郭淮。出身太原郭氏。二十一岁时,嫁贾充作继室,生二女二子,长女贾南风,次女贾午,一子贾黎民。贾南风是西晋惠帝司马衷皇后,干预国政,专权误国,直接导致“八王之乱”和西晋亡国。',
|
jin_guohuai:'郭槐(237年-296年),字媛韶,太原阳曲(今山西太原)人,魏晋权臣贾充的妻子。父亲是曹魏城阳郡太守郭配,伯父是曹魏名将郭淮。出身太原郭氏。二十一岁时,嫁贾充作继室,生二女二子,长女贾南风,次女贾午,一子贾黎民。贾南风是西晋惠帝司马衷皇后,干预国政,专权误国,直接导致“八王之乱”和西晋亡国。',
|
||||||
wangxiang:'王祥(184年,一作180年-268年4月30日),字休徵。琅邪临沂(今山东省临沂市西孝友村)人。三国曹魏及西晋时大臣。王祥于东汉末隐居二十年,在曹魏,先后任县令、大司农、司空、太尉等职,封爵睢陵侯。西晋建立,拜太保,进封睢陵公。泰始四年四月戊戌日(268年4月30日)去世,年八十五(一作八十九),谥号“元”。有《训子孙遗令》一文传世。王祥侍奉后母朱氏极孝,为传统文化中二十四孝之一“卧冰求鲤”的主人翁。',
|
wangxiang:'王祥(184年,一作180年-268年4月30日),字休徵。琅邪临沂(今山东省临沂市西孝友村)人。三国曹魏及西晋时大臣。王祥于东汉末隐居二十年,在曹魏,先后任县令、大司农、司空、太尉等职,封爵睢陵侯。西晋建立,拜太保,进封睢陵公。泰始四年四月戊戌日(268年4月30日)去世,年八十五(一作八十九),谥号“元”。有《训子孙遗令》一文传世。王祥侍奉后母朱氏极孝,为传统文化中二十四孝之一“卧冰求鲤”的主人翁。',
|
||||||
|
chengjichengcui:'成倅、成济(?~260年6月21日),扬州丹阳(今安徽省宣城市)人。三国时期曹魏将领。依附于司马氏家族,得到司马昭的心腹贾充指使,刺死魏帝曹髦。司马昭为平息众怒,将成倅、成济兄弟二人杀死。据《魏氏春秋》记载,成济兄弟不服罪,光着身子跑到屋顶,大骂司马昭,被军士从下乱箭射杀。',
|
||||||
},
|
},
|
||||||
characterTitle:{},
|
characterTitle:{},
|
||||||
perfectPair:{},
|
|
||||||
characterFilter:{},
|
characterFilter:{},
|
||||||
dynamicTranslate:{},
|
dynamicTranslate:{},
|
||||||
perfectPair:{
|
perfectPair:{
|
||||||
|
@ -3805,6 +3949,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
qiaoyan_info:'锁定技,当你于回合外受到其他角色造成的伤害时,若你:有“珠”,则你令伤害来源获得“珠”;没有“珠”,则你防止此伤害,然后摸一张牌,并将一张牌正面朝上置于武将牌上,称为“珠”。',
|
qiaoyan_info:'锁定技,当你于回合外受到其他角色造成的伤害时,若你:有“珠”,则你令伤害来源获得“珠”;没有“珠”,则你防止此伤害,然后摸一张牌,并将一张牌正面朝上置于武将牌上,称为“珠”。',
|
||||||
xianzhu:'献珠',
|
xianzhu:'献珠',
|
||||||
xianzhu_info:'锁定技,出牌阶段开始时,你令一名角色A获得“珠”。若A不为你自己,则你选择A攻击范围内的一名角色B,视为A对B使用一张【杀】。',
|
xianzhu_info:'锁定技,出牌阶段开始时,你令一名角色A获得“珠”。若A不为你自己,则你选择A攻击范围内的一名角色B,视为A对B使用一张【杀】。',
|
||||||
|
chengjichengcui:'成济成倅',
|
||||||
|
oltousui:'透髓',
|
||||||
|
oltousui_info:'你可以将任意张牌置于牌堆底,视为使用一张需使用等量张【闪】抵消的【杀】。',
|
||||||
|
olchuming:'畜鸣',
|
||||||
|
olchuming_info:'锁定技。当你对其他角色造成伤害时,或当你受到其他角色造成的伤害时,若此伤害的渠道不为牌或没有对应的实体牌,此伤害+1,否则其于本回合结束时将所有以此法造成伤害的牌当【借刀杀人】或【过河拆桥】对你使用。',
|
||||||
|
|
||||||
yingbian_pack1:'文德武备·理',
|
yingbian_pack1:'文德武备·理',
|
||||||
yingbian_pack2:'文德武备·备',
|
yingbian_pack2:'文德武备·备',
|
||||||
|
|
418
game/game.js
418
game/game.js
|
@ -400,6 +400,52 @@
|
||||||
return method;
|
return method;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handler:{
|
||||||
|
_handlers:{},
|
||||||
|
getHandler:function(name,type){
|
||||||
|
if(!type)type = this.getDefaultHandlerType(name);
|
||||||
|
if(!this._handlers[name])return null;
|
||||||
|
if(!this._handlers[name][type])return null;
|
||||||
|
return this._handlers[name][type];
|
||||||
|
},
|
||||||
|
ensureHandlerList:function(name,type){
|
||||||
|
if(!type)type = this.getDefaultHandlerType(name);
|
||||||
|
if(!this._handlers[name])this._handlers[name] = {};
|
||||||
|
if(!this._handlers[name][type])this._handlers[name][type] = [];
|
||||||
|
return this._handlers[name][type];
|
||||||
|
},
|
||||||
|
removeHandler:function(name,type,func){
|
||||||
|
var list = this.ensureHandlerList(name,type);
|
||||||
|
list.remove(func);
|
||||||
|
if(list.length == 0){
|
||||||
|
delete this._handlers[name][type];
|
||||||
|
if(Object.keys(this._handlers[name]) == 0){
|
||||||
|
delete this._handlers[name];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pushHandler:function(name,type){
|
||||||
|
let functions = (typeof type == 'string' ? arguments.slice(2):arguments.slice(1));
|
||||||
|
type = (typeof type == 'string'?type:this.getDefaultHandlerType(name));
|
||||||
|
this.ensureHandlerList(name,type).addArray(functions);
|
||||||
|
},
|
||||||
|
getDefaultHandlerType:(name)=>{
|
||||||
|
return `on${name[0].toUpperCase()}${name.slice(1)}`;
|
||||||
|
},
|
||||||
|
addHandlerToEvent:function(event){
|
||||||
|
if(typeof event.name == 'string'){
|
||||||
|
let handlerMap = this._handlers[event.name];
|
||||||
|
if(handlerMap){
|
||||||
|
Object.keys(handlerMap).forEach((key)=>{
|
||||||
|
let list = handlerMap[key];
|
||||||
|
if(list){
|
||||||
|
list.forEach(handler=>event.pushHandler(key,handler));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
objectURL:new Map(),
|
objectURL:new Map(),
|
||||||
hookmap:{},
|
hookmap:{},
|
||||||
imported:{},
|
imported:{},
|
||||||
|
@ -4982,6 +5028,8 @@
|
||||||
map.connect_limit_zhu.hide();
|
map.connect_limit_zhu.hide();
|
||||||
map.connect_enhance_zhu.hide();
|
map.connect_enhance_zhu.hide();
|
||||||
map.connect_double_nei.hide();
|
map.connect_double_nei.hide();
|
||||||
|
map.connect_enable_commoner.hide();
|
||||||
|
map.connect_enable_year_limit.show();
|
||||||
map.connect_zhong_card.show();
|
map.connect_zhong_card.show();
|
||||||
map.connect_special_identity.hide();
|
map.connect_special_identity.hide();
|
||||||
map.connect_double_character.show();
|
map.connect_double_character.show();
|
||||||
|
@ -4992,6 +5040,8 @@
|
||||||
map.connect_limit_zhu.hide();
|
map.connect_limit_zhu.hide();
|
||||||
map.connect_enhance_zhu.hide();
|
map.connect_enhance_zhu.hide();
|
||||||
map.connect_double_nei.hide();
|
map.connect_double_nei.hide();
|
||||||
|
map.connect_enable_commoner.hide();
|
||||||
|
map.connect_enable_year_limit.show();
|
||||||
map.connect_zhong_card.hide();
|
map.connect_zhong_card.hide();
|
||||||
map.connect_special_identity.hide();
|
map.connect_special_identity.hide();
|
||||||
}
|
}
|
||||||
|
@ -5000,6 +5050,8 @@
|
||||||
map.connect_limit_zhu.hide();
|
map.connect_limit_zhu.hide();
|
||||||
map.connect_enhance_zhu.hide();
|
map.connect_enhance_zhu.hide();
|
||||||
map.connect_double_nei.hide();
|
map.connect_double_nei.hide();
|
||||||
|
map.connect_enable_commoner.hide();
|
||||||
|
map.connect_enable_year_limit.hide();
|
||||||
map.connect_zhong_card.hide();
|
map.connect_zhong_card.hide();
|
||||||
map.connect_special_identity.hide();
|
map.connect_special_identity.hide();
|
||||||
map.connect_double_character.hide();
|
map.connect_double_character.hide();
|
||||||
|
@ -5009,12 +5061,9 @@
|
||||||
map.connect_player_number.show();
|
map.connect_player_number.show();
|
||||||
map.connect_limit_zhu.show();
|
map.connect_limit_zhu.show();
|
||||||
map.connect_enhance_zhu.show();
|
map.connect_enhance_zhu.show();
|
||||||
if(config.connect_player_number!='2'){
|
map.connect_double_nei[config.connect_player_number!='2'&&!config.connect_enable_commoner?'show':'hide']();
|
||||||
map.connect_double_nei.show();
|
map.connect_enable_commoner[config.connect_player_number!='2'&&!config.connect_double_nei?'show':'hide']();
|
||||||
}
|
map.connect_enable_year_limit.show();
|
||||||
else{
|
|
||||||
map.connect_double_nei.hide();
|
|
||||||
}
|
|
||||||
map.connect_zhong_card.hide();
|
map.connect_zhong_card.hide();
|
||||||
|
|
||||||
if(config.connect_player_number=='8'){
|
if(config.connect_player_number=='8'){
|
||||||
|
@ -5074,6 +5123,15 @@
|
||||||
return lib.mode.identity.config.double_nei.intro;
|
return lib.mode.identity.config.double_nei.intro;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
connect_enable_commoner:{
|
||||||
|
name:'启用平民',
|
||||||
|
init:false,
|
||||||
|
restart:true,
|
||||||
|
frequent:false,
|
||||||
|
get intro(){
|
||||||
|
return lib.mode.identity.config.enable_commoner.intro;
|
||||||
|
}
|
||||||
|
},
|
||||||
connect_double_character:{
|
connect_double_character:{
|
||||||
name:'双将模式',
|
name:'双将模式',
|
||||||
init:false,
|
init:false,
|
||||||
|
@ -5093,6 +5151,15 @@
|
||||||
frequent:true,
|
frequent:true,
|
||||||
intro:'开启后游戏中将增加军师、大将、贼首三个身份'
|
intro:'开启后游戏中将增加军师、大将、贼首三个身份'
|
||||||
},
|
},
|
||||||
|
connect_enable_year_limit:{
|
||||||
|
name:'启用年机制',
|
||||||
|
init:false,
|
||||||
|
restart:true,
|
||||||
|
frequent:false,
|
||||||
|
get intro(){
|
||||||
|
return lib.mode.identity.config.enable_year_limit.intro;
|
||||||
|
}
|
||||||
|
},
|
||||||
connect_round_one_use_fury:{
|
connect_round_one_use_fury:{
|
||||||
name:'开启首轮强化卡牌',
|
name:'开启首轮强化卡牌',
|
||||||
init:false,
|
init:false,
|
||||||
|
@ -5137,6 +5204,9 @@
|
||||||
map.choice_zhong.hide();
|
map.choice_zhong.hide();
|
||||||
map.choice_nei.hide();
|
map.choice_nei.hide();
|
||||||
map.choice_fan.hide();
|
map.choice_fan.hide();
|
||||||
|
map.enable_commoner.hide();
|
||||||
|
map.choice_commoner.hide();
|
||||||
|
map.enable_year_limit.show();
|
||||||
map.ban_identity.hide();
|
map.ban_identity.hide();
|
||||||
map.ban_identity2.hide();
|
map.ban_identity2.hide();
|
||||||
map.ban_identity3.hide();
|
map.ban_identity3.hide();
|
||||||
|
@ -5172,6 +5242,9 @@
|
||||||
map.choice_zhong.show();
|
map.choice_zhong.show();
|
||||||
map.choice_nei.show();
|
map.choice_nei.show();
|
||||||
map.choice_fan.show();
|
map.choice_fan.show();
|
||||||
|
map.enable_commoner.hide();
|
||||||
|
map.choice_commoner.hide();
|
||||||
|
map.enable_year_limit.show();
|
||||||
map.ban_identity.show();
|
map.ban_identity.show();
|
||||||
if(config.ban_identity=='off'){
|
if(config.ban_identity=='off'){
|
||||||
map.ban_identity2.hide();
|
map.ban_identity2.hide();
|
||||||
|
@ -5210,6 +5283,9 @@
|
||||||
map.choice_zhong.hide();
|
map.choice_zhong.hide();
|
||||||
map.choice_nei.hide();
|
map.choice_nei.hide();
|
||||||
map.choice_fan.hide();
|
map.choice_fan.hide();
|
||||||
|
map.enable_commoner.hide();
|
||||||
|
map.choice_commoner.hide();
|
||||||
|
map.enable_year_limit.hide();
|
||||||
map.ban_identity.hide();
|
map.ban_identity.hide();
|
||||||
map.ban_identity2.hide();
|
map.ban_identity2.hide();
|
||||||
map.ban_identity3.hide();
|
map.ban_identity3.hide();
|
||||||
|
@ -5229,17 +5305,15 @@
|
||||||
map.player_number.show();
|
map.player_number.show();
|
||||||
map.enhance_zhu.show();
|
map.enhance_zhu.show();
|
||||||
map.auto_identity.show();
|
map.auto_identity.show();
|
||||||
if(config.player_number!='2'){
|
map.double_nei[config.player_number!='2'&&!config.enable_commoner?'show':'hide']();
|
||||||
map.double_nei.show();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
map.double_nei.hide();
|
|
||||||
}
|
|
||||||
map.choice_zhu.show();
|
map.choice_zhu.show();
|
||||||
map.limit_zhu.show();
|
map.limit_zhu.show();
|
||||||
map.choice_zhong.show();
|
map.choice_zhong.show();
|
||||||
map.choice_nei.show();
|
map.choice_nei.show();
|
||||||
map.choice_fan.show();
|
map.choice_fan.show();
|
||||||
|
map.enable_commoner[config.player_number!='2'&&!config.double_nei?'show':'hide']();
|
||||||
|
map.choice_commoner[config.enable_commoner?'show':'hide']();
|
||||||
|
map.enable_year_limit.show();
|
||||||
map.ban_identity.show();
|
map.ban_identity.show();
|
||||||
if(config.ban_identity=='off'){
|
if(config.ban_identity=='off'){
|
||||||
map.ban_identity2.hide();
|
map.ban_identity2.hide();
|
||||||
|
@ -5305,7 +5379,7 @@
|
||||||
init:false,
|
init:false,
|
||||||
restart:true,
|
restart:true,
|
||||||
frequent:true,
|
frequent:true,
|
||||||
intro:'若游戏人数不大于8,则开启后游戏中将有两个内奸(内奸胜利条件仍为主内1v1时击杀主公)'
|
intro:'若游戏人数不大于9,则开启后游戏中将有两个内奸(内奸胜利条件仍为主内1v1时击杀主公)'
|
||||||
},
|
},
|
||||||
choose_group:{
|
choose_group:{
|
||||||
name:'神武将选择势力',
|
name:'神武将选择势力',
|
||||||
|
@ -5632,6 +5706,33 @@
|
||||||
'10':'十',
|
'10':'十',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
enable_commoner:{
|
||||||
|
name:'启用平民',
|
||||||
|
init:false,
|
||||||
|
restart:true,
|
||||||
|
frequent:false,
|
||||||
|
intro:'开启后游戏中将有一个平民(身份)加入游戏。<br>具体规则请查看帮助。',
|
||||||
|
},
|
||||||
|
choice_commoner:{
|
||||||
|
name:'平民候选武将数',
|
||||||
|
init:'4',
|
||||||
|
restart:true,
|
||||||
|
item:{
|
||||||
|
'3':'三',
|
||||||
|
'4':'四',
|
||||||
|
'5':'五',
|
||||||
|
'6':'六',
|
||||||
|
'8':'八',
|
||||||
|
'10':'十',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
enable_year_limit:{
|
||||||
|
name:'启用年机制',
|
||||||
|
init:false,
|
||||||
|
restart:true,
|
||||||
|
frequent:false,
|
||||||
|
intro:'开启后将会加入年机制。<br>年机制的具体规则请查看帮助。',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
guozhan:{
|
guozhan:{
|
||||||
|
@ -6456,7 +6557,7 @@
|
||||||
else{
|
else{
|
||||||
lib.codeMirrorReady(node,editor);
|
lib.codeMirrorReady(node,editor);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
reset_character_three:{
|
reset_character_three:{
|
||||||
|
@ -6548,7 +6649,7 @@
|
||||||
else{
|
else{
|
||||||
lib.codeMirrorReady(node,editor);
|
lib.codeMirrorReady(node,editor);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
reset_character_four:{
|
reset_character_four:{
|
||||||
|
@ -7002,7 +7103,7 @@
|
||||||
else{
|
else{
|
||||||
lib.codeMirrorReady(node,editor);
|
lib.codeMirrorReady(node,editor);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
reset_character:{
|
reset_character:{
|
||||||
|
@ -7639,9 +7740,9 @@
|
||||||
}else if(newMessage.includes("Invalid regular expression flags")){
|
}else if(newMessage.includes("Invalid regular expression flags")){
|
||||||
newMessage="无效的正则表达式的标记";
|
newMessage="无效的正则表达式的标记";
|
||||||
}else if(newMessage.includes("missing ) after argument list")){
|
}else if(newMessage.includes("missing ) after argument list")){
|
||||||
newMessage="参数列表后面缺少 \')\' (丢失运算符或者转义字符等)";
|
newMessage="参数列表后面缺少 ')' (丢失运算符或者转义字符等)";
|
||||||
}else if(newMessage.includes("Invalid shorthand property initializer")){
|
}else if(newMessage.includes("Invalid shorthand property initializer")){
|
||||||
newMessage="在定义一个{}对象时,应该使用\':\'而不是\'=\'";
|
newMessage="在定义一个{}对象时,应该使用':'而不是'='";
|
||||||
}else if(newMessage.includes("Missing initializer in const declaration")){
|
}else if(newMessage.includes("Missing initializer in const declaration")){
|
||||||
newMessage="在使用const定义一个对象时,必须指定初始值";
|
newMessage="在使用const定义一个对象时,必须指定初始值";
|
||||||
}else if(newMessage.includes("Unexpected number")||newMessage.includes("Unexpected string")){
|
}else if(newMessage.includes("Unexpected number")||newMessage.includes("Unexpected string")){
|
||||||
|
@ -7668,11 +7769,11 @@
|
||||||
}else if(newMessage.includes("Cannot read property")){
|
}else if(newMessage.includes("Cannot read property")){
|
||||||
messageName=newMessage.replace('TypeError: Cannot read property ', '').replace(' of null', '').replace(' of undefined', '');
|
messageName=newMessage.replace('TypeError: Cannot read property ', '').replace(' of null', '').replace(' of undefined', '');
|
||||||
let ofName=newMessage.slice(newMessage.indexOf(" of ")+4);
|
let ofName=newMessage.slice(newMessage.indexOf(" of ")+4);
|
||||||
newMessage="无法读取\'"+ofName+"\'的属性值"+messageName;
|
newMessage="无法读取'"+ofName+"'的属性值"+messageName;
|
||||||
}else if(newMessage.includes("Cannot read properties")){
|
}else if(newMessage.includes("Cannot read properties")){
|
||||||
messageName=newMessage.slice(newMessage.indexOf("reading '")+9,-2);
|
messageName=newMessage.slice(newMessage.indexOf("reading '")+9,-2);
|
||||||
let ofName=newMessage.slice(newMessage.indexOf(" of ")+4,newMessage.indexOf("(")-1);
|
let ofName=newMessage.slice(newMessage.indexOf(" of ")+4,newMessage.indexOf("(")-1);
|
||||||
newMessage="无法读取\'"+ofName+"\'的属性值"+messageName;
|
newMessage="无法读取'"+ofName+"'的属性值"+messageName;
|
||||||
}else if(newMessage.includes("Property description must be an object")){
|
}else if(newMessage.includes("Property description must be an object")){
|
||||||
messageName=newMessage.replace('TypeError: Property description must be an object: ', '');
|
messageName=newMessage.replace('TypeError: Property description must be an object: ', '');
|
||||||
newMessage=messageName+"是非对象类型的值";
|
newMessage=messageName+"是非对象类型的值";
|
||||||
|
@ -7685,7 +7786,7 @@
|
||||||
messageName=newMessage.slice(newMessage.indexOf('\'')+1);
|
messageName=newMessage.slice(newMessage.indexOf('\'')+1);
|
||||||
messageName=messageName.slice(0,messageName.indexOf('\''));
|
messageName=messageName.slice(0,messageName.indexOf('\''));
|
||||||
let obj=newMessage.slice(newMessage.indexOf(messageName)+16);
|
let obj=newMessage.slice(newMessage.indexOf(messageName)+16);
|
||||||
newMessage=obj+"不能添加或修改\'"+messageName+"\'属性,任何 Primitive 值都不允许有property";
|
newMessage=obj+"不能添加或修改'"+messageName+"'属性,任何 Primitive 值都不允许有property";
|
||||||
}else if(newMessage.includes("Can't add property")&&newMessage.includes("is not extensible")){
|
}else if(newMessage.includes("Can't add property")&&newMessage.includes("is not extensible")){
|
||||||
newMessage="对象不可添加属性(不可扩展)";
|
newMessage="对象不可添加属性(不可扩展)";
|
||||||
}else if(newMessage.includes("Cannot redefine property")){
|
}else if(newMessage.includes("Cannot redefine property")){
|
||||||
|
@ -7755,10 +7856,10 @@
|
||||||
code=node.editor.getValue();
|
code=node.editor.getValue();
|
||||||
}else if(node.textarea){
|
}else if(node.textarea){
|
||||||
code=node.textarea.value;
|
code=node.textarea.value;
|
||||||
};
|
}
|
||||||
//动态绑定文本
|
//动态绑定文本
|
||||||
if(code.length&&change.origin=="+input" &&
|
if(code.length&&change.origin=="+input" &&
|
||||||
/{|}|\s|=|;|:|,|,|。|?|!|\!|\?|&|#|%|@|‘|’|;/.test(change.text[0])==false&&
|
/{|}|\s|=|;|:|,|,|。|?|!|!|\?|&|#|%|@|‘|’|;/.test(change.text[0])==false&&
|
||||||
change.text.length==1) {
|
change.text.length==1) {
|
||||||
//输入了代码,并且不包括空格,{},=, ; , : , 逗号等,才可以自动提示
|
//输入了代码,并且不包括空格,{},=, ; , : , 逗号等,才可以自动提示
|
||||||
node.editor.showHint();
|
node.editor.showHint();
|
||||||
|
@ -7887,7 +7988,7 @@
|
||||||
}
|
}
|
||||||
function javascriptHint(editor,options){
|
function javascriptHint(editor,options){
|
||||||
return scriptHint(editor,javascriptKeywords,function(e,cur){return e.getTokenAt(cur);},options);
|
return scriptHint(editor,javascriptKeywords,function(e,cur){return e.getTokenAt(cur);},options);
|
||||||
};
|
}
|
||||||
//覆盖原本的javascript提示
|
//覆盖原本的javascript提示
|
||||||
CodeMirror.registerHelper("hint","javascript",javascriptHint);
|
CodeMirror.registerHelper("hint","javascript",javascriptHint);
|
||||||
const stringProps=Object.getOwnPropertyNames(String.prototype);
|
const stringProps=Object.getOwnPropertyNames(String.prototype);
|
||||||
|
@ -8081,7 +8182,7 @@
|
||||||
run:function(time){
|
run:function(time){
|
||||||
lib.status.time=time;
|
lib.status.time=time;
|
||||||
for(var i=0;i<lib.updates.length;i++){
|
for(var i=0;i<lib.updates.length;i++){
|
||||||
if(!lib.updates[i].hasOwnProperty('_time')){
|
if(!Object.prototype.hasOwnProperty.call(lib.updates[i], '_time')){
|
||||||
lib.updates[i]._time=time;
|
lib.updates[i]._time=time;
|
||||||
}
|
}
|
||||||
if(lib.updates[i](time-lib.updates[i]._time-lib.status.delayed)===false){
|
if(lib.updates[i](time-lib.updates[i]._time-lib.status.delayed)===false){
|
||||||
|
@ -8951,7 +9052,7 @@
|
||||||
str+=`\n行号: ${line}`;
|
str+=`\n行号: ${line}`;
|
||||||
str+=`\n列号: ${column}`;
|
str+=`\n列号: ${column}`;
|
||||||
const version=lib.version||'';
|
const version=lib.version||'';
|
||||||
const reg=/[^\d\.]/;
|
const reg=/[^\d.]/;
|
||||||
const match=version.match(reg)!=null;
|
const match=version.match(reg)!=null;
|
||||||
str+='\n'+`${match?'游戏':'无名杀'}版本: ${version||'未知版本'}`;
|
str+='\n'+`${match?'游戏':'无名杀'}版本: ${version||'未知版本'}`;
|
||||||
if(match) str+='\n⚠️您使用的游戏代码不是源于libccy/noname无名杀官方仓库,请自行寻找您所使用的游戏版本开发者反馈!';
|
if(match) str+='\n⚠️您使用的游戏代码不是源于libccy/noname无名杀官方仓库,请自行寻找您所使用的游戏版本开发者反馈!';
|
||||||
|
@ -8990,7 +9091,7 @@
|
||||||
}
|
}
|
||||||
str+='\n-------------';
|
str+='\n-------------';
|
||||||
if(typeof line=='number'&&(typeof game.readFile=='function'||location.origin!='file://')){
|
if(typeof line=='number'&&(typeof game.readFile=='function'||location.origin!='file://')){
|
||||||
function createShowCode(lines){
|
const createShowCode=function(lines){
|
||||||
let showCode='';
|
let showCode='';
|
||||||
if(lines.length>=10){
|
if(lines.length>=10){
|
||||||
if(line>4){
|
if(line>4){
|
||||||
|
@ -11313,7 +11414,7 @@
|
||||||
function Legacy(func){
|
function Legacy(func){
|
||||||
//Remove all comments
|
//Remove all comments
|
||||||
//移除所有注释
|
//移除所有注释
|
||||||
let str=func.toString().replace(/((?:(?:^[ \t]*)?(?:\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\/(?:[ \t]*\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/)))?|\/\/(?:[^\\]|\\(?:\r?\n)?)*?(?:\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/))|(?=\r?\n))))+)|("(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|(?:\r?\n|[\s\S])[^\/"'\\\s]*)/mg,'$2').trim();
|
let str=func.toString().replace(/((?:(?:^[ \t]*)?(?:\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\/(?:[ \t]*\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/)))?|\/\/(?:[^\\]|\\(?:\r?\n)?)*?(?:\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/))|(?=\r?\n))))+)|("(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|(?:\r?\n|[\s\S])[^/"'\\\s]*)/mg,'$2').trim();
|
||||||
//获取第一个 { 后的所有字符
|
//获取第一个 { 后的所有字符
|
||||||
str=str.slice(str.indexOf('{')+1);
|
str=str.slice(str.indexOf('{')+1);
|
||||||
//判断代码中是否有debugger
|
//判断代码中是否有debugger
|
||||||
|
@ -11437,6 +11538,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// falls through
|
||||||
default:
|
default:
|
||||||
return Legacy(item);
|
return Legacy(item);
|
||||||
}
|
}
|
||||||
|
@ -11447,7 +11549,7 @@
|
||||||
}
|
}
|
||||||
else if(typeof func=='object'){
|
else if(typeof func=='object'){
|
||||||
for(var i in func){
|
for(var i in func){
|
||||||
if(func.hasOwnProperty(i)){
|
if(Object.prototype.hasOwnProperty.call(func, i)){
|
||||||
func[i]=lib.init.eval(func[i]);
|
func[i]=lib.init.eval(func[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14414,7 +14516,7 @@
|
||||||
event.finish();
|
event.finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
event.doing=event.map.shift();
|
event.doing=event.map.shift();
|
||||||
'step 3'
|
'step 3'
|
||||||
event.num=0;
|
event.num=0;
|
||||||
|
@ -14533,11 +14635,11 @@
|
||||||
event._result={bool:true};
|
event._result={bool:true};
|
||||||
event._direct=true;
|
event._direct=true;
|
||||||
}
|
}
|
||||||
else if(info.direct){
|
else if(info.direct&&player.isOnline()){
|
||||||
event._result={bool:true};
|
event._result={bool:true};
|
||||||
event._direct=true;
|
event._direct=true;
|
||||||
}
|
}
|
||||||
else if(info.direct&&player.isOnline()){
|
else if(info.direct){
|
||||||
event._result={bool:true};
|
event._result={bool:true};
|
||||||
event._direct=true;
|
event._direct=true;
|
||||||
}
|
}
|
||||||
|
@ -14966,7 +15068,7 @@
|
||||||
current.getHistory().isRound=true;
|
current.getHistory().isRound=true;
|
||||||
current.getStat().isRound=true;
|
current.getStat().isRound=true;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
if(isRound){
|
if(isRound){
|
||||||
game.getGlobalHistory().isRound=true;
|
game.getGlobalHistory().isRound=true;
|
||||||
}
|
}
|
||||||
|
@ -16130,7 +16232,7 @@
|
||||||
result[0].cards=lib.skill[result[0].skill].onCompare(player)
|
result[0].cards=lib.skill[result[0].skill].onCompare(player)
|
||||||
}
|
}
|
||||||
else lose_list.push([player,result[0].cards]);
|
else lose_list.push([player,result[0].cards]);
|
||||||
};
|
}
|
||||||
for(var j=0; j<targets.length; j++){
|
for(var j=0; j<targets.length; j++){
|
||||||
if(event.list.contains(targets[j])){
|
if(event.list.contains(targets[j])){
|
||||||
var i=event.list.indexOf(targets[j]);
|
var i=event.list.indexOf(targets[j]);
|
||||||
|
@ -16178,6 +16280,9 @@
|
||||||
'step 4'
|
'step 4'
|
||||||
player.$compareMultiple(event.card1,targets,cards);
|
player.$compareMultiple(event.card1,targets,cards);
|
||||||
game.log(player,'的拼点牌为',event.card1);
|
game.log(player,'的拼点牌为',event.card1);
|
||||||
|
event.cardlist.forEach((card,index)=>{
|
||||||
|
game.log(targets[index],'的拼点牌为',card);
|
||||||
|
});
|
||||||
player.animate('target');
|
player.animate('target');
|
||||||
game.delay(0,1000);
|
game.delay(0,1000);
|
||||||
'step 5'
|
'step 5'
|
||||||
|
@ -16189,7 +16294,6 @@
|
||||||
event.target.animate('target');
|
event.target.animate('target');
|
||||||
event.card2=event.cardlist[event.iwhile];
|
event.card2=event.cardlist[event.iwhile];
|
||||||
event.num2=event.getNum(event.card2);
|
event.num2=event.getNum(event.card2);
|
||||||
game.log(event.target,'的拼点牌为',event.card2);
|
|
||||||
//event.tempplayer.line(event.target);
|
//event.tempplayer.line(event.target);
|
||||||
delete event.player;
|
delete event.player;
|
||||||
event.trigger('compare');
|
event.trigger('compare');
|
||||||
|
@ -16295,7 +16399,7 @@
|
||||||
result[0].cards=lib.skill[result[0].skill].onCompare(player)
|
result[0].cards=lib.skill[result[0].skill].onCompare(player)
|
||||||
}
|
}
|
||||||
else lose_list.push([player,result[0].cards]);
|
else lose_list.push([player,result[0].cards]);
|
||||||
};
|
}
|
||||||
for(var j=0;j<targets.length;j++){
|
for(var j=0;j<targets.length;j++){
|
||||||
if(event.list.contains(targets[j])){
|
if(event.list.contains(targets[j])){
|
||||||
var i=event.list.indexOf(targets[j]);
|
var i=event.list.indexOf(targets[j]);
|
||||||
|
@ -16486,7 +16590,7 @@
|
||||||
}
|
}
|
||||||
else event.lose_list.push([player,event.resultOL[player.playerid].cards[0]]);
|
else event.lose_list.push([player,event.resultOL[player.playerid].cards[0]]);
|
||||||
event.card1=event.resultOL[player.playerid].cards[0];
|
event.card1=event.resultOL[player.playerid].cards[0];
|
||||||
};
|
}
|
||||||
if(!event.card2){
|
if(!event.card2){
|
||||||
if(event.resultOL[target.playerid].skill&&lib.skill[event.resultOL[target.playerid].skill]&&lib.skill[event.resultOL[target.playerid].skill].onCompare){
|
if(event.resultOL[target.playerid].skill&&lib.skill[event.resultOL[target.playerid].skill]&&lib.skill[event.resultOL[target.playerid].skill].onCompare){
|
||||||
target.logSkill(event.resultOL[target.playerid].skill);
|
target.logSkill(event.resultOL[target.playerid].skill);
|
||||||
|
@ -18626,7 +18730,7 @@
|
||||||
next.cards=cards;
|
next.cards=cards;
|
||||||
next.player=player;
|
next.player=player;
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
var next=game.createEvent(card.name);
|
var next=game.createEvent(card.name);
|
||||||
next.setContent(info.content);
|
next.setContent(info.content);
|
||||||
next.targets=targets;
|
next.targets=targets;
|
||||||
|
@ -19675,14 +19779,14 @@
|
||||||
cards[i].recheck();
|
cards[i].recheck();
|
||||||
|
|
||||||
var info=lib.card[cards[i].name];
|
var info=lib.card[cards[i].name];
|
||||||
if(cards[i].hasOwnProperty('_destroy')){
|
if(Object.prototype.hasOwnProperty.call(cards[i], '_destroy')){
|
||||||
if(cards[i]._destroy){
|
if(cards[i]._destroy){
|
||||||
cards[i].delete();
|
cards[i].delete();
|
||||||
cards[i].destroyed=cards[i]._destroy;
|
cards[i].destroyed=cards[i]._destroy;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(cards[i].hasOwnProperty('destroyed')){
|
else if(Object.prototype.hasOwnProperty.call(cards[i], 'destroyed')){
|
||||||
if(event.getlx!==false&&event.position&&cards[i].willBeDestroyed(event.position.id,null,event)){
|
if(event.getlx!==false&&event.position&&cards[i].willBeDestroyed(event.position.id,null,event)){
|
||||||
cards[i].selfDestroy(event);
|
cards[i].selfDestroy(event);
|
||||||
continue;
|
continue;
|
||||||
|
@ -20497,7 +20601,7 @@
|
||||||
if(event.judge2){
|
if(event.judge2){
|
||||||
var judge2=event.judge2(event.result);
|
var judge2=event.judge2(event.result);
|
||||||
if(typeof judge2=='boolean') player.tryJudgeAnimate(judge2);
|
if(typeof judge2=='boolean') player.tryJudgeAnimate(judge2);
|
||||||
};
|
}
|
||||||
if(event.clearArena!=false){
|
if(event.clearArena!=false){
|
||||||
game.broadcastAll(ui.clear);
|
game.broadcastAll(ui.clear);
|
||||||
}
|
}
|
||||||
|
@ -21189,9 +21293,9 @@
|
||||||
if(type=='horse'||type=='equip3_4'){
|
if(type=='horse'||type=='equip3_4'){
|
||||||
return player.hasEnabledSlot(3)&&(get.is.mountCombined()||player.hasEnabledSlot(4));
|
return player.hasEnabledSlot(3)&&(get.is.mountCombined()||player.hasEnabledSlot(4));
|
||||||
}
|
}
|
||||||
else if(type=='equip3_4'){
|
// else if(type=='equip3_4'){
|
||||||
type='equip3';
|
// type='equip3';
|
||||||
}
|
// }
|
||||||
else if(get.is.mountCombined()&&type=='equip4'){
|
else if(get.is.mountCombined()&&type=='equip4'){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -21925,7 +22029,7 @@
|
||||||
txy=to.getXY();
|
txy=to.getXY();
|
||||||
n=Math.abs(fxy[0]-txy[0])+Math.abs(fxy[1]-txy[1]);
|
n=Math.abs(fxy[0]-txy[0])+Math.abs(fxy[1]-txy[1]);
|
||||||
}
|
}
|
||||||
else if(to.isMin(true)||from.isMin(true)){}
|
else if(to.isMin(true)||from.isMin(true)){/* empty */}
|
||||||
else{
|
else{
|
||||||
var length=game.players.length;
|
var length=game.players.length;
|
||||||
var totalPopulation=game.players.length+game.dead.length+1;
|
var totalPopulation=game.players.length+game.dead.length+1;
|
||||||
|
@ -22193,7 +22297,7 @@
|
||||||
default:{
|
default:{
|
||||||
this.maxHp=maxHp1+maxHp2-3;
|
this.maxHp=maxHp1+maxHp2-3;
|
||||||
this.hp=hp1+hp2-3;
|
this.hp=hp1+hp2-3;
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
if(info2[4].contains('hiddenSkill')&&!this.noclick){
|
if(info2[4].contains('hiddenSkill')&&!this.noclick){
|
||||||
if(!this.hiddenSkills) this.hiddenSkills=[];
|
if(!this.hiddenSkills) this.hiddenSkills=[];
|
||||||
|
@ -24027,19 +24131,19 @@
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
var event=_status.event.getParent();
|
var event=_status.event.getParent();
|
||||||
var getn=function(card){
|
var getn=function(card){
|
||||||
if(player.hasSkill('tianbian')&&get.suit(card)=='heart') return 13*(Boolean(event.small)?-1:1);
|
if(player.hasSkill('tianbian')&&get.suit(card)=='heart') return 13*(event.small?-1:1);
|
||||||
return get.number(card)*(Boolean(event.small)?-1:1);
|
return get.number(card)*(event.small?-1:1);
|
||||||
}
|
}
|
||||||
if(source&&source!=player){
|
if(source&&source!=player){
|
||||||
if(get.attitude(player,source)>1){
|
if(get.attitude(player,source)>1){
|
||||||
if(Boolean(event.small)) return getn(card)-get.value(card)/2+addi;
|
if(event.small) return getn(card)-get.value(card)/2+addi;
|
||||||
return -getn(card)-get.value(card)/2+addi;
|
return -getn(card)-get.value(card)/2+addi;
|
||||||
}
|
}
|
||||||
if(Boolean(event.small)) return -getn(card)-get.value(card)/2+addi;
|
if(event.small) return -getn(card)-get.value(card)/2+addi;
|
||||||
return getn(card)-get.value(card)/2+addi;
|
return getn(card)-get.value(card)/2+addi;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(Boolean(event.small)) return -getn(card)-get.value(card)/2+addi;
|
if(event.small) return -getn(card)-get.value(card)/2+addi;
|
||||||
return getn(card)-get.value(card)/2+addi;
|
return getn(card)-get.value(card)/2+addi;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24063,7 +24167,7 @@
|
||||||
var addi=(get.value(card)>=8&&get.type(card)!='equip')?-6:0;
|
var addi=(get.value(card)>=8&&get.type(card)!='equip')?-6:0;
|
||||||
if(card.name=='du') addi-=5;
|
if(card.name=='du') addi-=5;
|
||||||
if(player==event.player){
|
if(player==event.player){
|
||||||
if(Boolean(event.small)){
|
if(event.small){
|
||||||
return -getn(card)-get.value(card)/2+addi;
|
return -getn(card)-get.value(card)/2+addi;
|
||||||
}
|
}
|
||||||
return getn(card)-get.value(card)/2+addi;
|
return getn(card)-get.value(card)/2+addi;
|
||||||
|
@ -25291,7 +25395,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(next.animate=='gain2'||next.animate=='draw2'){
|
if(next.animate=='gain2'||next.animate=='draw2'){
|
||||||
if(!next.hasOwnProperty('log')){
|
if(!Object.prototype.hasOwnProperty.call(next, 'log')){
|
||||||
next.log=true;
|
next.log=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25378,7 +25482,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(next.animate=='gain2'||next.animate=='draw2'||next.animate=='give'){
|
if(next.animate=='gain2'||next.animate=='draw2'||next.animate=='give'){
|
||||||
if(!next.hasOwnProperty('log')){
|
if(!Object.prototype.hasOwnProperty.call(next, 'log')){
|
||||||
next.log=true;
|
next.log=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25696,7 +25800,7 @@
|
||||||
case 1:this.draw(nodelay?'nodelay':1);break;
|
case 1:this.draw(nodelay?'nodelay':1);break;
|
||||||
case 2:this.recover();break;
|
case 2:this.recover();break;
|
||||||
case 3:this.changeHujia();break;
|
case 3:this.changeHujia();break;
|
||||||
case 4:this.tempHide();
|
case 4:this.tempHide();break;
|
||||||
case 5:this.discard(this.getCards('j')).delay=(!nodelay);break;
|
case 5:this.discard(this.getCards('j')).delay=(!nodelay);break;
|
||||||
case 6:{
|
case 6:{
|
||||||
if(this.isLinked()) this.link();
|
if(this.isLinked()) this.link();
|
||||||
|
@ -26182,7 +26286,7 @@
|
||||||
}
|
}
|
||||||
clearTimeout(lib.node.torespondtimeout[this.playerid]);
|
clearTimeout(lib.node.torespondtimeout[this.playerid]);
|
||||||
delete lib.node.torespondtimeout[this.playerid];
|
delete lib.node.torespondtimeout[this.playerid];
|
||||||
if(!lib.node.torespond.hasOwnProperty(this.playerid)){
|
if(!Object.prototype.hasOwnProperty.call(lib.node.torespond, this.playerid)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var noresume=false;
|
var noresume=false;
|
||||||
|
@ -26209,7 +26313,7 @@
|
||||||
else if(_status.paused&&!noresume) game.resume();
|
else if(_status.paused&&!noresume) game.resume();
|
||||||
}
|
}
|
||||||
tempUnwait(result){
|
tempUnwait(result){
|
||||||
if(!lib.node.torespond.hasOwnProperty(this.playerid)){
|
if(!Object.prototype.hasOwnProperty.call(lib.node.torespond, this.playerid)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var proceed;
|
var proceed;
|
||||||
|
@ -27566,7 +27670,8 @@
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
for(var i in this.forbiddenSkills){
|
for(var i in this.forbiddenSkills){
|
||||||
if(this.forbiddenSkills[i].remove(skill)){
|
if(this.forbiddenSkills[i].includes(skill)){
|
||||||
|
this.forbiddenSkills[i].remove(skill)
|
||||||
if(!this.forbiddenSkills[i].length){
|
if(!this.forbiddenSkills[i].length){
|
||||||
delete this.forbiddenSkills[i];
|
delete this.forbiddenSkills[i];
|
||||||
}
|
}
|
||||||
|
@ -27913,6 +28018,11 @@
|
||||||
if(func&&!func(target)) return false;
|
if(func&&!func(target)) return false;
|
||||||
return target.identity!='fan';
|
return target.identity!='fan';
|
||||||
});break;
|
});break;
|
||||||
|
case 'commoner':targets=game.filterPlayer(function(target){
|
||||||
|
if(func&&!func(target)) return false;
|
||||||
|
if(num>=3) return target.identity!='fan';
|
||||||
|
return target.identity=='fan';
|
||||||
|
}); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27983,6 +28093,10 @@
|
||||||
if(func&&!func(target)) return false;
|
if(func&&!func(target)) return false;
|
||||||
return target.identity=='fan';
|
return target.identity=='fan';
|
||||||
});break;
|
});break;
|
||||||
|
case 'commoner':targets=game.filterPlayer(function(target){
|
||||||
|
if(func&&!func(target)) return false;
|
||||||
|
return true;
|
||||||
|
}); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30901,6 +31015,7 @@
|
||||||
const type=`onNext${name[0].toUpperCase()}${name.slice(1)}`;
|
const type=`onNext${name[0].toUpperCase()}${name.slice(1)}`;
|
||||||
if(gameEvent.hasHandler(type)) this.pushHandler(...gameEvent.getHandler(type));
|
if(gameEvent.hasHandler(type)) this.pushHandler(...gameEvent.getHandler(type));
|
||||||
}
|
}
|
||||||
|
lib.handler.addHandlerToEvent(this);
|
||||||
}
|
}
|
||||||
this.step=0;
|
this.step=0;
|
||||||
this.finished=false;
|
this.finished=false;
|
||||||
|
@ -31224,7 +31339,6 @@
|
||||||
parent=parent.parent;
|
parent=parent.parent;
|
||||||
if(historys.contains(parent)) return toreturn;
|
if(historys.contains(parent)) return toreturn;
|
||||||
}
|
}
|
||||||
if(!parent) return toreturn;
|
|
||||||
}
|
}
|
||||||
if(toreturn===null){
|
if(toreturn===null){
|
||||||
return null;
|
return null;
|
||||||
|
@ -31456,7 +31570,7 @@
|
||||||
for(var i=0;i<map.list2.length;i++){
|
for(var i=0;i<map.list2.length;i++){
|
||||||
if(map.list2[i][0]==toadd[0]&&map.list2[i][1]==toadd[1]) return;
|
if(map.list2[i][0]==toadd[0]&&map.list2[i][1]==toadd[1]) return;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
for(var i=0;i<map.list.length;i++){
|
for(var i=0;i<map.list.length;i++){
|
||||||
if(map.list[i][0]==toadd[0]&&map.list[i][1]==toadd[1]) return;
|
if(map.list[i][0]==toadd[0]&&map.list[i][1]==toadd[1]) return;
|
||||||
}
|
}
|
||||||
|
@ -31469,43 +31583,6 @@
|
||||||
func(skill[j]);
|
func(skill[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
removeTrigger(skill,player){
|
|
||||||
if(!player||!skill) return;
|
|
||||||
var evt=this;
|
|
||||||
if(typeof skill=='string') skill=[skill];
|
|
||||||
game.expandSkills(skill);
|
|
||||||
while(true){
|
|
||||||
var evt=evt.getParent('arrangeTrigger');
|
|
||||||
if(!evt||evt.name!='arrangeTrigger'||!evt.map) return;
|
|
||||||
var filter=function(content){
|
|
||||||
if(typeof content=='string') return content==triggername;
|
|
||||||
return content.contains(triggername);
|
|
||||||
};
|
|
||||||
var trigger=evt._trigger;
|
|
||||||
var triggername=evt.triggername;
|
|
||||||
var map=false;
|
|
||||||
if(evt.doing&&evt.doing.player==player) map=evt.doing;
|
|
||||||
else{
|
|
||||||
for(var i=0;i<evt.map.length;i++){
|
|
||||||
if(evt.map[i].player==player){
|
|
||||||
map=evt.map[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!map) return;
|
|
||||||
var func=function(skillx){
|
|
||||||
var toremove=map.list.filter(i=>{
|
|
||||||
return i[0]==skillx&&i[1]==player;
|
|
||||||
});
|
|
||||||
if(toremove.length>0) map.list.removeArray(toremove);
|
|
||||||
}
|
|
||||||
for(var j=0;j<skill.length;j++){
|
|
||||||
func(skill[j]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
removeTrigger(skill,player){
|
removeTrigger(skill,player){
|
||||||
if(!player||!skill) return;
|
if(!player||!skill) return;
|
||||||
|
@ -31749,7 +31826,7 @@
|
||||||
}
|
}
|
||||||
evt.list=[];
|
evt.list=[];
|
||||||
if(evt.doing) evt.doing.list=[];
|
if(evt.doing) evt.doing.list=[];
|
||||||
};
|
}
|
||||||
this._triggered=5;
|
this._triggered=5;
|
||||||
}
|
}
|
||||||
else if(player){
|
else if(player){
|
||||||
|
@ -37515,7 +37592,7 @@
|
||||||
}
|
}
|
||||||
const blob=zip.generate({
|
const blob=zip.generate({
|
||||||
type:'blob'
|
type:'blob'
|
||||||
}),fileNameToSaveAs=`${exportExtension.replace(/\\|\/|\:|\?|\"|\*|<|>|\|/g,'-')}.zip`;
|
}),fileNameToSaveAs=`${exportExtension.replace(/\\|\/|:|\?|"|\*|<|>|\|/g,'-')}.zip`;
|
||||||
|
|
||||||
if(lib.device){
|
if(lib.device){
|
||||||
const directory=lib.device=='android'?cordova.file.externalDataDirectory:cordova.file.documentsDirectory;
|
const directory=lib.device=='android'?cordova.file.externalDataDirectory:cordova.file.documentsDirectory;
|
||||||
|
@ -37561,7 +37638,7 @@
|
||||||
const config=game.importedPack.config;
|
const config=game.importedPack.config;
|
||||||
Object.keys(config).forEach(value=>{
|
Object.keys(config).forEach(value=>{
|
||||||
const configObject=config[value];
|
const configObject=config[value];
|
||||||
if(configObject&&configObject.hasOwnProperty('init')) game.saveConfig(`extension_${extensionName}_${value}`,configObject.init);
|
if(configObject&&Object.prototype.hasOwnProperty.call(configObject, 'init')) game.saveConfig(`extension_${extensionName}_${value}`,configObject.init);
|
||||||
});
|
});
|
||||||
if(game.download){
|
if(game.download){
|
||||||
const files=zip.files,hiddenFileFlags=['.','_'],fileList=Object.keys(files).filter(key=>!files[key].dir&&!hiddenFileFlags.includes(key[0])).reverse();
|
const files=zip.files,hiddenFileFlags=['.','_'],fileList=Object.keys(files).filter(key=>!files[key].dir&&!hiddenFileFlags.includes(key[0])).reverse();
|
||||||
|
@ -37639,7 +37716,7 @@
|
||||||
export:function(textToWrite,name){
|
export:function(textToWrite,name){
|
||||||
var textFileAsBlob = new Blob([textToWrite], {type:'text/plain'});
|
var textFileAsBlob = new Blob([textToWrite], {type:'text/plain'});
|
||||||
var fileNameToSaveAs = name||'noname';
|
var fileNameToSaveAs = name||'noname';
|
||||||
fileNameToSaveAs=fileNameToSaveAs.replace(/\\|\/|\:|\?|\"|\*|<|>|\|/g,'.');
|
fileNameToSaveAs=fileNameToSaveAs.replace(/\\|\/|:|\?|"|\*|<|>|\|/g,'.');
|
||||||
|
|
||||||
if(lib.device){
|
if(lib.device){
|
||||||
var directory;
|
var directory;
|
||||||
|
@ -42001,7 +42078,7 @@
|
||||||
config.num=config.num||num||3;
|
config.num=config.num||num||3;
|
||||||
config.ratio=config.ratio||ratio||1.2;
|
config.ratio=config.ratio||ratio||1.2;
|
||||||
config.update=config.update||update;
|
config.update=config.update||update;
|
||||||
if(!config.hasOwnProperty('first')){
|
if(!Object.prototype.hasOwnProperty.call(config, 'first')){
|
||||||
if(typeof first=='boolean'){
|
if(typeof first=='boolean'){
|
||||||
config.first=first;
|
config.first=first;
|
||||||
}
|
}
|
||||||
|
@ -42615,10 +42692,10 @@
|
||||||
}
|
}
|
||||||
if(info.marktext) lib.translate[`${i}_bg`]=info.marktext;
|
if(info.marktext) lib.translate[`${i}_bg`]=info.marktext;
|
||||||
if(info.silent){
|
if(info.silent){
|
||||||
if(!info.hasOwnProperty('forced')) info.forced=true;
|
if(!Object.prototype.hasOwnProperty.call(info, 'forced')) info.forced=true;
|
||||||
if(!info.hasOwnProperty('popup')) info.popup=false;
|
if(!Object.prototype.hasOwnProperty.call(info, 'popup')) info.popup=false;
|
||||||
}
|
}
|
||||||
if(!info.hasOwnProperty('_priority')){
|
if(!Object.prototype.hasOwnProperty.call(info, '_priority')){
|
||||||
let priority=0;
|
let priority=0;
|
||||||
if(info.priority){
|
if(info.priority){
|
||||||
priority=info.priority*100;
|
priority=info.priority*100;
|
||||||
|
@ -43037,7 +43114,7 @@
|
||||||
game.reload2();
|
game.reload2();
|
||||||
reject(event);
|
reject(event);
|
||||||
}
|
}
|
||||||
};;
|
};
|
||||||
record.onsuccess=event=>{
|
record.onsuccess=event=>{
|
||||||
if(typeof onSuccess=='function'){
|
if(typeof onSuccess=='function'){
|
||||||
_status.dburgent=true;
|
_status.dburgent=true;
|
||||||
|
@ -43077,7 +43154,7 @@
|
||||||
game.reload2();
|
game.reload2();
|
||||||
reject(event);
|
reject(event);
|
||||||
}
|
}
|
||||||
};;
|
};
|
||||||
idbRequest.onsuccess=event=>{
|
idbRequest.onsuccess=event=>{
|
||||||
const result=event.target.result;
|
const result=event.target.result;
|
||||||
if(typeof onSuccess=='function'){
|
if(typeof onSuccess=='function'){
|
||||||
|
@ -43101,7 +43178,7 @@
|
||||||
game.reload2();
|
game.reload2();
|
||||||
reject(event);
|
reject(event);
|
||||||
}
|
}
|
||||||
};;
|
};
|
||||||
idbRequest.onsuccess=event=>{
|
idbRequest.onsuccess=event=>{
|
||||||
const result=event.target.result;
|
const result=event.target.result;
|
||||||
if(result){
|
if(result){
|
||||||
|
@ -43162,7 +43239,7 @@
|
||||||
request.onerror=event=>{
|
request.onerror=event=>{
|
||||||
game.reload2();
|
game.reload2();
|
||||||
reject(event);
|
reject(event);
|
||||||
};;
|
};
|
||||||
request.onsuccess=event=>{
|
request.onsuccess=event=>{
|
||||||
game.reload2();
|
game.reload2();
|
||||||
resolve(event);
|
resolve(event);
|
||||||
|
@ -44915,7 +44992,7 @@
|
||||||
var cfg=copyObj(infoconfig[j]);
|
var cfg=copyObj(infoconfig[j]);
|
||||||
cfg._name=j;
|
cfg._name=j;
|
||||||
cfg.mode=mode;
|
cfg.mode=mode;
|
||||||
if(!config.hasOwnProperty(j)){
|
if(!Object.prototype.hasOwnProperty.call(config, j)){
|
||||||
game.saveConfig(j,cfg.init,mode);
|
game.saveConfig(j,cfg.init,mode);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -45383,7 +45460,7 @@
|
||||||
}
|
}
|
||||||
var cfg=copyObj(info.config[j]);
|
var cfg=copyObj(info.config[j]);
|
||||||
cfg._name=j;
|
cfg._name=j;
|
||||||
if(!config.hasOwnProperty(j)){
|
if(!Object.prototype.hasOwnProperty.call(config, j)){
|
||||||
if(cfg.type!='autoskill'&&cfg.type!='banskill'){
|
if(cfg.type!='autoskill'&&cfg.type!='banskill'){
|
||||||
game.saveConfig(j,cfg.init);
|
game.saveConfig(j,cfg.init);
|
||||||
}
|
}
|
||||||
|
@ -45501,7 +45578,7 @@
|
||||||
}
|
}
|
||||||
var link=(game.writeFile?'cdv_':'custom_')+name;
|
var link=(game.writeFile?'cdv_':'custom_')+name;
|
||||||
if(lib.config.customBackgroundMusic[link]){
|
if(lib.config.customBackgroundMusic[link]){
|
||||||
if(!confirm('已经存在文件名称相同的背景音乐,是否仍然要继续导入?')){_status.music_importing=false;return};
|
if(!confirm('已经存在文件名称相同的背景音乐,是否仍然要继续导入?')){_status.music_importing=false;return}
|
||||||
for(var i=1;i<1000;i++){
|
for(var i=1;i<1000;i++){
|
||||||
if(!lib.config.customBackgroundMusic[link+'_'+i]){
|
if(!lib.config.customBackgroundMusic[link+'_'+i]){
|
||||||
link=link+'_'+i;break;
|
link=link+'_'+i;break;
|
||||||
|
@ -47257,7 +47334,7 @@
|
||||||
j=mode+'_'+i+'_playpackconfig';
|
j=mode+'_'+i+'_playpackconfig';
|
||||||
}
|
}
|
||||||
cfg._name=j;
|
cfg._name=j;
|
||||||
if(!lib.config.hasOwnProperty(j)){
|
if(!Object.prototype.hasOwnProperty.call(lib.config, j)){
|
||||||
game.saveConfig(j,cfg.init);
|
game.saveConfig(j,cfg.init);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -48510,7 +48587,7 @@
|
||||||
editnode.classList.add('disabled');
|
editnode.classList.add('disabled');
|
||||||
delnode.innerHTML='取消';
|
delnode.innerHTML='取消';
|
||||||
delete delnode.button;
|
delete delnode.button;
|
||||||
container.code='card={\n \n}\n\n\/*\n示例:\ncard={\n type:"basic",\n enable:true,\n filterTarget:true,\n content:function(){\n target.draw()\n },\n ai:{\n order:1,\n result:{\n target:1\n }\n }\n}\n此例的效果为目标摸一张牌\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
container.code='card={\n \n}\n\n/*\n示例:\ncard={\n type:"basic",\n enable:true,\n filterTarget:true,\n content:function(){\n target.draw()\n },\n ai:{\n order:1,\n result:{\n target:1\n }\n }\n}\n此例的效果为目标摸一张牌\n导出时本段代码中的换行、缩进以及注释将被清除\n*/';
|
||||||
}
|
}
|
||||||
|
|
||||||
newCard=ui.create.div('.new_character',page);
|
newCard=ui.create.div('.new_character',page);
|
||||||
|
@ -48709,7 +48786,7 @@
|
||||||
delete window.saveNonameInput;
|
delete window.saveNonameInput;
|
||||||
};
|
};
|
||||||
var editor=ui.create.editor(container,saveInput);
|
var editor=ui.create.editor(container,saveInput);
|
||||||
container.code='card={\n \n}\n\n\/*\n示例:\ncard={\n type:"basic",\n enable:true,\n filterTarget:true,\n content:function(){\n target.draw()\n },\n ai:{\n order:1,\n result:{\n target:1\n }\n }\n}\n此例的效果为目标摸一张牌\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
container.code='card={\n \n}\n\n/*\n示例:\ncard={\n type:"basic",\n enable:true,\n filterTarget:true,\n content:function(){\n target.draw()\n },\n ai:{\n order:1,\n result:{\n target:1\n }\n }\n}\n此例的效果为目标摸一张牌\n导出时本段代码中的换行、缩进以及注释将被清除\n*/';
|
||||||
|
|
||||||
var editnode=ui.create.div('.menubutton.large.new_card.disabled','创建卡牌',newCard,function(){
|
var editnode=ui.create.div('.menubutton.large.new_card.disabled','创建卡牌',newCard,function(){
|
||||||
var name=page.querySelector('input.new_name').value;
|
var name=page.querySelector('input.new_name').value;
|
||||||
|
@ -49060,7 +49137,7 @@
|
||||||
editnode.classList.add('disabled');
|
editnode.classList.add('disabled');
|
||||||
delnode.innerHTML='取消';
|
delnode.innerHTML='取消';
|
||||||
delete delnode.button;
|
delete delnode.button;
|
||||||
container.code='skill={\n \n}\n\n\/*\n示例:\nskill={\n trigger:{player:"phaseJieshuBegin"},\n frequent:true,\n content:function(){\n player.draw()\n }\n}\n此例为闭月代码\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
container.code='skill={\n \n}\n\n/*\n示例:\nskill={\n trigger:{player:"phaseJieshuBegin"},\n frequent:true,\n content:function(){\n player.draw()\n }\n}\n此例为闭月代码\n导出时本段代码中的换行、缩进以及注释将被清除\n*/';
|
||||||
if(page.fromchar=='add'){
|
if(page.fromchar=='add'){
|
||||||
page.fromchar=true;
|
page.fromchar=true;
|
||||||
}
|
}
|
||||||
|
@ -49146,7 +49223,7 @@
|
||||||
delete window.saveNonameInput;
|
delete window.saveNonameInput;
|
||||||
};
|
};
|
||||||
var editor=ui.create.editor(container,saveInput);
|
var editor=ui.create.editor(container,saveInput);
|
||||||
container.code='skill={\n \n}\n\n\/*\n示例:\nskill={\n trigger:{player:"phaseJieshuBegin"},\n frequent:true,\n content:function(){\n player.draw()\n }\n}\n此例为闭月代码\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
container.code='skill={\n \n}\n\n/*\n示例:\nskill={\n trigger:{player:"phaseJieshuBegin"},\n frequent:true,\n content:function(){\n player.draw()\n }\n}\n此例为闭月代码\n导出时本段代码中的换行、缩进以及注释将被清除\n*/';
|
||||||
|
|
||||||
var citebutton=document.createElement('button');
|
var citebutton=document.createElement('button');
|
||||||
citebutton.innerHTML='引用代码';
|
citebutton.innerHTML='引用代码';
|
||||||
|
@ -49374,10 +49451,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
dashes.content.node.code='function(config,pack){\n \n}\n\n\/*\n函数执行时机为游戏数据加载之后、界面加载之前\n参数1扩展选项(见选项代码);参数2为扩展定义的武将、卡牌和技能等(可在此函数中修改)\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
dashes.content.node.code='function(config,pack){\n \n}\n\n/*\n函数执行时机为游戏数据加载之后、界面加载之前\n参数1扩展选项(见选项代码);参数2为扩展定义的武将、卡牌和技能等(可在此函数中修改)\n导出时本段代码中的换行、缩进以及注释将被清除\n*/';
|
||||||
dashes.precontent.node.code='function(){\n \n}\n\n\/*\n函数执行时机为游戏数据加载之前,且不受禁用扩展的限制\n除添加模式外请慎用\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
dashes.precontent.node.code='function(){\n \n}\n\n/*\n函数执行时机为游戏数据加载之前,且不受禁用扩展的限制\n除添加模式外请慎用\n导出时本段代码中的换行、缩进以及注释将被清除\n*/';
|
||||||
dashes.config.node.code='config={\n \n}\n\n\/*\n示例:\nconfig={\n switcher_example:{\n name:"示例列表选项",\n init:"3",\n item:{"1":"一","2":"二","3":"三"}\n },\n toggle_example:{\n name:"示例开关选项",\n init:true\n }\n}\n此例中传入的主代码函数的默认参数为{switcher_example:"3",toggle_example:true}\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
dashes.config.node.code='config={\n \n}\n\n/*\n示例:\nconfig={\n switcher_example:{\n name:"示例列表选项",\n init:"3",\n item:{"1":"一","2":"二","3":"三"}\n },\n toggle_example:{\n name:"示例开关选项",\n init:true\n }\n}\n此例中传入的主代码函数的默认参数为{switcher_example:"3",toggle_example:true}\n导出时本段代码中的换行、缩进以及注释将被清除\n*/';
|
||||||
dashes.help.node.code='help={\n \n}\n\n\/*\n示例:\nhelp={\n "帮助条目":"<ul><li>列表1-条目1<li>列表1-条目2</ul><ol><li>列表2-条目1<li>列表2-条目2</ul>"\n}\n帮助内容将显示在菜单-选项-帮助中\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
dashes.help.node.code='help={\n \n}\n\ns/*\n示例:\nhelp={\n "帮助条目":"<ul><li>列表1-条目1<li>列表1-条目2</ul><ol><li>列表2-条目1<li>列表2-条目2</ul>"\n}\n帮助内容将显示在菜单-选项-帮助中\n导出时本段代码中的换行、缩进以及注释将被清除\n*/';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var dashes={};
|
var dashes={};
|
||||||
|
@ -49483,10 +49560,10 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
page.content={}
|
page.content={}
|
||||||
createCode('主','主代码',page,clickCode,'content','function(config,pack){\n \n}\n\n\/*\n函数执行时机为游戏数据加载之后、界面加载之前\n参数1扩展选项(见选项代码);参数2为扩展定义的武将、卡牌和技能等(可在此函数中修改)\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/');
|
createCode('主','主代码',page,clickCode,'content','function(config,pack){\n \n}\n\n/*\n函数执行时机为游戏数据加载之后、界面加载之前\n参数1扩展选项(见选项代码);参数2为扩展定义的武将、卡牌和技能等(可在此函数中修改)\n导出时本段代码中的换行、缩进以及注释将被清除\n*/');
|
||||||
createCode('启','启动代码',page,clickCode,'precontent','function(){\n \n}\n\n\/*\n函数执行时机为游戏数据加载之前,且不受禁用扩展的限制\n除添加模式外请慎用\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/');
|
createCode('启','启动代码',page,clickCode,'precontent','function(){\n \n}\n\n/*\n函数执行时机为游戏数据加载之前,且不受禁用扩展的限制\n除添加模式外请慎用\n导出时本段代码中的换行、缩进以及注释将被清除\n*/');
|
||||||
createCode('选','选项代码',page,clickCode,'config','config={\n \n}\n\n\/*\n示例:\nconfig={\n switcher_example:{\n name:"示例列表选项",\n init:"3",\n item:{"1":"一","2":"二","3":"三"}\n },\n toggle_example:{\n name:"示例开关选项",\n init:true\n }\n}\n此例中传入的主代码函数的默认参数为{switcher_example:"3",toggle_example:true}\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/');
|
createCode('选','选项代码',page,clickCode,'config','config={\n \n}\n\n/*\n示例:\nconfig={\n switcher_example:{\n name:"示例列表选项",\n init:"3",\n item:{"1":"一","2":"二","3":"三"}\n },\n toggle_example:{\n name:"示例开关选项",\n init:true\n }\n}\n此例中传入的主代码函数的默认参数为{switcher_example:"3",toggle_example:true}\n导出时本段代码中的换行、缩进以及注释将被清除\n*/');
|
||||||
createCode('帮','帮助代码',page,clickCode,'help','help={\n \n}\n\n\/*\n示例:\nhelp={\n "帮助条目":"<ul><li>列表1-条目1<li>列表1-条目2</ul><ol><li>列表2-条目1<li>列表2-条目2</ul>"\n}\n帮助内容将显示在菜单-选项-帮助中\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/');
|
createCode('帮','帮助代码',page,clickCode,'help','help={\n \n}\n\n/*\n示例:\nhelp={\n "帮助条目":"<ul><li>列表1-条目1<li>列表1-条目2</ul><ol><li>列表2-条目1<li>列表2-条目2</ul>"\n}\n帮助内容将显示在菜单-选项-帮助中\n导出时本段代码中的换行、缩进以及注释将被清除\n*/');
|
||||||
|
|
||||||
return page;
|
return page;
|
||||||
}());
|
}());
|
||||||
|
@ -49650,7 +49727,7 @@
|
||||||
game.saveConfig('extension_'+extname+'_enable',true);
|
game.saveConfig('extension_'+extname+'_enable',true);
|
||||||
game.saveConfig('extension_'+extname+'_version',that.info.version);
|
game.saveConfig('extension_'+extname+'_version',that.info.version);
|
||||||
for(var i in game.importedPack.config){
|
for(var i in game.importedPack.config){
|
||||||
if(game.importedPack.config[i]&&game.importedPack.config[i].hasOwnProperty('init')){
|
if(game.importedPack.config[i]&&Object.prototype.hasOwnProperty.call(game.importedPack.config[i], 'init')){
|
||||||
game.saveConfig('extension_'+extname+'_'+i,game.importedPack.config[i].init);
|
game.saveConfig('extension_'+extname+'_'+i,game.importedPack.config[i].init);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56891,7 +56968,7 @@
|
||||||
if(!information) {
|
if(!information) {
|
||||||
resolve(`${lib.assetURL}image/card/${imageName}.png`)
|
resolve(`${lib.assetURL}image/card/${imageName}.png`)
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
const image=information.image;
|
const image=information.image;
|
||||||
if(!image) resolve(`${lib.assetURL}image/card/${imageName}.png`);
|
if(!image) resolve(`${lib.assetURL}image/card/${imageName}.png`);
|
||||||
else if(image.startsWith('db:')) game.getDB('image',image.slice(3)).then(resolve,reject);
|
else if(image.startsWith('db:')) game.getDB('image',image.slice(3)).then(resolve,reject);
|
||||||
|
@ -58196,6 +58273,26 @@
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const get={
|
const get={
|
||||||
|
/**
|
||||||
|
* 返回 VCard[] 形式的所有牌,用于印卡将遍历
|
||||||
|
* @param {Function} filter
|
||||||
|
* @returns {string[][]}
|
||||||
|
*/
|
||||||
|
inpileVCardList:filter=>{
|
||||||
|
let list=[];
|
||||||
|
for(const name of lib.inpile){
|
||||||
|
const type=get.type(name);
|
||||||
|
const info=[type,'',name];
|
||||||
|
if(!filter||filter(info)) list.push(info);
|
||||||
|
if(name=='sha'){
|
||||||
|
for(const nature of lib.inpile_nature){
|
||||||
|
const info=[type,'',name,nature];
|
||||||
|
if(!filter||filter(info)) list.push(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 根据座次数n(从0开始)获取对应的“n+1号位”翻译
|
* 根据座次数n(从0开始)获取对应的“n+1号位”翻译
|
||||||
* @param {number} seat
|
* @param {number} seat
|
||||||
|
@ -58270,7 +58367,7 @@
|
||||||
priority:skill=>{
|
priority:skill=>{
|
||||||
const info=get.info(skill);
|
const info=get.info(skill);
|
||||||
if(!info) return 0;
|
if(!info) return 0;
|
||||||
if(info.hasOwnProperty('_priority')) return info._priority;
|
if(Object.prototype.hasOwnProperty.call(info, '_priority')) return info._priority;
|
||||||
let priority=0;
|
let priority=0;
|
||||||
if(info.priority){
|
if(info.priority){
|
||||||
priority=info.priority*100;
|
priority=info.priority*100;
|
||||||
|
@ -58451,6 +58548,38 @@
|
||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
is:{
|
is:{
|
||||||
|
/**
|
||||||
|
* 判断是否为进攻坐骑
|
||||||
|
* @param {Card | VCard} card
|
||||||
|
* @param {false | Player} [player]
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
attackingMount:(card,player)=>{
|
||||||
|
const subtype=get.subtype(card,player);
|
||||||
|
if(subtype=='equip4') return true;
|
||||||
|
else if(subtype=='equip6'){
|
||||||
|
const info=get.info(card,player),distance=info.distance;
|
||||||
|
if(!distance) return false;
|
||||||
|
if(distance.globalFrom&&!info.notMount) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 判断是否为防御坐骑
|
||||||
|
* @param {Card | VCard} card
|
||||||
|
* @param {false | Player} [player]
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
defendingMount:(card,player)=>{
|
||||||
|
const subtype=get.subtype(card,player);
|
||||||
|
if(subtype=='equip3') return true;
|
||||||
|
else if(subtype=='equip6'){
|
||||||
|
const info=get.info(card,player),distance=info.distance;
|
||||||
|
if(!distance) return false;
|
||||||
|
if(distance.globalTo&&!info.notMount) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 判断坐骑栏是否被合并
|
* 判断坐骑栏是否被合并
|
||||||
*/
|
*/
|
||||||
|
@ -58918,7 +59047,7 @@
|
||||||
character:(name,num)=>{
|
character:(name,num)=>{
|
||||||
let info=lib.character[name];
|
let info=lib.character[name];
|
||||||
if(!info){
|
if(!info){
|
||||||
const pack=Object.keys(lib.characterPack).find(pack=>lib.characterPack[pack].hasOwnProperty(name));
|
const pack=Object.keys(lib.characterPack).find(pack=>Object.prototype.hasOwnProperty.call(lib.characterPack[pack], name));
|
||||||
if(pack) info=lib.characterPack[pack][name];
|
if(pack) info=lib.characterPack[pack][name];
|
||||||
}
|
}
|
||||||
if(info){
|
if(info){
|
||||||
|
@ -59117,7 +59246,7 @@
|
||||||
}
|
}
|
||||||
num=Math.floor(num/4);
|
num=Math.floor(num/4);
|
||||||
for(i=0;i<num-level;i++){
|
for(i=0;i<num-level;i++){
|
||||||
str=str.replace(/\n /g,'\n');
|
str=str.replace(/\n {4}/g,'\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -59290,7 +59419,7 @@
|
||||||
case 'purple':return '三对三对二';
|
case 'purple':return '三对三对二';
|
||||||
case 'zhong':return (config.double_character?'双将':'')+'忠胆英杰';
|
case 'zhong':return (config.double_character?'双将':'')+'忠胆英杰';
|
||||||
case 'stratagem':return get.cnNumber(parseInt(config.number))+'人'+(config.double_character?'双将':'')+'谋攻';
|
case 'stratagem':return get.cnNumber(parseInt(config.number))+'人'+(config.double_character?'双将':'')+'谋攻';
|
||||||
default:return get.cnNumber(parseInt(config.number))+'人'+(config.double_character?'双将':'')+'身份';
|
default:return `${get.cnNumber(parseInt(config.number))}人${config.double_nei?'双内':''}${config.enable_commoner?'带民':''}${config.double_character?'双将':''}身份`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(config.mode=='guozhan'){
|
else if(config.mode=='guozhan'){
|
||||||
|
@ -59976,7 +60105,7 @@
|
||||||
if(card.length==1) return get.suit(card[0],player);
|
if(card.length==1) return get.suit(card[0],player);
|
||||||
return 'none';
|
return 'none';
|
||||||
}
|
}
|
||||||
else if(!card.hasOwnProperty('suit')&&Array.isArray(card.cards)){
|
else if(!Object.prototype.hasOwnProperty.call(card, 'suit')&&Array.isArray(card.cards)){
|
||||||
return get.suit(card.cards,player);
|
return get.suit(card.cards,player);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -60028,7 +60157,7 @@
|
||||||
if(!card) return;
|
if(!card) return;
|
||||||
//狗卡你是真敢出啊
|
//狗卡你是真敢出啊
|
||||||
var number=null;
|
var number=null;
|
||||||
if(card.hasOwnProperty('number')){
|
if(Object.prototype.hasOwnProperty.call(card, 'number')){
|
||||||
number=card.number;
|
number=card.number;
|
||||||
if(typeof number!='number') number=null;
|
if(typeof number!='number') number=null;
|
||||||
}
|
}
|
||||||
|
@ -60561,7 +60690,7 @@
|
||||||
var result=function(){
|
var result=function(){
|
||||||
if(filter==arguments[i]) return true;
|
if(filter==arguments[i]) return true;
|
||||||
for(var j in filter){
|
for(var j in filter){
|
||||||
if(filter.hasOwnProperty(j)){
|
if(Object.prototype.hasOwnProperty.call(filter, j)){
|
||||||
if(get.itemtype(arguments[i])=='card'){
|
if(get.itemtype(arguments[i])=='card'){
|
||||||
if(j=='name'){
|
if(j=='name'){
|
||||||
if(Array.isArray(filter[j])){
|
if(Array.isArray(filter[j])){
|
||||||
|
@ -61008,7 +61137,12 @@
|
||||||
for(i=0;i<skills.length;i++){
|
for(i=0;i<skills.length;i++){
|
||||||
if(lib.skill[skills[i]]&&(lib.skill[skills[i]].nopop||lib.skill[skills[i]].equipSkill)) continue;
|
if(lib.skill[skills[i]]&&(lib.skill[skills[i]].nopop||lib.skill[skills[i]].equipSkill)) continue;
|
||||||
if(lib.translate[skills[i]+'_info']){
|
if(lib.translate[skills[i]+'_info']){
|
||||||
translation=lib.translate[skills[i]+'_ab']||get.translation(skills[i]).slice(0,2);
|
if(lib.translate[skills[i]+'_ab']) translation=lib.translate[skills[i]+'_ab'];
|
||||||
|
else{
|
||||||
|
translation=get.translation(skills[i]);
|
||||||
|
if(!lib.skill[skills[i]].nobracket) translation=translation.slice(0,2);
|
||||||
|
}
|
||||||
|
|
||||||
if(node.forbiddenSkills[skills[i]]){
|
if(node.forbiddenSkills[skills[i]]){
|
||||||
var forbidstr='<div style="opacity:0.5"><div class="skill">【'+translation+'】</div><div>';
|
var forbidstr='<div style="opacity:0.5"><div class="skill">【'+translation+'】</div><div>';
|
||||||
if(node.forbiddenSkills[skills[i]].length){
|
if(node.forbiddenSkills[skills[i]].length){
|
||||||
|
@ -61092,9 +61226,6 @@
|
||||||
intronode.listen(ui.click.skillbutton);
|
intronode.listen(ui.click.skillbutton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(lib.skill[skills[i]].nobracket){
|
|
||||||
uiintro.add('<div><div class="skilln">'+get.translation(skills[i])+'</div><div>'+get.skillInfoTranslation(skills[i],node)+'</div></div>');
|
|
||||||
}
|
|
||||||
else{
|
else{
|
||||||
uiintro.add('<div><div class="skill">【'+translation+'】</div><div>'+get.skillInfoTranslation(skills[i],node)+'</div></div>');
|
uiintro.add('<div><div class="skill">【'+translation+'】</div><div>'+get.skillInfoTranslation(skills[i],node)+'</div></div>');
|
||||||
}
|
}
|
||||||
|
@ -61790,13 +61921,14 @@
|
||||||
var skills=infoitem[3];
|
var skills=infoitem[3];
|
||||||
for(i=0;i<skills.length;i++){
|
for(i=0;i<skills.length;i++){
|
||||||
if(lib.translate[skills[i]+'_info']){
|
if(lib.translate[skills[i]+'_info']){
|
||||||
translation=lib.translate[skills[i]+'_ab']||get.translation(skills[i]).slice(0,2);
|
if(lib.translate[skills[i]+'_ab']) translation=lib.translate[skills[i]+'_ab'];
|
||||||
if(lib.skill[skills[i]]&&lib.skill[skills[i]].nobracket){
|
|
||||||
uiintro.add('<div><div class="skilln">'+get.translation(skills[i])+'</div><div>'+get.skillInfoTranslation(skills[i])+'</div></div>');
|
|
||||||
}
|
|
||||||
else{
|
else{
|
||||||
uiintro.add('<div><div class="skill">【'+translation+'】</div><div>'+get.skillInfoTranslation(skills[i])+'</div></div>');
|
translation=get.translation(skills[i]);
|
||||||
|
if(!lib.skill[skills[i]].nobracket) translation=translation.slice(0,2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uiintro.add('<div><div class="skill">【'+translation+'】</div><div>'+get.skillInfoTranslation(skills[i])+'</div></div>');
|
||||||
|
|
||||||
if(lib.translate[skills[i]+'_append']){
|
if(lib.translate[skills[i]+'_append']){
|
||||||
uiintro._place_text=uiintro.add('<div class="text">'+lib.translate[skills[i]+'_append']+'</div>')
|
uiintro._place_text=uiintro.add('<div class="text">'+lib.translate[skills[i]+'_append']+'</div>')
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,7 @@ var pinyin_dict_polyphone = {
|
||||||
"库特莉亚芙卡": " kǎ",
|
"库特莉亚芙卡": " kǎ",
|
||||||
"露娜": "lù ",
|
"露娜": "lù ",
|
||||||
// 技能名
|
// 技能名
|
||||||
|
"畜鸣": "chù ",
|
||||||
"聆乐": " yuè",
|
"聆乐": " yuè",
|
||||||
"没矢": "mò ",
|
"没矢": "mò ",
|
||||||
"没欲": "mò ",
|
"没欲": "mò ",
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
Binary file not shown.
After Width: | Height: | Size: 103 KiB |
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
Binary file not shown.
After Width: | Height: | Size: 87 KiB |
|
@ -4071,6 +4071,12 @@ span[data-nature='woodmm'] {
|
||||||
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 2px,
|
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 2px,
|
||||||
rgba(57, 123, 4,1) 0 0 2px,black 0 0 1px;
|
rgba(57, 123, 4,1) 0 0 2px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
|
.player .identity[data-color="commoner"],
|
||||||
|
div[data-nature='commoner'],
|
||||||
|
span[data-nature='commoner'] {
|
||||||
|
text-shadow: rgb(135, 135, 135, 1) 0 0 2px,rgba(135, 135, 135, 1) 0 0 5px,rgba(135, 135, 135, 1) 0 0 10px,
|
||||||
|
rgba(135, 135, 135, 1) 0 0 10px,rgba(135, 135, 135, 1) 0 0 20px,rgba(135, 135, 135, 1) 0 0 20px,black 0 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
.player .identity[data-color="cai"],
|
.player .identity[data-color="cai"],
|
||||||
.player .identity[data-color="bZhu"],
|
.player .identity[data-color="bZhu"],
|
||||||
|
|
|
@ -2268,7 +2268,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(current!=player&¤t.countCards('e')){
|
if(current!=player&¤t.countCards('e')){
|
||||||
player.line(current);
|
player.line(current);
|
||||||
current.discard(current.getCards('e'));
|
current.discard(current.getCards('e'));
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -8266,7 +8266,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(target.classList.contains('turnedover')) return -1;
|
if(target.classList.contains('turnedover')) return -1;
|
||||||
return 5-target.getDamagedHp();
|
return 5-target.getDamagedHp();
|
||||||
}
|
}
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
|
|
@ -2232,7 +2232,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
translate[i+'_info']=skill[i].prompt2;
|
translate[i+'_info']=skill[i].prompt2;
|
||||||
}
|
}
|
||||||
if(!skill[i].noGlobal) game.addGlobalSkill(i);
|
if(!skill[i].noGlobal) game.addGlobalSkill(i);
|
||||||
};
|
}
|
||||||
game.addVideo('arrangeLib',null,{
|
game.addVideo('arrangeLib',null,{
|
||||||
skill:{
|
skill:{
|
||||||
_jiazu_wei:{
|
_jiazu_wei:{
|
||||||
|
@ -2858,7 +2858,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
case 2:gain=5;add=1;break;
|
case 2:gain=5;add=1;break;
|
||||||
case 3:gain=6;add=1;break;
|
case 3:gain=6;add=1;break;
|
||||||
default:gain=6;add=2;break;
|
default:gain=6;add=2;break;
|
||||||
};
|
}
|
||||||
source.hp+=add;
|
source.hp+=add;
|
||||||
source.maxHp+=add;
|
source.maxHp+=add;
|
||||||
source.update();
|
source.update();
|
||||||
|
|
|
@ -5435,7 +5435,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
init:function(player){
|
init:function(player){
|
||||||
for(var i=1;i<6;i++){
|
for(var i=1;i<6;i++){
|
||||||
player.$disableEquip('equip'+i);
|
player.$disableEquip('equip'+i);
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
check:function(card){
|
check:function(card){
|
||||||
var player=_status.currentPhase;
|
var player=_status.currentPhase;
|
||||||
|
|
|
@ -50,7 +50,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
event.textnode.textContent='正在连接...';
|
event.textnode.textContent='正在连接...';
|
||||||
clearTimeout(event.timeout);
|
clearTimeout(event.timeout);
|
||||||
if(e) e.preventDefault();
|
if(e) e.preventDefault();
|
||||||
game.saveConfig('last_ip',node.textContent=node.textContent);
|
game.saveConfig('last_ip',node.textContent);
|
||||||
game.connect(node.textContent,function(success){
|
game.connect(node.textContent,function(success){
|
||||||
if(!success&&event.textnode){
|
if(!success&&event.textnode){
|
||||||
alert('连接失败');
|
alert('连接失败');
|
||||||
|
|
|
@ -365,7 +365,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
mode_guozhan:{
|
mode_guozhan:{
|
||||||
guozhan_default:["gz_caocao","gz_simayi","gz_xiahoudun","gz_zhangliao","gz_xuzhu","gz_guojia","gz_zhenji","gz_xiahouyuan","gz_zhanghe","gz_xuhuang","gz_caoren","gz_dianwei","gz_xunyu","gz_caopi","gz_yuejin","gz_liubei","gz_guanyu","gz_zhangfei","gz_zhugeliang","gz_zhaoyun","gz_machao","gz_huangyueying","gz_huangzhong","gz_weiyan","gz_pangtong","gz_sp_zhugeliang","gz_liushan","gz_menghuo","gz_zhurong","gz_ganfuren","gz_sunquan","gz_ganning","gz_lvmeng","gz_huanggai","gz_zhouyu","gz_daqiao","gz_luxun","gz_sunshangxiang","gz_sunjian","gz_xiaoqiao","gz_taishici","gz_zhoutai","gz_re_lusu","gz_zhangzhang","gz_dingfeng","gz_huatuo","gz_lvbu","gz_diaochan","gz_re_yuanshao","gz_yanwen","gz_jiaxu","gz_pangde","gz_zhangjiao","gz_caiwenji","gz_mateng","gz_kongrong","gz_jiling","gz_tianfeng","gz_panfeng","gz_zoushi",],
|
guozhan_default:["gz_caocao","gz_simayi","gz_xiahoudun","gz_zhangliao","gz_xuzhu","gz_guojia","gz_zhenji","gz_xiahouyuan","gz_zhanghe","gz_xuhuang","gz_caoren","gz_dianwei","gz_xunyu","gz_caopi","gz_yuejin","gz_liubei","gz_guanyu","gz_zhangfei","gz_zhugeliang","gz_zhaoyun","gz_machao","gz_huangyueying","gz_huangzhong","gz_weiyan","gz_pangtong","gz_sp_zhugeliang","gz_liushan","gz_menghuo","gz_zhurong","gz_ganfuren","gz_sunquan","gz_ganning","gz_lvmeng","gz_huanggai","gz_zhouyu","gz_daqiao","gz_luxun","gz_sunshangxiang","gz_sunjian","gz_xiaoqiao","gz_taishici","gz_zhoutai","gz_re_lusu","gz_zhangzhang","gz_dingfeng","gz_huatuo","gz_lvbu","gz_diaochan","gz_re_yuanshao","gz_yanwen","gz_jiaxu","gz_pangde","gz_zhangjiao","gz_caiwenji","gz_mateng","gz_kongrong","gz_jiling","gz_tianfeng","gz_panfeng","gz_zoushi",],
|
||||||
guozhan_zhen:["gz_dengai","gz_caohong","gz_jiangfei","gz_jiangwei","gz_xusheng","gz_jiangqing","gz_hetaihou","gz_yuji"],
|
guozhan_zhen:["gz_dengai","gz_caohong","gz_jiangfei","gz_jiangwei","gz_xusheng","gz_jiangqing","gz_hetaihou","gz_yuji"],
|
||||||
guozhan_shi:[,"gz_re_lidian","gz_zangba","gz_madai","gz_mifuren","gz_sunce","gz_chendong","gz_sp_dongzhuo","gz_zhangren"],
|
guozhan_shi:["gz_re_lidian","gz_zangba","gz_madai","gz_mifuren","gz_sunce","gz_chendong","gz_sp_dongzhuo","gz_zhangren"],
|
||||||
guozhan_bian:["gz_liqueguosi","gz_zuoci","gz_bianfuren","gz_xunyou","gz_lingtong","gz_lvfan","gz_masu","gz_shamoke",],
|
guozhan_bian:["gz_liqueguosi","gz_zuoci","gz_bianfuren","gz_xunyou","gz_lingtong","gz_lvfan","gz_masu","gz_shamoke",],
|
||||||
guozhan_quan:["gz_cuimao","gz_yujin","gz_wangping","gz_fazheng","gz_wuguotai","gz_lukang","gz_yuanshu","gz_zhangxiu"],
|
guozhan_quan:["gz_cuimao","gz_yujin","gz_wangping","gz_fazheng","gz_wuguotai","gz_lukang","gz_yuanshu","gz_zhangxiu"],
|
||||||
guozhan_jun:["gz_jun_caocao","gz_jun_sunquan","gz_jun_liubei","gz_jun_zhangjiao"],
|
guozhan_jun:["gz_jun_caocao","gz_jun_sunquan","gz_jun_liubei","gz_jun_zhangjiao"],
|
||||||
|
@ -1911,7 +1911,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
return get.suit(card)=='diamond'&&get.type2(card)!='trick'&&player.canUse(get.autoViewAs({name:'lebu'},[card]),event.target);
|
return get.suit(card)=='diamond'&&get.type2(card)!='trick'&&player.canUse(get.autoViewAs({name:'lebu'},[card]),event.target);
|
||||||
},'he')||player.hasCard(function(card){
|
},'he')||player.hasCard(function(card){
|
||||||
return get.suit(card)=='club'&&get.type2(card)!='trick'&&player.canUse(get.autoViewAs({name:'bingliang'},[card]),event.target,false);
|
return get.suit(card)=='club'&&get.type2(card)!='trick'&&player.canUse(get.autoViewAs({name:'bingliang'},[card]),event.target,false);
|
||||||
}),'he') return true;
|
},'he')) return true;
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
|
@ -4103,9 +4103,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
return '没有“戮”';
|
return '没有“戮”';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
content:function(storage,player){
|
// content:function(storage,player){
|
||||||
return '共有'+get.cnNumber(storage.length)+'张“戮”';
|
// return '共有'+get.cnNumber(storage.length)+'张“戮”';
|
||||||
},
|
// },
|
||||||
},
|
},
|
||||||
group:'gzshilu_zhiheng',
|
group:'gzshilu_zhiheng',
|
||||||
subSkill:{
|
subSkill:{
|
||||||
|
@ -4853,7 +4853,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
filterTarget:function(card,player,target){;
|
filterTarget:function(card,player,target){
|
||||||
if(player==target) return true;
|
if(player==target) return true;
|
||||||
if(player.identity=='unknown'){
|
if(player.identity=='unknown'){
|
||||||
var group='shu';
|
var group='shu';
|
||||||
|
@ -7806,7 +7806,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
trigger.source.chooseJunlingControl(player,result.junling,result.targets).set('prompt','补益').set('choiceList',choiceList).set('ai',function(){
|
trigger.source.chooseJunlingControl(player,result.junling,result.targets).set('prompt','补益').set('choiceList',choiceList).set('ai',function(){
|
||||||
if(get.recoverEffect(trigger.player,player,_status.event.player)>0) return 1;
|
if(get.recoverEffect(trigger.player,player,_status.event.player)>0) return 1;
|
||||||
return (get.attitude(trigger.source,trigger.player)<0&&get.junlingEffect(player,result.junling,trigger.source,result.targets,trigger.source)>=-2)?1:0;
|
return (get.attitude(trigger.source,trigger.player)<0&&get.junlingEffect(player,result.junling,trigger.source,result.targets,trigger.source)>=-2)?1:0;
|
||||||
return 0;
|
|
||||||
});
|
});
|
||||||
'step 2'
|
'step 2'
|
||||||
if(result.index==0) trigger.source.carryOutJunling(player,event.junling,targets);
|
if(result.index==0) trigger.source.carryOutJunling(player,event.junling,targets);
|
||||||
|
@ -8800,8 +8799,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
game.log(player,'获得了技能','#g【'+get.translation(result.control)+'】');
|
game.log(player,'获得了技能','#g【'+get.translation(result.control)+'】');
|
||||||
game.delay();
|
game.delay();
|
||||||
},
|
},
|
||||||
forceaudio:true,
|
// forceaudio:true,
|
||||||
audio:['xuanhuo',2],
|
// audio:['xuanhuo',2],
|
||||||
ai:{
|
ai:{
|
||||||
order:8,
|
order:8,
|
||||||
result:{player:1},
|
result:{player:1},
|
||||||
|
@ -8809,7 +8808,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
//used:{},
|
//used:{},
|
||||||
},
|
},
|
||||||
audio:['xuanhuo',2],
|
// audio:['xuanhuo',2],
|
||||||
},
|
},
|
||||||
fz_gzpaoxiao:{
|
fz_gzpaoxiao:{
|
||||||
audio:true,
|
audio:true,
|
||||||
|
@ -11132,7 +11131,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
backup:function(links,player){
|
backup:function(links,player){
|
||||||
return {
|
return {
|
||||||
filterCard:true,
|
filterCard:true,
|
||||||
audio:"qice",
|
audio:'qice_backup',
|
||||||
selectCard:-1,
|
selectCard:-1,
|
||||||
position:'h',
|
position:'h',
|
||||||
selectTarget:function(){
|
selectTarget:function(){
|
||||||
|
@ -11154,7 +11153,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
return lib.filter.filterTarget(card,player,target);
|
return lib.filter.filterTarget(card,player,target);
|
||||||
},
|
},
|
||||||
audio:'qice_backup',
|
|
||||||
popname:true,
|
popname:true,
|
||||||
viewAs:{name:links[0][2]},
|
viewAs:{name:links[0][2]},
|
||||||
ai1:function(){
|
ai1:function(){
|
||||||
|
@ -11887,7 +11885,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
};
|
}
|
||||||
if(trigger.name=='lose'){
|
if(trigger.name=='lose'){
|
||||||
for(var i of trigger.cards){
|
for(var i of trigger.cards){
|
||||||
if(i.name=='feilongduofeng'&&get.position(i,true)=='d') cards.push(i);
|
if(i.name=='feilongduofeng'&&get.position(i,true)=='d') cards.push(i);
|
||||||
|
@ -12342,7 +12340,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
return player.siege(event.target)&&event.player.siege(event.target);
|
return player.siege(event.target)&&event.player.siege(event.target);
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
audio:'zniaoxiang',
|
|
||||||
forceaudio:true,
|
forceaudio:true,
|
||||||
logTarget:'target',
|
logTarget:'target',
|
||||||
content:function(){
|
content:function(){
|
||||||
|
@ -12661,7 +12658,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
for(var i=0;i<skills.length;i++){
|
for(var i=0;i<skills.length;i++){
|
||||||
list.add(skills[i]);
|
list.add(skills[i]);
|
||||||
var info=lib.skill[skills[i]];
|
var info=lib.skill[skills[i]];
|
||||||
if(info.charlotte){list.splice(i--);continue};
|
if (info.charlotte) {
|
||||||
|
list.splice(i--);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(typeof info.derivation=='string'){
|
if(typeof info.derivation=='string'){
|
||||||
list.add(info.derivation);
|
list.add(info.derivation);
|
||||||
}
|
}
|
||||||
|
|
247
mode/identity.js
247
mode/identity.js
|
@ -186,6 +186,23 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
"step 4"
|
"step 4"
|
||||||
|
var yearLimitCheck=()=>{
|
||||||
|
var next=game.createEvent('year_limit_pop',false);
|
||||||
|
next.setContent(function(){
|
||||||
|
'step 0'
|
||||||
|
var str=get.cnNumber(game.shuffleNumber+1,true);
|
||||||
|
game.me.$fullscreenpop(`第${str}年`,'thunder');
|
||||||
|
game.log('游戏进入了',`#y第${str}年`);
|
||||||
|
if(game.shuffleNumber+1<game.countPlayer2()) event.finish();
|
||||||
|
else game.delay(2);
|
||||||
|
'step 1'
|
||||||
|
game.me.$fullscreenpop('年份已到','metal');
|
||||||
|
game.log('年份已到,主忠方判定为胜利');
|
||||||
|
game.delay(2);
|
||||||
|
'step 2'
|
||||||
|
game.over(game.me.identity=='zhu'||game.me.identity=='zhong'||game.me.identity=='mingzhong'||(game.me.identity=='commoner'&&game.me.isIn()));
|
||||||
|
});
|
||||||
|
};
|
||||||
if(_status.connectMode){
|
if(_status.connectMode){
|
||||||
_status.mode=lib.configOL.identity_mode;
|
_status.mode=lib.configOL.identity_mode;
|
||||||
if(_status.mode=='zhong'){
|
if(_status.mode=='zhong'){
|
||||||
|
@ -197,12 +214,45 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
else if(_status.mode=='purple'){
|
else if(_status.mode=='purple'){
|
||||||
lib.configOL.number=8;
|
lib.configOL.number=8;
|
||||||
}
|
}
|
||||||
|
else if(_status.mode=='normal'){
|
||||||
|
if(lib.configOL.enable_commoner||lib.configOL.double_nei){
|
||||||
|
var identity=lib.configOL.enable_commoner?'commoner':'nei';
|
||||||
|
for(var i=1;i<lib.config.mode_config.identity.identity.length;i++){
|
||||||
|
var list=lib.config.mode_config.identity.identity[i];
|
||||||
|
var toReplace;
|
||||||
|
if(list.filter(i=>i=='nei').length>=2) toReplace='nei';
|
||||||
|
else if(list.filter(i=>i=='zhong').length>list.filter(i=>i=='fan').length/2) toReplace='zhong';
|
||||||
|
else toReplace='fan';
|
||||||
|
list.remove(toReplace);
|
||||||
|
list.push(identity);
|
||||||
|
}
|
||||||
|
game.broadcast(identityList=>lib.config.mode_config.identity.identity=identityList,lib.config.mode_config.identity.identity);
|
||||||
|
}
|
||||||
|
}
|
||||||
if(lib.configOL.number<2){
|
if(lib.configOL.number<2){
|
||||||
lib.configOL.number=2;
|
lib.configOL.number=2;
|
||||||
}
|
}
|
||||||
|
if(_status.mode!='purple'&&lib.configOL.enable_year_limit){
|
||||||
|
lib.onwash.push(yearLimitCheck);
|
||||||
|
}
|
||||||
game.randomMapOL();
|
game.randomMapOL();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
if(_status.mode=='normal'&&(get.config('enable_commoner')||get.config('double_nei'))){
|
||||||
|
var identity=get.config('enable_commoner')?'commoner':'nei';
|
||||||
|
for(var i=1;i<lib.config.mode_config.identity.identity.length;i++){
|
||||||
|
var list=lib.config.mode_config.identity.identity[i];
|
||||||
|
var toReplace;
|
||||||
|
if(list.filter(i=>i=='nei').length>=2) toReplace='nei';
|
||||||
|
else if(list.filter(i=>i=='zhong').length>list.filter(i=>i=='fan').length/2) toReplace='zhong';
|
||||||
|
else toReplace='fan';
|
||||||
|
list.remove(toReplace);
|
||||||
|
list.push(identity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(_status.mode!='purple'&&get.config('enable_year_limit')){
|
||||||
|
lib.onwash.push(yearLimitCheck);
|
||||||
|
}
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
game.players[i].getId();
|
game.players[i].getId();
|
||||||
}
|
}
|
||||||
|
@ -420,9 +470,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(lib.configOL.identity_mode=='stratagem'){
|
if(lib.configOL.identity_mode=='stratagem'){
|
||||||
uiintro.add('<div class="text chat">首轮强化:'+(lib.configOL.round_one_use_fury?'开启':'关闭'));
|
uiintro.add('<div class="text chat">首轮强化:'+(lib.configOL.round_one_use_fury?'开启':'关闭'));
|
||||||
}
|
}
|
||||||
else{
|
else if(lib.configOL.identity_mode!='purple'){
|
||||||
uiintro.add('<div class="text chat">双内奸:'+(lib.configOL.double_nei?'开启':'关闭'));
|
uiintro.add('<div class="text chat">双内奸:'+(lib.configOL.double_nei?'开启':'关闭'));
|
||||||
|
if(lib.configOL.identity_mode!='stratagem'){
|
||||||
uiintro.add('<div class="text chat">加强主公:'+(lib.configOL.enhance_zhu?'开启':'关闭'));
|
uiintro.add('<div class="text chat">加强主公:'+(lib.configOL.enhance_zhu?'开启':'关闭'));
|
||||||
|
uiintro.add('<div class="text chat">平民身份:'+(lib.configOL.enable_commoner?'开启':'关闭'));
|
||||||
|
}
|
||||||
|
uiintro.add('<div class="text chat">年机制:'+(lib.configOL.enable_year_limit?'开启':'关闭'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -505,6 +559,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
fan:'反',
|
fan:'反',
|
||||||
zhong:'忠',
|
zhong:'忠',
|
||||||
nei:'内',
|
nei:'内',
|
||||||
|
commoner:'民',
|
||||||
cai:'猜',
|
cai:'猜',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -515,6 +570,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
case 'fan':list[i]='反贼';break;
|
case 'fan':list[i]='反贼';break;
|
||||||
case 'zhong':list[i]='忠臣';break;
|
case 'zhong':list[i]='忠臣';break;
|
||||||
case 'nei':list[i]='内奸';break;
|
case 'nei':list[i]='内奸';break;
|
||||||
|
case 'commoner':list[i]='平民'; break;
|
||||||
case 'zhu':list[i]='主公';break;
|
case 'zhu':list[i]='主公';break;
|
||||||
case 'enemy':list[i]='敌方';break;
|
case 'enemy':list[i]='敌方';break;
|
||||||
case 'friend':list[i]='友方';break;
|
case 'friend':list[i]='友方';break;
|
||||||
|
@ -536,9 +592,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
switch(_status.mode){
|
switch(_status.mode){
|
||||||
case 'purple':str2='3v3v2 - '+(game.me.identity.indexOf('r')==0?'暖色':'冷色')+lib.translate[game.me.identity+'2'];break;
|
case 'purple':str2='3v3v2 - '+(game.me.identity.indexOf('r')==0?'暖色':'冷色')+lib.translate[game.me.identity+'2'];break;
|
||||||
case 'zhong':str2='忠胆英杰 - '+lib.translate[game.me.identity+'2'];break;
|
case 'zhong':str2='忠胆英杰 - '+lib.translate[game.me.identity+'2'];break;
|
||||||
case 'stratagem':str2=get.cnNumber(get.playerNumber())+'人谋攻'+'-'+lib.translate[game.me.identity+'2'];
|
case 'stratagem':str2=get.cnNumber(get.playerNumber())+'人谋攻'+'-'+lib.translate[game.me.identity+'2'];break;
|
||||||
default:str2=get.cnNumber(get.playerNumber())+'人'+
|
default:str2=get.cnNumber(get.playerNumber())+'人'+get.translation(lib.config.mode)+' - '+lib.translate[game.me.identity+'2']
|
||||||
get.translation(lib.config.mode)+' - '+lib.translate[game.me.identity+'2']
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var name=[
|
var name=[
|
||||||
|
@ -563,7 +618,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
else{
|
else{
|
||||||
data[identity][1]++;
|
data[identity][1]++;
|
||||||
}
|
}
|
||||||
var list=['zhu','zhong','nei','fan'];
|
var list=['zhu','zhong','nei','fan','commoner'];
|
||||||
var str='';
|
var str='';
|
||||||
for(var i=0;i<list.length;i++){
|
for(var i=0;i<list.length;i++){
|
||||||
if(data[list[i]]){
|
if(data[list[i]]){
|
||||||
|
@ -672,6 +727,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
switch(me.identity){
|
switch(me.identity){
|
||||||
case 'fan':game.over(false);break;
|
case 'fan':game.over(false);break;
|
||||||
case 'zhong':game.over(true);break;
|
case 'zhong':game.over(true);break;
|
||||||
|
case 'commoner':game.over(true); break;
|
||||||
default:game.over();break;
|
default:game.over();break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -679,6 +735,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
switch(me.identity){
|
switch(me.identity){
|
||||||
case 'fan':game.over(true);break;
|
case 'fan':game.over(true);break;
|
||||||
case 'zhong':game.over(false);break;
|
case 'zhong':game.over(false);break;
|
||||||
|
case 'commoner':game.over(true); break;
|
||||||
default:game.over();break;
|
default:game.over();break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -698,14 +755,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(me.identity=='nei'){
|
else if(me.identity=='nei'){
|
||||||
if(game.players.length==1&&me.isAlive()){
|
if(game.players.length==(1+game.players.filter(i=>i.identity=='commoner').length)&&me.isAlive()){
|
||||||
game.over(true);
|
game.over(true);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
game.over(false);
|
game.over(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else if(me.identity=='fan'){
|
||||||
if((get.population('fan')+get.population('zhong')>0||get.population('nei')>1)&&
|
if((get.population('fan')+get.population('zhong')>0||get.population('nei')>1)&&
|
||||||
game.zhu.classList.contains('dead')){
|
game.zhu.classList.contains('dead')){
|
||||||
game.over(true);
|
game.over(true);
|
||||||
|
@ -714,6 +771,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
game.over(false);
|
game.over(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(me.identity=='commoner'){
|
||||||
|
game.over(true);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
checkOnlineResult:function(player){
|
checkOnlineResult:function(player){
|
||||||
if(_status.winner&&_status.loser){
|
if(_status.winner&&_status.loser){
|
||||||
|
@ -722,13 +782,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(_status.winner.contains(player)) return true;
|
if(_status.winner.contains(player)) return true;
|
||||||
}
|
}
|
||||||
if(game.zhu.isAlive()){
|
if(game.zhu.isAlive()){
|
||||||
return (player.identity=='zhu'||player.identity=='zhong'||player.identity=='mingzhong');
|
return (player.identity=='zhu'||player.identity=='zhong'||player.identity=='mingzhong'||player.identity=='commoner'&&player.isAlive());
|
||||||
}
|
}
|
||||||
else if(game.players.length==1&&game.players[0].identity=='nei'){
|
else if(game.players.length==(1+game.players.filter(i=>i.identity=='commoner').length)&&game.players[0].identity=='nei'||game.players[0].identity=='commoner'){
|
||||||
return player.isAlive();
|
return player.isAlive();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return player.identity=='fan';
|
return player.identity=='fan'||player.identity=='commoner'&&player.isAlive();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
chooseCharacterPurpleOL:function(){
|
chooseCharacterPurpleOL:function(){
|
||||||
|
@ -828,7 +888,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
var players=[game.rZhu,game.bZhu];
|
var players=[game.rZhu,game.bZhu];
|
||||||
var list=[];
|
var list=[];
|
||||||
for(var i=0;i<players.length;i++){
|
for(var i=0;i<players.length;i++){
|
||||||
if(true){
|
|
||||||
var group=event[players[i].identity];
|
var group=event[players[i].identity];
|
||||||
var str='选择角色';
|
var str='选择角色';
|
||||||
var list2=event.map[group].randomGets(4);
|
var list2=event.map[group].randomGets(4);
|
||||||
|
@ -836,7 +895,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
event.map[players[i].playerid]=list2;
|
event.map[players[i].playerid]=list2;
|
||||||
list.push([players[i],[str,[list2,'character']],true]);
|
list.push([players[i],[str,[list2,'character']],true]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
game.me.chooseButtonOL(list,function(player,result){
|
game.me.chooseButtonOL(list,function(player,result){
|
||||||
if(game.online||player==game.me){
|
if(game.online||player==game.me){
|
||||||
player.init(result.links[0]);
|
player.init(result.links[0]);
|
||||||
|
@ -874,14 +932,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
var players=game.players.slice(0);
|
var players=game.players.slice(0);
|
||||||
players.removeArray([game.rZhu,game.bZhu]);
|
players.removeArray([game.rZhu,game.bZhu]);
|
||||||
for(var i=0;i<players.length;i++){
|
for(var i=0;i<players.length;i++){
|
||||||
if(true){
|
|
||||||
var group=event[players[i].identity.slice(0,1)+'Zhu'];
|
var group=event[players[i].identity.slice(0,1)+'Zhu'];
|
||||||
var str='选择角色';
|
var str='选择角色';
|
||||||
var list2=event.map[group].randomRemove(event.mapNum[group]);
|
var list2=event.map[group].randomRemove(event.mapNum[group]);
|
||||||
event.map[players[i].playerid]=list2;
|
event.map[players[i].playerid]=list2;
|
||||||
list.push([players[i],[str,[list2,'character']],true]);
|
list.push([players[i],[str,[list2,'character']],true]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
game.me.chooseButtonOL(list,function(player,result){
|
game.me.chooseButtonOL(list,function(player,result){
|
||||||
if(game.online||player==game.me){
|
if(game.online||player==game.me){
|
||||||
player.init(result.links[0]);
|
player.init(result.links[0]);
|
||||||
|
@ -1203,8 +1259,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
else{
|
else{
|
||||||
result[i]=result[i].links;
|
result[i]=result[i].links;
|
||||||
}
|
}
|
||||||
if(get.is.double(result[i][0])||
|
if(get.is.double(result[i][0])||lib.character[result[i][0]]&&lib.character[result[i][0]][1]=='shen'&&!lib.character[result[i][0]][4].contains('hiddenSkill')) shen.push(lib.playerOL[i]);
|
||||||
lib.character[result[i][0]]&&lib.character[result[i][0]][1]=='shen'&&!lib.character[result[i][0]][4].contains('hiddenSkill')) shen.push(lib.playerOL[i]);
|
|
||||||
}
|
}
|
||||||
event.result2=result;
|
event.result2=result;
|
||||||
if(shen.length){
|
if(shen.length){
|
||||||
|
@ -1436,34 +1491,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
else{
|
else{
|
||||||
if(_status.mode=='stratagem') event.stratagemMode=true;
|
if(_status.mode=='stratagem') event.stratagemMode=true;
|
||||||
identityList=get.identityList(game.players.length);
|
identityList=get.identityList(game.players.length);
|
||||||
if(get.config('double_nei')){
|
|
||||||
switch(get.playerNumber()){
|
|
||||||
case 8:
|
|
||||||
identityList.remove('fan');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
identityList.remove('zhong');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
identityList.remove('fan');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
identityList.remove('fan');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
identityList.remove('zhong');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
identityList.remove('fan');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
var stratagemMode=event.stratagemMode;
|
var stratagemMode=event.stratagemMode;
|
||||||
|
|
||||||
|
@ -1480,6 +1507,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
listi=['random','zhu','zhong','fan','nei'];
|
listi=['random','zhu','zhong','fan','nei'];
|
||||||
|
if(get.config('enable_commoner')) listi.push('commoner');
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var i=0;i<listi.length;i++){
|
for(var i=0;i<listi.length;i++){
|
||||||
|
@ -1519,7 +1547,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
link=['zhu','zhong','nei','fan','mingzhong'].randomGet();
|
link=['zhu','zhong','nei','fan','mingzhong'].randomGet();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
link=['zhu','zhong','nei','fan'].randomGet();
|
var listi=['zhu','zhong','nei','fan'];
|
||||||
|
if(get.config('enable_commoner')) listi.push('commoner');
|
||||||
|
link=listi.randomGet();
|
||||||
}
|
}
|
||||||
for(var i=0;i<this.parentNode.childElementCount;i++){
|
for(var i=0;i<this.parentNode.childElementCount;i++){
|
||||||
if(this.parentNode.childNodes[i].link==link){
|
if(this.parentNode.childNodes[i].link==link){
|
||||||
|
@ -1667,7 +1697,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(ban_identity.length){
|
if(ban_identity.length){
|
||||||
var identityList2=identityList.slice(0);
|
var identityList2=identityList.slice(0);
|
||||||
for(var i=0;i<ban_identity.length;i++){
|
for(var i=0;i<ban_identity.length;i++){
|
||||||
while(identityList2.remove(ban_identity[i]));
|
while(identityList2.includes(ban_identity[i])){
|
||||||
|
identityList2.remove(ban_identity[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ban_identity=identityList2.randomGet();
|
ban_identity=identityList2.randomGet();
|
||||||
identityList.remove(ban_identity);
|
identityList.remove(ban_identity);
|
||||||
|
@ -1779,7 +1811,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
else{
|
else{
|
||||||
list3.push(i);
|
list3.push(i);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
var getZhuList=function(){
|
var getZhuList=function(){
|
||||||
if(stratagemMode){
|
if(stratagemMode){
|
||||||
list2.sort(lib.sort.character);
|
list2.sort(lib.sort.character);
|
||||||
|
@ -2121,34 +2153,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
identityList=get.identityList(game.players.length);
|
identityList=get.identityList(game.players.length);
|
||||||
if(lib.configOL.double_nei){
|
|
||||||
switch(lib.configOL.number){
|
|
||||||
case 8:
|
|
||||||
identityList.remove('fan');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
identityList.remove('zhong');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
identityList.remove('fan');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
identityList.remove('fan');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
identityList.remove('zhong');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
identityList.remove('fan');
|
|
||||||
identityList.push('nei');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
identityList.randomSort();
|
identityList.randomSort();
|
||||||
for(i=0;i<game.players.length;i++){
|
for(i=0;i<game.players.length;i++){
|
||||||
|
@ -2542,6 +2546,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
mingzhong:"忠",
|
mingzhong:"忠",
|
||||||
nei:"内",
|
nei:"内",
|
||||||
fan:"反",
|
fan:"反",
|
||||||
|
commoner:'民',
|
||||||
cai:"猜",
|
cai:"猜",
|
||||||
cai2:"猜",
|
cai2:"猜",
|
||||||
rZhu:"主",
|
rZhu:"主",
|
||||||
|
@ -2565,6 +2570,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
mingzhong2:"明忠",
|
mingzhong2:"明忠",
|
||||||
nei2:"内奸",
|
nei2:"内奸",
|
||||||
fan2:"反贼",
|
fan2:"反贼",
|
||||||
|
commoner2:'平民',
|
||||||
random2:"随机",
|
random2:"随机",
|
||||||
enemy:'敌',
|
enemy:'敌',
|
||||||
friend:'友',
|
friend:'友',
|
||||||
|
@ -2674,12 +2680,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
});
|
});
|
||||||
if(player){
|
if(player){
|
||||||
player.showIdentity();
|
player.showIdentity();
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.identity=='fan'&&source) source.draw(3);
|
if(this.identity=='fan'&&source) source.draw(3);
|
||||||
|
else if(this.identity=='commoner'&&source) source.draw(2);
|
||||||
else if(this.identity=='mingzhong'&&source){
|
else if(this.identity=='mingzhong'&&source){
|
||||||
if(source.identity=='zhu'){
|
if(source.identity=='zhu'){
|
||||||
source.discard(source.getCards('he'));
|
source.discard(source.getCards('he'));
|
||||||
|
@ -2725,10 +2732,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
});
|
});
|
||||||
if(red.length<=1&&blue.length<=1) game.broadcastAll(game.showIdentity);
|
if(red.length<=1&&blue.length<=1) game.broadcastAll(game.showIdentity);
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
if(game.zhu&&game.zhu.isZhu){
|
if(game.zhu&&game.zhu.isZhu){
|
||||||
if(get.population('zhong')+get.population('nei')==0||
|
if((get.population('zhong')+get.population('nei')==0||
|
||||||
get.population('zhong')+get.population('fan')==0){
|
get.population('zhong')+get.population('fan')==0)&&get.population('commoner')==0){
|
||||||
game.broadcastAll(function(){
|
game.broadcastAll(function(){
|
||||||
if(game.showIdentity) game.showIdentity();
|
if(game.showIdentity) game.showIdentity();
|
||||||
if(game.zhu&&game.zhu.isAlive()&&get.population('nei')==1&&get.config('nei_fullscreenpop')) game.me.$fullscreenpop('<span style="font-family:xinwei"><span data-nature="fire">主公</span><span data-nature="soil"> vs </span><span data-nature="thunder">内奸</span></span>',null,null,false);
|
if(game.zhu&&game.zhu.isAlive()&&get.population('nei')==1&&get.config('nei_fullscreenpop')) game.me.$fullscreenpop('<span style="font-family:xinwei"><span data-nature="fire">主公</span><span data-nature="soil"> vs </span><span data-nature="thunder">内奸</span></span>',null,null,false);
|
||||||
|
@ -2832,7 +2839,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
else if(targets.length==1) this.ai.shown+=0.2*c;
|
else if(targets.length==1) this.ai.shown+=0.2*c;
|
||||||
else this.ai.shown+=0.1*c;
|
else this.ai.shown+=0.1*c;
|
||||||
}
|
}
|
||||||
else if(effect<0&&this==game.me&&['nei','rYe','bYe'].contains(game.me.identity)){
|
else if(effect<0&&this==game.me&&['nei','commoner','rYe','bYe'].contains(game.me.identity)){
|
||||||
if(targets.length==1&&targets[0]==this);
|
if(targets.length==1&&targets[0]==this);
|
||||||
else if(targets.length==1) this.ai.shown-=0.2;
|
else if(targets.length==1) this.ai.shown-=0.2;
|
||||||
else this.ai.shown-=0.1;
|
else this.ai.shown-=0.1;
|
||||||
|
@ -2864,7 +2871,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(targets.length==1&&targets[0]==this){
|
if(targets.length==1&&targets[0]==this){
|
||||||
effect=0;
|
effect=0;
|
||||||
}
|
}
|
||||||
else if(this.identity!='nei'){
|
else if(this.identity!='nei'&&this.identity!='commoner'){
|
||||||
if(this.ai.shown>0){
|
if(this.ai.shown>0){
|
||||||
if(this.identity=='fan'){
|
if(this.identity=='fan'){
|
||||||
effect=-1;
|
effect=-1;
|
||||||
|
@ -2884,7 +2891,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
effect+=get.effect(targets[i],card,this,zhu)*c;
|
effect+=get.effect(targets[i],card,this,zhu)*c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.identity=='nei'){
|
if(this.identity=='nei'||this.identity=='commoner'){
|
||||||
if(effect>0){
|
if(effect>0){
|
||||||
if(this.ai.identity_mark=='fan'){
|
if(this.ai.identity_mark=='fan'){
|
||||||
if(marknow) this.setIdentity();
|
if(marknow) this.setIdentity();
|
||||||
|
@ -3160,7 +3167,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
return x/num;
|
return x/num;
|
||||||
}
|
}
|
||||||
var real=get.realAttitude(from,to),zhibi=from.storage.zhibi,stratagem_expose=from.storage.stratagem_expose,followCamouflage=true;
|
var real=get.realAttitude(from,to),zhibi=from.storage.zhibi,stratagem_expose=from.storage.stratagem_expose,followCamouflage=true;
|
||||||
if(to.ai.shown) return to.ai.shown*(real+(from.identity==to.identity||from.identity=='zhu'&&to.identity=='zhong'||from.identity=='zhong'&&to.identity=='zhu'||(to.identity=='nei'&&get.situation()<=0&&['zhu','zhong'].contains(from.identity)||get.situation()>=3&&from.identity=='fan')?3:-3))
|
if(to.ai.shown) return to.ai.shown*(real+(from.identity==to.identity||from.identity=='zhu'&&to.identity=='zhong'||from.identity=='zhong'&&to.identity=='zhu'||from.identity=='nei'&&to.identity=='zhu'&&get.situation()<=1||(to.identity=='nei'&&get.situation()<=0&&['zhu','zhong'].contains(from.identity)||get.situation()>=3&&from.identity=='fan')?2.9:-2.9))
|
||||||
if(from==to||to.identityShown||((stratagem_expose&&stratagem_expose.contains(to))||(zhibi&&zhibi.contains(to)))&&!to.ai.stratagemCamouflage) return real*1.1;
|
if(from==to||to.identityShown||((stratagem_expose&&stratagem_expose.contains(to))||(zhibi&&zhibi.contains(to)))&&!to.ai.stratagemCamouflage) return real*1.1;
|
||||||
if(from.identity=='nei'&&to.ai.stratagemCamouflage) return real*1.1;
|
if(from.identity=='nei'&&to.ai.stratagemCamouflage) return real*1.1;
|
||||||
if(to.identity=='nei'){
|
if(to.identity=='nei'){
|
||||||
|
@ -3246,7 +3253,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var aishown=to.ai.shown;
|
var aishown=to.ai.shown;
|
||||||
if(to.identity=='nei'&&to.ai.shown<1&&(to.ai.identity_mark=='fan'||to.ai.identity_mark=='zhong')){
|
if((to.identity=='nei'||to.identity=='commoner')&&to.ai.shown<1&&(to.ai.identity_mark=='fan'||to.ai.identity_mark=='zhong')){
|
||||||
aishown=0.5;
|
aishown=0.5;
|
||||||
}
|
}
|
||||||
else if(aishown==0&&to.identity!='fan'&&to.identity!='zhu'){
|
else if(aishown==0&&to.identity!='fan'&&to.identity!='zhu'){
|
||||||
|
@ -3455,7 +3462,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
//正常身份模式态度
|
//正常身份模式态度
|
||||||
if(!game.zhu){
|
if(!game.zhu){
|
||||||
if(from.identity=='nei'||to.identity=='nei') return -1;
|
if(from.identity=='nei'||to.identity=='nei'||from.identity=='commoner'||to.identity=='commoner') return -1;
|
||||||
if(from.identity==to.identity) return 6;
|
if(from.identity==to.identity) return 6;
|
||||||
return -6;
|
return -6;
|
||||||
}
|
}
|
||||||
|
@ -3469,13 +3476,18 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(from!=to&&to.identity=='nei'&&to.ai.shown<1&&(to.ai.identity_mark=='fan'||to.ai.identity_mark=='zhong')){
|
if(from!=to&&to.identity=='nei'&&to.ai.shown<1&&(to.ai.identity_mark=='fan'||to.ai.identity_mark=='zhong')){
|
||||||
identity2=to.ai.identity_mark;
|
identity2=to.ai.identity_mark;
|
||||||
}
|
}
|
||||||
if(from.identity!='nei'&&from!=to&&get.population('fan')==0&&identity2=='zhong'){
|
if(from.identity!='nei'&&from.identity!='commoner'&&from!=to&&get.population('fan')==0&&identity2=='zhong'){
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
if(game.players[i].identity=='nei'&&
|
if(game.players[i].identity=='nei'&&
|
||||||
game.players[i].ai.identity_mark=='zhong'&&
|
game.players[i].ai.identity_mark=='zhong'&&
|
||||||
game.players[i].ai.shown<1){
|
game.players[i].ai.shown<1){
|
||||||
identity2='nei';break;
|
identity2='nei';break;
|
||||||
}
|
}
|
||||||
|
else if(game.players[i].identity=='commoner'&&
|
||||||
|
game.players[i].ai.identity_mark=='zhong'&&
|
||||||
|
game.players[i].ai.shown<1){
|
||||||
|
identity2='commoner'; break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var zhongmode=false;
|
var zhongmode=false;
|
||||||
|
@ -3527,6 +3539,29 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
return -4;
|
return -4;
|
||||||
|
case 'commoner':
|
||||||
|
if(to.identity=='zhong') return 0;
|
||||||
|
if(get.population('fan')==0){
|
||||||
|
if(to.ai.identity_mark=='zhong'&&to.ai.shown<1) return 0;
|
||||||
|
return -0.5;
|
||||||
|
}
|
||||||
|
if(zhongmode&&to.ai.sizhong&&to.ai.shown<1) return 6;
|
||||||
|
if(game.players.length==3){
|
||||||
|
var fan;
|
||||||
|
for(var i=0; i<game.players.length; i++){
|
||||||
|
if(game.players[i].identity=='fan'){
|
||||||
|
fan=game.players[i]; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(fan){
|
||||||
|
if(to.hp>1&&to.hp>fan.hp&&to.countCards('he')>fan.countCards('he')){
|
||||||
|
return -3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
if(situation<0&&game.zhu&&game.zhu.hp<=2) return -3.8;
|
||||||
|
return 2-get.population('fan');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'zhong':case 'mingzhong':
|
case 'zhong':case 'mingzhong':
|
||||||
|
@ -3538,11 +3573,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(zhongmode&&to.ai.sizhong&&to.ai.shown<1) return 6;
|
if(zhongmode&&to.ai.sizhong&&to.ai.shown<1) return 6;
|
||||||
return Math.min(3,-situation);
|
return Math.min(3,-situation);
|
||||||
case 'fan': return -8;
|
case 'fan': return -8;
|
||||||
|
case 'commoner':
|
||||||
|
return Math.min(3,Math.max(-3,situation));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'nei':
|
case 'nei':
|
||||||
if(identity2=='zhu'&&game.players.length==2) return -10;
|
if(identity2=='zhu'&&game.players.length==2) return -10;
|
||||||
if(from!=to&&identity2!='zhu'&&game.players.length==3) return -8;
|
if(from!=to&&identity2!='zhu'&&identity2!='commoner'&&game.players.length==3) return -8;
|
||||||
var strategy=get.aiStrategy();
|
var strategy=get.aiStrategy();
|
||||||
if(strategy==4){
|
if(strategy==4){
|
||||||
if(from==to) return 10;
|
if(from==to) return 10;
|
||||||
|
@ -3620,6 +3657,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(strategy==2) num++;
|
if(strategy==2) num++;
|
||||||
if(strategy==3) num--;
|
if(strategy==3) num--;
|
||||||
return num;
|
return num;
|
||||||
|
case 'commoner':
|
||||||
|
if(game.players.length<=4) return 5;
|
||||||
|
return Math.min(Math.max(-situation,-2),2);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'fan':
|
case 'fan':
|
||||||
|
@ -3643,7 +3683,35 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(game.zhu&&game.zhu.hp<=2) return -1;
|
if(game.zhu&&game.zhu.hp<=2) return -1;
|
||||||
return Math.min(3,situation);
|
return Math.min(3,situation);
|
||||||
case 'fan': return 5;
|
case 'fan': return 5;
|
||||||
|
case 'commoner':
|
||||||
|
return 2*get.population('fan')-2;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case 'commoner':
|
||||||
|
switch(identity2){
|
||||||
|
case 'zhu':
|
||||||
|
if(situation>0) return 2*Math.min(4,(to.hp+to.countCards('h')/4-2));
|
||||||
|
if(situation>=-3&&game.zhu) return (to.hp-2)+to.countCards('h')/4; //return Math.min(-0.1,5-game.zhu.hp);
|
||||||
|
return to.hp+to.countCards('h')/3-4;
|
||||||
|
case 'zhong':
|
||||||
|
if(situation>0){
|
||||||
|
if(to.hp>=2) return Math.min(3,Math.max(1,to.hp+to.countCards('h')/4-4));
|
||||||
|
else return 0;
|
||||||
|
}
|
||||||
|
return -2;
|
||||||
|
case 'nei':
|
||||||
|
if(game.players.length==3&&get.population('nei')==1) return Math.min(3.5,(to.hp-1.5)+to.countCards('h')/3)-(to.hp<(game.zhu?game.zhu.hp:0)?4:0);
|
||||||
|
if(game.players.length<=4&&get.population('nei')==1) return Math.min(5,(to.hp-1.5)+to.countCards('h')/3);
|
||||||
|
if(situation>0) return -3;
|
||||||
|
return 0;
|
||||||
|
case 'fan':
|
||||||
|
if(situation<0) return to.hp+to.countCards('h')/4-1.7*get.population('fan')+2;
|
||||||
|
else if(situation==0) return 0;
|
||||||
|
return 0.55*get.population('fan')-2.1;
|
||||||
|
case 'commoner':
|
||||||
|
return from==to?10:(to.hp<=2?-2:0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
situation:function(absolute){
|
situation:function(absolute){
|
||||||
|
@ -4088,7 +4156,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
help:{
|
help:{
|
||||||
'身份模式':'<div style="margin:10px">选项</div><ul style="margin-top:0"><li>加强主公<br>反贼人数多于2时主公会额外增加一个技能(每个主公的额外技能固定,非常备主公增加天命)<li>特殊身份<br><ul style="padding-left:20px;padding-top:5px"><li>军师:忠臣身份。只要军师存活,主公在准备阶段开始时,可以观看牌堆顶的三张牌,然后将这些牌以任意顺序置于牌堆顶或牌堆底<li>大将:忠臣身份。只要大将存活,主公手牌上限+1<li>贼首:反贼身份,只要贼首存活,主公手牌上限-1</ul></ul>',
|
'身份模式':'<div style="margin:10px">选项</div><ul style="margin-top:0"><li>加强主公<br>反贼人数多于2时主公会额外增加一个技能(每个主公的额外技能固定,非常备主公增加天命)'+
|
||||||
|
'<li>特殊身份<br><ul style="padding-left:20px;padding-top:5px"><li>军师:忠臣身份。只要军师存活,主公在准备阶段开始时,可以观看牌堆顶的三张牌,然后将这些牌以任意顺序置于牌堆顶或牌堆底<li>大将:忠臣身份。只要大将存活,主公手牌上限+1<li>贼首:反贼身份,只要贼首存活,主公手牌上限-1</ul></ul>'+
|
||||||
|
'<li>平民身份<br>英盗版三国杀于2017标准版中提出的新概念。平民的获胜条件为:当其他身份的角色达成了其获胜条件,且你存活,你也获胜;同时内奸的获胜条件改为:主公死亡时,场上所有忠臣和反贼均已死亡。即内奸可以和与平民共同胜利。杀死平民的角色的奖惩为:摸两张牌。'+
|
||||||
|
'<li>年机制<br>英盗版三国杀于2019标准版中提出的新概念。“年”是一个全局概念,游戏开始时为第一年,当牌堆洗牌时,年数+1。一局游戏的限定年数为本局游戏开始时玩家总数。当年数增加后,若当前年数已超过限定年数,则主忠方直接获胜,若平民存活则平民也获胜。',
|
||||||
'明忠模式':'<div style="margin:10px">明忠模式(忠胆英杰)</div><ul style="margin-top:0"><li>本模式需要8名玩家进行游戏,使用的身份牌为:1主公、2忠臣、4反贼和1内奸。游戏开始时,每名玩家随机获得一个身份,由系统随机选择一名忠臣身份的玩家亮出身份(将忠臣牌正面朝上放在面前),其他身份(包括主公)的玩家不亮出身份。<li>'+
|
'明忠模式':'<div style="margin:10px">明忠模式(忠胆英杰)</div><ul style="margin-top:0"><li>本模式需要8名玩家进行游戏,使用的身份牌为:1主公、2忠臣、4反贼和1内奸。游戏开始时,每名玩家随机获得一个身份,由系统随机选择一名忠臣身份的玩家亮出身份(将忠臣牌正面朝上放在面前),其他身份(包括主公)的玩家不亮出身份。<li>'+
|
||||||
'首先由亮出身份的忠臣玩家随机获得六张武将牌,挑选一名角色,并将选好的武将牌展示给其他玩家。之后其余每名玩家随机获得三张武将牌,各自从其中挑选一张同时亮出<li>'+
|
'首先由亮出身份的忠臣玩家随机获得六张武将牌,挑选一名角色,并将选好的武将牌展示给其他玩家。之后其余每名玩家随机获得三张武将牌,各自从其中挑选一张同时亮出<li>'+
|
||||||
'亮出身份牌的忠臣增加1点体力上限。角色濒死和死亡的结算及胜利条件与普通身份局相同。',
|
'亮出身份牌的忠臣增加1点体力上限。角色濒死和死亡的结算及胜利条件与普通身份局相同。',
|
||||||
|
|
Loading…
Reference in New Issue