v1.9.95.4

This commit is contained in:
Spmario233 2019-11-22 13:21:06 +08:00 committed by GitHub
parent 810d156e21
commit 57b207be03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 84 additions and 49 deletions

View File

@ -2465,8 +2465,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
"shufazijinguan_skill":{
equipSkill:true,
trigger:{
player:"phaseBegin",
player:"phaseZhunbeiBegin",
},
direct:true,
content:function(){
@ -2484,30 +2485,31 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
"linglongshimandai_skill":{
equipSkill:true,
trigger:{
global:["useCard"],
target:"useCardToTargeted",
},
filter:function(event,player){
if(event.targets&&event.targets.length>1) return false;
if(event.targets&&event.targets.length>1||event.player==player) return false;
if(player.hasSkillTag('unequip2')) return false;
var evt=event.getParent();
if(evt.player&&evt.player.hasSkillTag('unequip',false,{
name:evt.card?evt.card.name:null,
target:player,
card:evt.card
})) return false;
return event.targets.contains(player)&&event.player!=player;
return true;
},
audio:true,
check:function(event,player){
if(get.attitude(player,event.player)>2) return false;
return true;
return get.effect(player,event.card,event.player,player)<=0;
},
content:function(){
"step 0"
player.judge('linglongshimandai',function(card){return (get.suit(card)=='heart')?1.5:-0.5});
"step 1"
if(result.judge>0){
trigger.cancel();
trigger.getParent().excluded.add(player);
}
},
ai:{
@ -2523,8 +2525,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
"hongmianbaihuapao_skill":{
equipSkill:true,
trigger:{
player:"damageBefore",
player:"damageBegin4",
},
filter:function(event,player){
if(event.source&&event.source.hasSkillTag('unequip',false,{
@ -2554,15 +2557,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
"wushuangfangtianji_skill":{
equipSkill:true,
trigger:{
source:"damageAfter",
source:"damageSource",
},
filter:function(event,player){
return event.card&&event.card.name=='sha';
},
check:function(event,player){
return true;
},
content:function(){
'step 0'
player.line(trigger.player,'white');
@ -3741,6 +3742,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
xuwangzhimian:{
equipSkill:true,
trigger:{player:'phaseDrawBegin'},
forced:true,
content:function(){
@ -3753,6 +3755,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
xiuluolianyuji2:{
equipSkill:true,
vanish:true,
trigger:{player:'damageEnd'},
forced:true,
@ -3770,7 +3773,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
range[1]=Infinity;
}
},
trigger:{source:'damageBegin'},
trigger:{source:'damageBegin1'},
forced:true,
filter:function(event){
return event.card&&event.card.name=='sha';
@ -3781,9 +3784,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
juechenjinge:{
equipSkill:true,
global:'juechenjinge2'
},
juechenjinge2:{
equipSkill:true,
mod:{
globalTo:function(from,to,distance){
return distance+game.countPlayer(function(current){
@ -3795,13 +3800,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
chiyanzhenhunqin:{
trigger:{source:'damageBefore'},
equipSkill:true,
trigger:{source:'damageBegin1'},
forced:true,
content:function(){
trigger.nature='fire';
}
},
chixueqingfeng:{
equipSkill:true,
trigger:{player:'shaBegin'},
forced:true,
content:function(){
@ -3816,6 +3823,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
chixueqingfeng2:{
equipSkill:true,
mod:{
cardEnabled:function(){
return false;
@ -3832,9 +3840,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
qimenbagua:{
equipSkill:true,
trigger:{target:'shaBefore'},
forced:true,
filter:function(event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.player.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null,
target:player,
@ -3859,6 +3869,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
guilongzhanyuedao:{
equipSkill:true,
trigger:{player:'shaBegin'},
forced:true,
filter:function(event,player){
@ -3869,8 +3880,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
guofengyupao:{
equipSkill:true,
mod:{
targetEnabled:function(card,player,target,now){
if(player.hasSkillTag('unequip2')) return false;
if(player!=target){
if(get.type(card)=='trick') return false;
}
@ -3878,13 +3891,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
longfenghemingjian:{
equipSkill:true,
inherit:'cixiong_skill',
filter:function(event,player){
return lib.linked.contains(event.card.nature);
},
},
qicaishenlu:{
trigger:{source:'damageBegin'},
trigger:{source:'damageBegin1'},
forced:true,
filter:function(event,player){
return lib.linked.contains(event.nature);

View File

@ -367,7 +367,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_pangde:['male','qun',4,['mashu','jianchu']],
gz_zhangjiao:['male','qun',3,['leiji','guidao']],
gz_caiwenji:['female','qun',3,['beige','gzduanchang']],
gz_mateng:['male','qun',4,['mashu','xiongyi']],
gz_mateng:['male','qun',4,['mashu2','xiongyi']],
gz_kongrong:['male','qun',3,['gzmingshi','lirang']],
gz_jiling:['male','qun',4,['shuangren']],
gz_tianfeng:['male','qun',3,['sijian','gzsuishi']],
@ -384,7 +384,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_re_lidian:['male','wei',3,['xunxun','wangxi']],
gz_zangba:['male','wei',4,['hengjiang']],
gz_madai:['male','shu',4,['mashu','qianxi'],['gzskin']],
gz_madai:['male','shu',4,['mashu2','qianxi'],['gzskin']],
gz_mifuren:['female','shu',3,['gzguixiu','gzcunsi']],
gz_sunce:['male','wu',4,['jiang','yingyang','baka_hunshang'],['gzskin']],
gz_chendong:['male','wu',4,['duanxie','fenming']],
@ -978,7 +978,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
eff1:{
sub:true,
trigger:{global:'phaseDrawBegin'},
priority:8,
//priority:8,
forced:true,
filter:function(event,player){
if(event.player!=player||event.num<=0) return false;
@ -992,7 +992,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
eff2:{
sub:true,
trigger:{global:'phaseUseBegin'},
priority:8,
//priority:8,
forced:true,
filter:function(event,player){
if(event.player!=player) return false;
@ -1010,7 +1010,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
eff3:{
sub:true,
trigger:{global:'useCardToBegin'},
priority:16,
//priority:16,
forced:true,
filter:function(event,player){
return event.target&&event.target==player&&event.card&&event.card.name=='zhibi'
@ -1105,9 +1105,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
global:'g_jianan',
},
g_jianan:{
trigger:{player:['phaseBegin','phaseBefore','dieBegin']},
trigger:{player:['phaseZhunbeiBegin','phaseBefore','dieBegin']},
filter:function(event,player,name){
if(name!='phaseBegin') return get.is.jun(player)&&player.identity=='wei';
if(name!='phaseZhunbeiBegin') return get.is.jun(player)&&player.identity=='wei';
return this.filter2.apply(this,arguments);
},
filter2:function(event,player){
@ -1119,7 +1119,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
direct:true,
content:function(){
'step 0'
if(event.triggername!='phaseBegin'){
if(event.triggername!='phaseZhunbeiBegin'){
event.trigger('jiananUpdate');
event.finish();
return;
@ -1529,7 +1529,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
gzjieyue:{
trigger:{player:'phaseBegin'},
trigger:{player:'phaseZhunbeiBegin'},
filter:function(event,player){
return player.countCards('h')&&game.hasPlayer(function(current){
return current!=player&&current.identity!='wei';
@ -1817,7 +1817,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
"new_jushou":{
audio:"jushou",
trigger:{
player:"phaseEnd",
player:"phaseJieshuBegin",
},
content:function (){
'step 0'
@ -2221,7 +2221,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
subSkill:{
reset:{
trigger:{
player:"phaseEnd",
player:"phaseAfter",
},
priority:1,
silent:true,
@ -2282,9 +2282,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
"new_mouduan":{
trigger:{
player:"phaseEnd",
player:"phaseJieshuBegin",
},
priority:2,
//priority:2,
audio:"qinxue",
filter:function (event,player){
if(player.storage.keji_suit&&player.storage.keji_suit.length>3) return true;
@ -2307,7 +2307,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
trigger:{
player:"respond",
},
priority:1,
//priority:1,
filter:function (event,player){
return event.skill=='new_longdan_shan'&&event.getParent(2).name=='sha';
},
@ -2354,7 +2354,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
trigger:{
player:["useCard","respond"],
},
priority:2,
//priority:2,
forced:true,
popup:false,
filter:function (event,player){
@ -2536,7 +2536,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
trigger:{
player:"phaseBegin",
player:"phaseZhunbeiBegin",
},
filter:function (event,player){
return player.hp<=1;
@ -2571,7 +2571,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
audio:"yinghun",
audioname:["sunce"],
trigger:{
player:"phaseBegin",
player:"phaseZhunbeiBegin",
},
direct:true,
content:function (){
@ -3918,7 +3918,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(get.position(card)=='e'&&get.subtype(card)=='equip5') return false;
}
},
trigger:{player:'phaseEnd'},
trigger:{player:'phaseJieshuBegin'},
audio:2,
forced:true,
unique:true,
@ -4019,6 +4019,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
discard:false,
lose:true,
toStorage:true,
prepare:function(cards,player){
var zhu=get.zhu(player,'jiahe');
player.$give(cards,zhu);
@ -4029,7 +4030,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
zhu.storage.yuanjiangfenghuotu.add(cards[0]);
zhu.syncStorage('yuanjiangfenghuotu');
zhu.updateMarks('yuanjiangfenghuotu');
event.trigger('addCardToStorage');
//event.trigger('addCardToStorage');
},
ai:{
order:1,
@ -4039,7 +4040,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
jiahe_skill:{
trigger:{player:'phaseBegin'},
trigger:{player:'phaseZhunbeiBegin'},
direct:true,
audio:"jiahe",
filter:function(event,player){
@ -4634,7 +4635,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
if(list.length==1){
target.storage.gzxiongsuan_restore=list[0];
target.addTempSkill('gzxiongsuan_restore','phaseBegin');
target.addTempSkill('gzxiongsuan_restore','phaseZhunbeiBegin');
event.finish();
}
else if(list.length>1){
@ -4645,7 +4646,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
'step 2'
target.storage.gzxiongsuan_restore=result.control;
target.addTempSkill('gzxiongsuan_restore','phaseBegin');
target.addTempSkill('gzxiongsuan_restore','phaseZhunbeiBegin');
},
subSkill:{
restore:{
@ -4688,7 +4689,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
audio:'suishi',
trigger:{global:'dying'},
forced:true,
priority:6.5,
//priority:6.5,
check:function(){
return false;
},
@ -4810,16 +4811,18 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
derivation:'huangjintianbingfu',
unique:true,
forceunique:true,
trigger:{player:'phaseBegin'},
trigger:{player:'phaseZhunbeiBegin'},
forced:true,
filter:function(event,player){
return player.storage.huangjintianbingfu.length==0;
},
content:function(){
player.storage.huangjintianbingfu.addArray(get.cards(get.population('qun')));
var cards=get.cards(get.population('qun'));
player.storage.huangjintianbingfu.addArray(cards);
game.cardsGotoSpecial(cards);
player.syncStorage('huangjintianbingfu');
player.updateMarks('huangjintianbingfu');
event.trigger('addCardToStorage');
//event.trigger('addCardToStorage');
},
ai:{
threaten:2,
@ -5320,7 +5323,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
huyuan:{
audio:'yuanhu',
trigger:{player:'phaseEnd'},
trigger:{player:'phaseJieshuBegin'},
direct:true,
filter:function(event,player){
return player.countCards('he',{type:'equip'})>0;
@ -5459,8 +5462,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
global:'niaoxiang_sha'
},
niaoxiang_sha:{
trigger:{player:'shaBegin'},
trigger:{player:'useCardToTargeted'},
filter:function(event,player){
if(event.card.name!='sha') return false;
if(game.countPlayer()<4) return false;
return player.siege(event.target)&&game.hasPlayer(function(current){
return current.hasSkill('niaoxiang')&&current.siege(event.target);
@ -5469,11 +5473,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
forced:true,
logTarget:'target',
content:function(){
if(typeof trigger.shanRequired=='number'){
trigger.shanRequired++;
var id=trigger.target.playerid;
var map=trigger.getParent().customArgs;
if(!map[id]) map[id]={};
if(typeof map[id].shanRequired=='number'){
map[id].shanRequired++;
}
else{
trigger.shanRequired=2;
map[id].shanRequired=2;
}
}
},
@ -5722,7 +5729,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
gzqianxi:{
audio:'qianxi',
trigger:{player:'phaseBegin'},
trigger:{player:'phaseZhunbeiBegin'},
content:function(){
"step 0"
player.judge();

View File

@ -585,7 +585,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
player.update();
}
}
else if(player.identity=='zhong'&&Math.random()<0.5){
else if(player.identity=='zhong'&&(Math.random()<0.5||game.zhu.name=='sunliang')){
var choice=0;
for(var i=0;i<list.length;i++){
if(lib.character[list[i]][1]==game.zhu.group){
@ -620,7 +620,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(get.config('choose_group')&&player.group=='shen'){
var list=lib.group.slice(0);
list.remove('shen');
if(list.length) player.group=list.randomGet();
if(list.length) player.group=function(){
if(_status.mode!='zhong'&&game.zhu&&game.zhu.group){
if(['liubei','re_liubei','caocao','re_caocao','sunquan','re_sunquan','zhangjiao','sp_zhangjiao','caopi','re_caopi','liuchen','caorui','sunliang','sunxiu'].contains(game.zhu.name)) return game.zhu.group;
if(game.zhu.name=='sunhao'&&player.identity=='zhong') return 'wu';
if(game.zhu.name=='yl_yuanshu'){
if(player.identity=='zhong') list.remove('qun');
else return 'qun';
}
if(['sunhao','xin_yuanshao','re_yuanshao'].contains(game.zhu.name)){
if(player.identity!='zhong') list.remove(game.zhu.group);
else return game.zhu.group;
}
}
return list.randomGet();
}();
}
player.node.name.dataset.nature=get.groupnature(player.group);
}