Add files via upload

This commit is contained in:
Spmario233 2019-11-14 13:47:38 +08:00 committed by GitHub
parent e49154d19a
commit 74503ed0b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 685 additions and 356 deletions

View File

@ -315,7 +315,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
effect:function(){ effect:function(){
if(result.bool==false){ if(result.bool==false){
player.skip('phaseDraw'); if(get.is.changban()) player.addTempSkill('bingliang_changban');
else player.skip('phaseDraw');
} }
}, },
ai:{ ai:{
@ -399,6 +400,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
player.recover(); player.recover();
}, },
filterLose:function(card,player){ filterLose:function(card,player){
if(player.hasSkillTag('unequip2')) return false;
return player.hp<player.maxHp; return player.hp<player.maxHp;
}, },
skills:['baiyin_skill'], skills:['baiyin_skill'],
@ -419,7 +421,26 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
}, },
skill:{ skill:{
bingliang_changban:{
cardSkill:true,
unique:true,
trigger:{player:'phaseDrawBegin'},
silent:true,
content:function(){
trigger.num--;
},
group:'bingliang_changban2'
},
bingliang_changban2:{
cardSkill:true,
trigger:{player:'phaseDrawAfter'},
silent:true,
content:function(){
if(player.enemy) player.enemy.draw();
}
},
muniu_skill:{ muniu_skill:{
equipSkill:true,
enable:'phaseUse', enable:'phaseUse',
usable:1, usable:1,
filterCard:true, filterCard:true,
@ -758,8 +779,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
}, },
guding_skill:{ guding_skill:{
equipSkill:true,
audio:true, audio:true,
trigger:{source:'damageBegin'}, trigger:{source:'damageBegin1'},
filter:function(event){ filter:function(event){
if(event.parent.name=='_lianhuan'||event.parent.name=='_lianhuan2') return false; if(event.parent.name=='_lianhuan'||event.parent.name=='_lianhuan2') return false;
if(event.card&&event.card.name=='sha'){ if(event.card&&event.card.name=='sha'){
@ -780,11 +802,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
tengjia1:{ tengjia1:{
equipSkill:true,
trigger:{target:['useCardToBefore']}, trigger:{target:['useCardToBefore']},
forced:true, forced:true,
priority:6, priority:6,
audio:true, audio:true,
filter:function(event,player){ filter:function(event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.player.hasSkillTag('unequip',false,{ if(event.player.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null, name:event.card?event.card.name:null,
target:player, target:player,
@ -799,6 +823,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
ai:{ ai:{
effect:{ effect:{
target:function(card,player,target,current){ target:function(card,player,target,current){
if(target.hasSkillTag('unequip2')) return;
if(player.hasSkillTag('unequip',false,{ if(player.hasSkillTag('unequip',false,{
name:card?card.name:null, name:card?card.name:null,
target:player, target:player,
@ -816,9 +841,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
tengjia2:{ tengjia2:{
trigger:{player:'damageBegin'}, equipSkill:true,
trigger:{player:'damageBegin3'},
filter:function(event,player){ filter:function(event,player){
if(event.nature!='fire') return false; if(event.nature!='fire') return false;
if(player.hasSkillTag('unequip2')) return false;
if(event.source&&event.source.hasSkillTag('unequip',false,{ if(event.source&&event.source.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null, name:event.card?event.card.name:null,
target:player, target:player,
@ -844,10 +871,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
tengjia3:{ tengjia3:{
equipSkill:true,
audio:'tengjia1', audio:'tengjia1',
trigger:{target:'shaBegin'}, trigger:{target:'shaBegin'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.player.hasSkillTag('unequip',false,{ if(event.player.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null, name:event.card?event.card.name:null,
target:player, target:player,
@ -861,11 +890,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
}, },
baiyin_skill:{ baiyin_skill:{
trigger:{player:'damageBegin'}, equipSkill:true,
trigger:{player:'damageBegin4'},
forced:true, forced:true,
audio:true, audio:true,
filter:function(event,player){ filter:function(event,player){
if(event.num<=1) return false; if(event.num<=1) return false;
if(player.hasSkillTag('unequip2')) return false;
if(event.source&&event.source.hasSkillTag('unequip',false,{ if(event.source&&event.source.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null, name:event.card?event.card.name:null,
target:player, target:player,
@ -879,6 +910,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
zhuque_skill:{ zhuque_skill:{
equipSkill:true,
trigger:{player:'useCard1'}, trigger:{player:'useCard1'},
priority:7, priority:7,
filter:function(event,player){ filter:function(event,player){

View File

@ -129,6 +129,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
equipValue:6 equipValue:6
} }
}, },
onLoseFilter:function(card,player){
if(player.hasSkillTag('unequip2')) return false;
return true;
},
onLose:function(){ onLose:function(){
'step 0' 'step 0'
player.draw(2); player.draw(2);
@ -760,6 +764,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
skill:{ skill:{
liulongcanjia:{ liulongcanjia:{
equipSkill:true,
mod:{ mod:{
targetEnabled:function(card,player,target){ targetEnabled:function(card,player,target){
if(['equip3','equip4'].contains(get.subtype(card))) return false; if(['equip3','equip4'].contains(get.subtype(card))) return false;
@ -767,6 +772,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
}, },
minguangkai_cancel:{ minguangkai_cancel:{
equipSkill:true,
trigger:{target:'useCardToTarget'}, trigger:{target:'useCardToTarget'},
forced:true, forced:true,
check:function(event,player){ check:function(event,player){
@ -791,6 +797,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
minguangkai_link:{ minguangkai_link:{
equipSkill:true,
trigger:{player:'linkBefore'}, trigger:{player:'linkBefore'},
forced:true, forced:true,
priority:20, priority:20,
@ -811,6 +818,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
dinglanyemingzhu_skill:{ dinglanyemingzhu_skill:{
equipSkill:true,
inherit:'zhiheng', inherit:'zhiheng',
filter:function(event,player){ filter:function(event,player){
return !player.hasSkill('gzzhiheng',true); return !player.hasSkill('gzzhiheng',true);
@ -867,6 +875,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
feilongduofeng:{ feilongduofeng:{
equipSkill:true,
trigger:{player:'useCardToPlayered'}, trigger:{player:'useCardToPlayered'},
logTarget:'target', logTarget:'target',
check:function(event,player){ check:function(event,player){
@ -880,6 +889,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
}, },
feilongduofeng2:{ feilongduofeng2:{
equipSkill:true,
trigger:{source:'dieAfter'}, trigger:{source:'dieAfter'},
filter:function(event,player){ filter:function(event,player){
if(event.reason&&event.reason.card&&event.reason.card.name=='sha'){ if(event.reason&&event.reason.card&&event.reason.card.name=='sha'){
@ -1005,6 +1015,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
feilongduofeng3:{ feilongduofeng3:{
equipSkill:true,
trigger:{source:'dying'}, trigger:{source:'dying'},
filter:function(event,player){ filter:function(event,player){
var evt=event.getParent('damage'); var evt=event.getParent('damage');
@ -1019,6 +1030,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
}, },
taipingyaoshu:{ taipingyaoshu:{
equipSkill:true,
mod:{ mod:{
maxHandcard:function(player,num){ maxHandcard:function(player,num){
if(player.hasSkill('huangjintianbingfu')){ if(player.hasSkill('huangjintianbingfu')){
@ -1029,8 +1041,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}); });
} }
}, },
trigger:{player:'damageBefore'}, trigger:{player:'damageBegin4'},
filter:function(event,player){ filter:function(event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.source&&event.source.hasSkillTag('unequip',false,{ if(event.source&&event.source.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null, name:event.card?event.card.name:null,
target:player, target:player,
@ -1047,6 +1060,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
nothunder:true, nothunder:true,
effect:{ effect:{
target:function(card,player,target,current){ target:function(card,player,target,current){
if(card.name=='sha'&&player.getEquip('qinggang')||target.hasSkillTag('unequip2')) return;
if(player.hasSkillTag('unequip',false,{ if(player.hasSkillTag('unequip',false,{
name:card?card.name:null, name:card?card.name:null,
target:player, target:player,
@ -1062,6 +1076,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
g_taipingyaoshu:{}, g_taipingyaoshu:{},
yuxi_skill:{ yuxi_skill:{
equipSkill:true,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
@ -1076,6 +1091,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
group:'yuxi_skill2' group:'yuxi_skill2'
}, },
yuxi_skill2:{ yuxi_skill2:{
equipSkill:true,
trigger:{player:'phaseUseBegin'}, trigger:{player:'phaseUseBegin'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
@ -1242,9 +1258,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
}, },
huxinjing:{ huxinjing:{
trigger:{player:'damageBefore'}, equipSkill:true,
trigger:{player:'damageBegin4'},
// forced:true, // forced:true,
filter:function(event,player){ filter:function(event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.source&&event.source.hasSkillTag('unequip',false,{ if(event.source&&event.source.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null, name:event.card?event.card.name:null,
target:player, target:player,
@ -1261,6 +1279,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
huxinjing2:{ huxinjing2:{
equipSkill:true,
trigger:{player:['damageEnd','damageZero']}, trigger:{player:['damageEnd','damageZero']},
priority:10, priority:10,
forced:true, forced:true,
@ -1273,8 +1292,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
player.removeSkill('huxinjing2'); player.removeSkill('huxinjing2');
} }
}, },
wuliu_skill:{}, wuliu_skill:{
equipSkill:true,
},
g_wuliu_skill:{ g_wuliu_skill:{
equipSkill:true,
mod:{ mod:{
attackFrom:function(from,to,distance){ attackFrom:function(from,to,distance){
return distance-game.countPlayer(function(current){ return distance-game.countPlayer(function(current){
@ -1287,8 +1309,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
sanjian_skill:{ sanjian_skill:{
equipSkill:true,
audio:true, audio:true,
trigger:{source:'damageAfter'}, trigger:{source:'damageSource'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
if(event.player.isDead()) return false; if(event.player.isDead()) return false;

View File

@ -442,6 +442,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
skill:{ skill:{
lanyinjia:{ lanyinjia:{
equipSkill:true,
enable:['chooseToRespond'], enable:['chooseToRespond'],
filterCard:true, filterCard:true,
viewAs:{name:'shan'}, viewAs:{name:'shan'},
@ -468,7 +469,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
lanyinjia2:{ lanyinjia2:{
trigger:{player:'damageEnd'}, equipSkill:true,
trigger:{player:'damageBegin4'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
return event.card&&event.card.name=='sha'&&player.getEquip('lanyinjia'); return event.card&&event.card.name=='sha'&&player.getEquip('lanyinjia');
@ -481,6 +483,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
}, },
zhungangshuo:{ zhungangshuo:{
equipSkill:true,
trigger:{player:'useCardToPlayered'}, trigger:{player:'useCardToPlayered'},
logTarget:'target', logTarget:'target',
filter:function(event,player){ filter:function(event,player){
@ -507,7 +510,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
qibaodao:{ qibaodao:{
trigger:{source:'damageBegin'}, equipSkill:true,
trigger:{source:'damageBegin1'},
forced:true, forced:true,
filter:function(event){ filter:function(event){
return event.card&&event.card.name=='sha'&&event.player.isHealthy(); return event.card&&event.card.name=='sha'&&event.player.isHealthy();
@ -531,11 +535,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
g_jinchan:{ g_jinchan:{
cardSkill:true,
trigger:{target:'useCardToBefore'}, trigger:{target:'useCardToBefore'},
forced:true, forced:true,
popup:false, popup:false,
filter:function(event,player){ filter:function(event,player){
if(event.player==player) return false; if(event.player==player) return false;
if(event.getParent().directHitcontains(player)) return false;
var num=player.countCards('h','jinchan'); var num=player.countCards('h','jinchan');
return num&&num==player.countCards('h'); return num&&num==player.countCards('h');
}, },
@ -569,6 +575,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
yinyueqiang:{ yinyueqiang:{
equipSkill:true,
trigger:{player:['useCard','respondAfter']}, trigger:{player:['useCard','respondAfter']},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
@ -591,6 +598,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
g_du:{ g_du:{
cardSkill:true,
trigger:{player:'loseEnd'}, trigger:{player:'loseEnd'},
popup:false, popup:false,
forced:true, forced:true,
@ -614,6 +622,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
}, },
caomu_skill:{ caomu_skill:{
cardSkill:true,
unique:true, unique:true,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin'},
silent:true, silent:true,

View File

@ -1157,7 +1157,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
else{ else{
target.chooseToUse('对'+get.translation(event.addedTarget)+'使用一张杀,或令'+get.translation(player)+'获得你的武器牌', target.chooseToUse('对'+get.translation(event.addedTarget)+'使用一张杀,或令'+get.translation(player)+'获得你的武器牌',
{name:'sha'},event.addedTarget,-1).set('targetRequired',true); {name:'sha'}).set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){
if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false;
return lib.filter.filterTarget.apply(this,arguments);
}).set('sourcex',event.addedTarget);
} }
"step 1" "step 1"
if(event.directfalse||result.bool==false){ if(event.directfalse||result.bool==false){
@ -1394,6 +1397,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
skill:{ skill:{
qinglong_guozhan:{ qinglong_guozhan:{
equipSkill:true,
trigger:{player:'useCard'}, trigger:{player:'useCard'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
@ -1408,6 +1412,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
qinglong_guozhan_mingzhi:{ qinglong_guozhan_mingzhi:{
equipSkill:true,
vanish:true, vanish:true,
silent:true, silent:true,
onremove:true, onremove:true,
@ -1431,7 +1436,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
hanbing_skill:{ hanbing_skill:{
trigger:{source:'damageBefore'}, equipSkill:true,
trigger:{source:'damageBegin2'},
//direct:true, //direct:true,
audio:true, audio:true,
filter:function(event){ filter:function(event){
@ -1475,11 +1481,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
renwang_skill:{ renwang_skill:{
equipSkill:true,
trigger:{target:'shaBegin'}, trigger:{target:'shaBegin'},
forced:true, forced:true,
priority:6, priority:6,
audio:true, audio:true,
filter:function(event,player){ filter:function(event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.player.hasSkillTag('unequip',false,{ if(event.player.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null, name:event.card?event.card.name:null,
target:player, target:player,
@ -1492,7 +1500,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
ai:{ ai:{
effect:{ effect:{
target:function(card,player){ target:function(card,player,target){
if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return;
if(player.hasSkillTag('unequip',false,{ if(player.hasSkillTag('unequip',false,{
name:card?card.name:null, name:card?card.name:null,
target:player, target:player,
@ -1504,6 +1513,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
zhuge_skill:{ zhuge_skill:{
equipSkill:true,
mod:{ mod:{
cardUsable:function(card,player,num){ cardUsable:function(card,player,num){
if(card.name=='sha'){ if(card.name=='sha'){
@ -1516,6 +1526,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
}, },
cixiong_skill:{ cixiong_skill:{
equipSkill:true,
trigger:{player:'useCardToPlayered'}, trigger:{player:'useCardToPlayered'},
audio:true, audio:true,
logTarget:'target', logTarget:'target',
@ -1536,15 +1547,54 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
qinggang_skill:{ qinggang_skill:{
ai:{ equipSkill:true,
audio:true,
trigger:{
player:'useCardToPlayered',
},
filter:function(event){
return event.card.name=='sha';
},
forced:true,
logTarget:'target',
content:function(){
trigger.target.addTempSkill('qinggang2');
trigger.target.storage.qinggang2.add(trigger.card);
},
/*ai:{
unequip:true, unequip:true,
skillTagFilter:function(player,tag,arg){ skillTagFilter:function(player,tag,arg){
if(arg&&arg.name=='sha') return true; if(arg&&arg.name=='sha') return true;
return false; return false;
} }
} }*/
},
qinggang2:{
firstDo:true,
ai:{unequip2:true},
init:function(player,skill){
if(!player.storage[skill]) player.storage[skill]=[];
},
onremove:true,
trigger:{
player:['damage','damageCancelled','damageZero'],
target:['shaMiss','useCardToExcluded'],
},
charlotte:true,
filter:function(event,player){
return player.storage.qinggang2&&event.card&&player.storage.qinggang2.contains(event.card);
},
silent:true,
forced:true,
popup:false,
priority:12,
content:function(){
player.storage.qinggang2.remove(trigger.card);
if(!player.storage.qinggang2.length) player.removeSkill('qinggang2');
},
}, },
qinglong_skill:{ qinglong_skill:{
equipSkill:true,
trigger:{player:'shaMiss'}, trigger:{player:'shaMiss'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
@ -1568,6 +1618,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
zhangba_skill:{ zhangba_skill:{
equipSkill:true,
enable:['chooseToUse','chooseToRespond'], enable:['chooseToUse','chooseToRespond'],
filterCard:true, filterCard:true,
selectCard:2, selectCard:2,
@ -1590,6 +1641,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
guanshi_skill:{ guanshi_skill:{
equipSkill:true,
trigger:{player:'shaMiss'}, trigger:{player:'shaMiss'},
direct:true, direct:true,
audio:true, audio:true,
@ -1623,6 +1675,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
fangtian_skill:{ fangtian_skill:{
equipSkill:true,
mod:{ mod:{
selectTarget:function(card,player,range){ selectTarget:function(card,player,range){
if(card.name!='sha') return; if(card.name!='sha') return;
@ -1638,7 +1691,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
fangtian_guozhan:{ fangtian_guozhan:{
trigger:{player:'useCard'}, equipSkill:true,
trigger:{player:'useCard1'},
silent:true, silent:true,
filter:function(event,player){ filter:function(event,player){
if(get.mode()!='guozhan') return false; if(get.mode()!='guozhan') return false;
@ -1687,7 +1741,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
qilin_skill:{ qilin_skill:{
trigger:{source:'damageBegin'}, equipSkill:true,
trigger:{source:'damageBegin2'},
filter:function(event,player){ filter:function(event,player){
return event.card&&event.card.name=='sha'&&event.notLink()&&event.player.getCards('e',{subtype:['equip3','equip4','equip6']}).length>0 return event.card&&event.card.name=='sha'&&event.notLink()&&event.player.getCards('e',{subtype:['equip3','equip4','equip6']}).length>0
}, },
@ -1711,11 +1766,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
bagua_skill:{ bagua_skill:{
equipSkill:true,
trigger:{player:'chooseToRespondBegin'}, trigger:{player:'chooseToRespondBegin'},
filter:function(event,player){ filter:function(event,player){
if(event.responded) return false; if(event.responded) return false;
if(!event.filterCard({name:'shan'})) return false; if(!event.filterCard({name:'shan'})) return false;
if(!lib.filter.cardRespondable({name:'shan'},player,event)) return false; if(!lib.filter.cardRespondable({name:'shan'},player,event)) return false;
if(player.hasSkillTag('unequip2')) return false;
var evt=event.getParent(); var evt=event.getParent();
if(evt.player&&evt.player.hasSkillTag('unequip',false,{ if(evt.player&&evt.player.hasSkillTag('unequip',false,{
name:evt.card?evt.card.name:null, name:evt.card?evt.card.name:null,
@ -1742,6 +1799,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
ai:{ ai:{
effect:{ effect:{
target:function(card,player,target,effect){ target:function(card,player,target,effect){
if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return;
if(player.hasSkillTag('unequip',false,{ if(player.hasSkillTag('unequip',false,{
name:card?card.name:null, name:card?card.name:null,
target:player, target:player,

View File

@ -1249,7 +1249,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
group:'dawu3' group:'dawu3'
}, },
dawu2:{ dawu2:{
trigger:{player:'damageBefore'}, trigger:{player:'damageBegin4'},
filter:function(event){ filter:function(event){
if(event.nature!='thunder') return true; if(event.nature!='thunder') return true;
return false; return false;
@ -1326,14 +1326,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
kuangfeng2:{ kuangfeng2:{
trigger:{player:'damageBegin'}, trigger:{player:'damageBegin3'},
filter:function(event){ filter:function(event){
if(event.nature=='fire') return true; if(event.nature=='fire') return true;
return false; return false;
}, },
mark:true, mark:true,
intro:{ intro:{
content:'已获得大雾标记' content:'已获得狂风标记'
}, },
forced:true, forced:true,
content:function(){ content:function(){

View File

@ -8,7 +8,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
old_refresh:["old_zhangfei","old_huatuo"], old_refresh:["old_zhangfei","old_huatuo"],
old_yijiang1:["masu","xushu","fazheng","yujin","xin_yujin","old_xusheng","old_lingtong","ol_yujin"], old_yijiang1:["masu","xushu","fazheng","yujin","xin_yujin","old_xusheng","old_lingtong","ol_yujin"],
old_yijiang2:["old_madai","old_zhonghui","old_wangyi","old_guanzhang","ol_liaohua"], old_yijiang2:["old_madai","old_zhonghui","old_wangyi","old_guanzhang","ol_liaohua"],
old_yijiang3:["liru","old_zhuran","ol_zhuran","ol_manchong","ol_guohuai"], old_yijiang3:["liru","old_zhuran","ol_zhuran","ol_manchong","ol_guohuai","old_fuhuanghou","old_caochong"],
old_yijiang4:["old_caozhen","old_chenqun","old_zhuhuan","ol_wuyi"], old_yijiang4:["old_caozhen","old_chenqun","old_zhuhuan","ol_wuyi"],
old_yijiang5:["old_caoxiu","old_quancong","old_zhuzhi"], old_yijiang5:["old_caoxiu","old_quancong","old_zhuzhi"],
old_yijiang67:["ol_xinxianying","ol_zhangrang","ol_liuyu"], old_yijiang67:["ol_xinxianying","ol_zhangrang","ol_liuyu"],
@ -16,6 +16,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
character:{ character:{
old_fuhuanghou:['female','qun',3,['oldzhuikong','oldqiuyuan']],
old_caochong:['male','wei',3,['oldrenxin','oldchengxiang']],
xuhuang:['male','wei',4,['gzduanliang']], xuhuang:['male','wei',4,['gzduanliang']],
pangde:['male','qun',4,['mashu','mengjin']], pangde:['male','qun',4,['mashu','mengjin']],
xiahouyuan:['male','wei',4,['shensu']], xiahouyuan:['male','wei',4,['shensu']],
@ -747,7 +749,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
oldqianxi:{ oldqianxi:{
trigger:{source:'damageBefore'}, trigger:{source:'damageBegin2'},
check:function(event,player){ check:function(event,player){
var att=get.attitude(player,event.player); var att=get.attitude(player,event.player);
if(event.player.hp==event.player.maxHp) return att<0; if(event.player.hp==event.player.maxHp) return att<0;
@ -875,6 +877,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ol_guohuai:'OL郭淮', ol_guohuai:'OL郭淮',
ol_wuyi:'OL吴懿', ol_wuyi:'OL吴懿',
ol_liuyu:'OL刘虞', ol_liuyu:'OL刘虞',
old_fuhuanghou:'旧伏皇后',
old_caochong:'旧曹冲',
old_fuhun:'父魂', old_fuhun:'父魂',
old_fuhun_info:'摸牌阶段开始时,你可以放弃摸牌,改为从牌堆顶亮出两张牌并获得之,若亮出的牌颜色不同,你获得技能“武圣”、“咆哮”,直到回合结束。', old_fuhun_info:'摸牌阶段开始时,你可以放弃摸牌,改为从牌堆顶亮出两张牌并获得之,若亮出的牌颜色不同,你获得技能“武圣”、“咆哮”,直到回合结束。',

View File

@ -466,13 +466,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:"phaseDrawBegin", player:"phaseDrawBegin",
}, },
direct:true, direct:true,
priority:-10, //priority:-10,
filter:function (event){ filter:function (event){
return event.num>0; return event.num>0;
}, },
content:function (){ content:function (){
"step 0" "step 0"
player.chooseTarget(get.prompt('new_retuxi'),'获得至多'+get.translation(trigger.num)+'名角色的各一张手牌,然后少摸等量的牌',[1,trigger.num],function(card,player,target){ var num=get.copy(trigger.num);
if(get.mode()=='guozhan'&&num>2) num=2;
player.chooseTarget(get.prompt('new_retuxi'),'获得至多'+get.translation(num)+'名角色的各一张手牌,然后少摸等量的牌',[1,num],function(card,player,target){
return target.countCards('h')>0&&player!=target; return target.countCards('h')>0&&player!=target;
},function(target){ },function(target){
var att=get.attitude(_status.event.player,target); var att=get.attitude(_status.event.player,target);
@ -792,7 +794,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
"new_yijue2":{ "new_yijue2":{
trigger:{ trigger:{
player:"damageBegin", player:"damageBegin1",
}, },
filter:function (event){ filter:function (event){
return event.source&&event.source.hasSkill('new_yijue')&&event.card&&event.card.name=='sha'&&get.suit(event.card)=='heart'&&event.notLink(); return event.source&&event.source.hasSkill('new_yijue')&&event.card&&event.card.name=='sha'&&get.suit(event.card)=='heart'&&event.notLink();
@ -1030,15 +1032,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
"new_reyaowu":{ "new_reyaowu":{
trigger:{ trigger:{
player:"damage", player:"damageBegin3",
}, },
priority:1, priority:1,
audio:"yaowu", audio:"yaowu",
filter:function (event){ filter:function (event){
if(event.card&&(event.card.name=='sha')){ return event.card&&event.card.name=='sha';
if(['red','black'].contains(get.color(event.card))) return true;
}
return false;
}, },
forced:true, forced:true,
check:function (event){ check:function (event){
@ -1047,7 +1046,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
content:function (){ content:function (){
if(get.color(trigger.cards)=='black') player.draw(); if(get.color(trigger.card)!='red') player.draw();
else trigger.source.chooseDrawRecover(true); else trigger.source.chooseDrawRecover(true);
}, },
ai:{ ai:{
@ -1936,7 +1935,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
reluoyi2:{ reluoyi2:{
trigger:{source:'damageBegin'}, trigger:{source:'damageBegin1'},
filter:function(event){ filter:function(event){
return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink();
}, },
@ -2810,8 +2809,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lib.filter.targetEnabled({name:'sha'},player,event.player)&&player.hasSha(); lib.filter.targetEnabled({name:'sha'},player,event.player)&&player.hasSha();
}, },
content:function(){ content:function(){
player.chooseToUse({name:'sha'},'诛害:是否对'+get.translation(trigger.player)+'使用一张杀?', player.chooseToUse({name:'sha'},'诛害:是否对'+get.translation(trigger.player)+'使用一张杀?').set('logSkill','zhuhai').set('complexSelect',true).set('filterTarget',function(card,player,target){
trigger.player,-1).set('logSkill','zhuhai'); if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false;
return lib.filter.filterTarget.apply(this,arguments);
}).set('sourcex',trigger.player);
} }
}, },
qianxin:{ qianxin:{
@ -3014,13 +3015,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xunxun:{ xunxun:{
audio:2, audio:2,
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBefore'},
check:function(event,player){ //check:function(event,player){
return !player.hasSkill('reyiji2'); // return !player.hasSkill('reyiji2');
}, //},
content:function(){ content:function(){
"step 0" "step 0"
event.cards=get.cards(4); event.cards=get.cards(4);
player.chooseCardButton(event.cards,2,'选择两张牌置于牌堆顶').set('ai',ai.get.buttonValue); player.chooseCardButton(event.cards,2,'选择两张牌置于牌堆顶',true).set('ai',ai.get.buttonValue);
"step 1" "step 1"
if(result.bool){ if(result.bool){
var choice=[]; var choice=[];
@ -3154,7 +3155,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"new_liyu":"利驭", "new_liyu":"利驭",
"new_liyu_info":"当你使用【杀】对一名其他角色造成伤害后,你可以获得其一张牌。若此牌不为装备牌,则其摸一张牌。若此牌为装备牌,则视为你对其选择的另一名角色使用一张【决斗】。", "new_liyu_info":"当你使用【杀】对一名其他角色造成伤害后,你可以获得其一张牌。若此牌不为装备牌,则其摸一张牌。若此牌为装备牌,则视为你对其选择的另一名角色使用一张【决斗】。",
"new_retuxi":"突袭", "new_retuxi":"突袭",
"new_retuxi_info":"摸牌阶段摸牌时,你可以少摸任意张牌,然后选择等量的角色的各一张手牌。", "new_retuxi_info":"摸牌阶段摸牌时,你可以少摸任意张牌,然后获得等量的角色的各一张手牌。",
"new_retuxi_info_guozhan":"摸牌阶段摸牌时,你可以少摸至多两张牌,然后获得等量的角色的各一张手牌。",
"new_reyiji":"遗计", "new_reyiji":"遗计",
"new_reyiji_info":"每当你受到1点伤害后你可以摸两张牌然后可以将至多两张手牌交给其他角色。", "new_reyiji_info":"每当你受到1点伤害后你可以摸两张牌然后可以将至多两张手牌交给其他角色。",
"new_rejianxiong":"奸雄", "new_rejianxiong":"奸雄",
@ -3180,7 +3182,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"new_reqingnang":"青囊", "new_reqingnang":"青囊",
"new_reqingnang_info":"出牌阶段,你可以弃置一张手牌,令一名本回合内未成为过〖青囊〗的目标的角色回复一点体力。若你弃置的是黑色牌,则你本回合内不能再发动〖青囊〗。", "new_reqingnang_info":"出牌阶段,你可以弃置一张手牌,令一名本回合内未成为过〖青囊〗的目标的角色回复一点体力。若你弃置的是黑色牌,则你本回合内不能再发动〖青囊〗。",
"new_reyaowu":"耀武", "new_reyaowu":"耀武",
"new_reyaowu_info":"锁定技,当任意一名角色使用【杀】对你造成伤害时若此杀为红色该角色回复1点体力或摸一张牌。若为黑色,则你摸一张牌。", "new_reyaowu_info":"锁定技,当一名角色使用【杀】对你造成伤害时若此杀为红色该角色回复1点体力或摸一张牌。否则则你摸一张牌。",
reqingguo:'倾国', reqingguo:'倾国',
reqingguo_info:'你可以将一张黑色牌当做【闪】使用或打出。', reqingguo_info:'你可以将一张黑色牌当做【闪】使用或打出。',

View File

@ -1154,7 +1154,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"tachibana_effect":{ "tachibana_effect":{
audio:'nzry_huaiju', audio:'nzry_huaiju',
trigger:{ trigger:{
global:['damageBefore','phaseDrawBegin'], global:['damageBegin4','phaseDrawBegin'],
}, },
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
@ -2443,7 +2443,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
content:function(){ content:function(){
"step 0" "step 0"
target.chooseToUse({name:'sha'},player,-1,'挑衅:对'+get.translation(player)+'使用一张杀,或令其弃置你的一张牌').set('targetRequired',true); target.chooseToUse({name:'sha'},'挑衅:对'+get.translation(player)+'使用一张杀,或令其弃置你的一张牌').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){
if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false;
return lib.filter.filterTarget.apply(this,arguments);
}).set('sourcex',player);
"step 1" "step 1"
if(result.bool==false&&target.countCards('he')>0){ if(result.bool==false&&target.countCards('he')>0){
player.discardPlayerCard(target,'he',true); player.discardPlayerCard(target,'he',true);
@ -5225,6 +5228,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
check:function(event,player){ check:function(event,player){
return get.attitude(player,event.target)<0; return get.attitude(player,event.target)<0;
}, },
logTarget:'target',
content:function(){ content:function(){
player.discardPlayerCard('he',trigger.target,true); player.discardPlayerCard('he',trigger.target,true);
} }
@ -5527,7 +5531,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
tianxiang:{ tianxiang:{
audio:2, audio:2,
audioname:['daxiaoqiao'], audioname:['daxiaoqiao'],
trigger:{player:'damageBefore'}, trigger:{player:'damageBegin3'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
return player.countCards('h',{suit:'heart'})>0&&event.num>0; return player.countCards('h',{suit:'heart'})>0&&event.num>0;
@ -5622,7 +5626,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
retianxiang:{ retianxiang:{
audio:'tianxiang', audio:'tianxiang',
audioname:['daxiaoqiao'], audioname:['daxiaoqiao'],
trigger:{player:'damageBefore'}, trigger:{player:'damageBegin4'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
return player.countCards('he',{suit:'heart'})>0&&event.num>0; return player.countCards('he',{suit:'heart'})>0&&event.num>0;

View File

@ -24,7 +24,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
niujin:['male','wei',4,['cuorui','liewei']], niujin:['male','wei',4,['cuorui','liewei']],
guanlu:['male','wei',3,['tuiyan','busuan','mingjie']], guanlu:['male','wei',3,['tuiyan','busuan','mingjie']],
gexuan:['male','wu',3,['lianhua','zhafu']], gexuan:['male','wu',3,['gxlianhua','zhafu']],
wenyang:['male','wei',5,['xinlvli','choujue']], wenyang:['male','wei',5,['xinlvli','choujue']],
mangyachang:["male","qun",4,["spjiedao"],[]], mangyachang:["male","qun",4,["spjiedao"],[]],
xugong:["male","wu",3,["biaozhao","yechou"],[]], xugong:["male","wu",3,["biaozhao","yechou"],[]],
@ -458,6 +458,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
cardimage:"baiyin", cardimage:"baiyin",
type:"equip", type:"equip",
subtype:"equip2", subtype:"equip2",
onLoseFilter:function(card,player){
if(player.hasSkillTag('unequip2')) return false;
return true;
},
onLose:function (){ onLose:function (){
player.recover(); player.recover();
player.draw(2); player.draw(2);
@ -690,7 +694,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
//管辂和葛玄 //管辂和葛玄
lianhua:{ gxlianhua:{
audio:2, audio:2,
init:function(player,skill){ init:function(player,skill){
if(!player.storage[skill]) player.storage[skill]={ if(!player.storage[skill]) player.storage[skill]={
@ -713,28 +717,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return event.player!=player&&_status.currentPhase!=player; return event.player!=player&&_status.currentPhase!=player;
}, },
content:function(){ content:function(){
player.storage.lianhua[player.getFriends().contains(trigger.player)?'red':'black']++; player.storage.gxlianhua[player.getFriends().contains(trigger.player)?'red':'black']++;
player.markSkill('lianhua'); player.markSkill('gxlianhua');
}, },
group:'lianhua_harmonia', group:'gxlianhua_harmonia',
subSkill:{ subSkill:{
harmonia:{ harmonia:{
forced:true, forced:true,
audio:'lianhua', audio:'gxlianhua',
sub:true, sub:true,
trigger:{player:'phaseBegin'}, trigger:{player:'phaseBegin'},
//filter:function(event,player){ //filter:function(event,player){
// return player.storage.lianhua&&player.storage.lianhua.red+player.storage.lianhua.black>0; // return player.storage.gxlianhua&&player.storage.gxlianhua.red+player.storage.gxlianhua.black>0;
//}, //},
forced:true, forced:true,
content:function(){ content:function(){
var cards=[]; var cards=[];
var cards2=[]; var cards2=[];
var skill=''; var skill='';
var red=player.storage.lianhua.red; var red=player.storage.gxlianhua.red;
var black=player.storage.lianhua.black; var black=player.storage.gxlianhua.black;
player.storage.lianhua={red:0,black:0}; player.storage.gxlianhua={red:0,black:0};
player.unmarkSkill('lianhua'); player.unmarkSkill('gxlianhua');
if(red+black<4){ if(red+black<4){
cards=['tao']; cards=['tao'];
skill='reyingzi'; skill='reyingzi';
@ -1298,7 +1302,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
spjiedao:{ spjiedao:{
audio:2, audio:2,
trigger:{ trigger:{
source:"damageBegin", source:"damageBegin1",
}, },
usable:1, usable:1,
direct:true, direct:true,
@ -4341,7 +4345,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
zfengshi:{ zfengshi:{
audio:'fengshi', audio:2,
trigger:{player:'useCardToPlayered'}, trigger:{player:'useCardToPlayered'},
filter:function(event,player){ filter:function(event,player){
return event.card.name=='sha'&&event.target.countCards('e'); return event.card.name=='sha'&&event.target.countCards('e');
@ -4356,7 +4360,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
chuanxin:{ chuanxin:{
trigger:{source:'damageBefore'}, audio:2,
trigger:{source:'damageBegin2'},
filter:function(event,player){ filter:function(event,player){
if(_status.currentPhase!=player) return false; if(_status.currentPhase!=player) return false;
if(!_status.event.getParent('phaseUse')) return false; if(!_status.event.getParent('phaseUse')) return false;
@ -4379,6 +4384,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
logTarget:'player', logTarget:'player',
check:function(event,player){ check:function(event,player){
if(get.mode()=='guozhan'){
if(get.guozhanRank(event.player.name2)<4) return false;
}
if(event.player.hasSkill('subplayer')) return false; if(event.player.hasSkill('subplayer')) return false;
if(get.attitude(player,event.player)<0){ if(get.attitude(player,event.player)<0){
if(event.player.hp==1) return false; if(event.player.hp==1) return false;
@ -4391,6 +4399,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.cancel(); trigger.cancel();
if(trigger.player.countCards('e')){ if(trigger.player.countCards('e')){
trigger.player.chooseControl(function(event,player){ trigger.player.chooseControl(function(event,player){
if(get.mode()=='guozhan'&&get.guozhanRank(event.player.name2)<4) return 1;
if(player.hp==1) return 1; if(player.hp==1) return 1;
if(player.hp==2&&player.countCards('e')>=2) return 1; if(player.hp==2&&player.countCards('e')>=2) return 1;
return 0; return 0;
@ -4592,12 +4601,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
intro:{ intro:{
content:'下一次受到超过1点的伤害时防止此伤害然后$跳过下个回合的摸牌阶段' content:'下一次受到超过1点的伤害时防止此伤害然后$跳过下个回合的摸牌阶段'
},*/ },*/
trigger:{player:'damageBegin'}, trigger:{player:'damageBegin4'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
return event.num>1; return event.num>1;
}, },
priority:-11, //priority:-11,
content:function(){ content:function(){
trigger.cancel(); trigger.cancel();
player.storage.kuanshi2.skip('phaseDraw'); player.storage.kuanshi2.skip('phaseDraw');
@ -5791,14 +5800,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
shichou2:{ shichou2:{
group:'shichou3', group:'shichou3',
trigger:{player:'damageBefore'}, trigger:{player:'damageBegin3'},
forced:true, forced:true,
popup:false, popup:false,
content:function(){ content:function(){
trigger.untrigger(); trigger.untrigger();
trigger.player=player.storage.shichou_target; trigger.player=player.storage.shichou_target;
trigger.player.addSkill('shichou4'); trigger.player.addSkill('shichou4');
trigger.trigger('damageBefore'); trigger.trigger('damageBegin3');
player.logSkill('shichou2',player.storage.shichou_target); player.logSkill('shichou2',player.storage.shichou_target);
game.delay(0.5); game.delay(0.5);
}, },
@ -6147,11 +6156,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return num+player.maxHp; return num+player.maxHp;
} }
}, },
trigger:{global:'gameStart',player:'enterGame'}, trigger:{global:'gameDrawAfter',player:'enterGame'},
forced:true, forced:true,
content:function(){ content:function(){
player.draw(player.maxHp,false); player.draw(player.maxHp);
player.$draw(player.maxHp);
} }
}, },
tuifeng:{ tuifeng:{
@ -7181,7 +7189,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
jiaozi:{ jiaozi:{
audio:2, audio:2,
trigger:{player:'damageBegin',source:'damageBegin'}, trigger:{player:'damageBegin3',source:'damageBegin1'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
return player.isMaxHandcard(true); return player.isMaxHandcard(true);
@ -7283,7 +7291,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
intro:{ intro:{
content:'防止你受到的所有伤害' content:'防止你受到的所有伤害'
}, },
trigger:{player:'damageBefore'}, trigger:{player:'damageBegin3'},
forced:true, forced:true,
content:function(){ content:function(){
trigger.cancel(); trigger.cancel();
@ -7452,7 +7460,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
jie:{ jie:{
audio:1, audio:1,
trigger:{source:'damageBegin'}, trigger:{source:'damageBegin1'},
filter:function(event){ filter:function(event){
return event.card&&event.card.name=='sha'&&get.color(event.card)=='red'&&event.notLink(); return event.card&&event.card.name=='sha'&&get.color(event.card)=='red'&&event.notLink();
}, },
@ -7863,7 +7871,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
subSkill:{ subSkill:{
source:{ source:{
audio:"anxian", audio:"anxian",
trigger:{source:'damageBefore'}, trigger:{source:'damageBegin2'},
filter:function(event,player){ filter:function(event,player){
return event.card&&event.card.name=='sha'; return event.card&&event.card.name=='sha';
}, },
@ -8472,7 +8480,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
nuzhan2:{ nuzhan2:{
audio:'nuzhan', audio:'nuzhan',
trigger:{source:'damageBegin'}, trigger:{source:'damageBegin2'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
return event.card&&event.card.name=='sha'&&event.cards&& return event.card&&event.card.name=='sha'&&event.cards&&
@ -8583,7 +8591,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
subSkill:{ subSkill:{
more:{ more:{
audio:true, audio:true,
trigger:{source:'damageBegin'}, trigger:{source:'damageBegin1'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
if(!player.hasSkill('fenxin_nei')){ if(!player.hasSkill('fenxin_nei')){
@ -8620,7 +8628,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
less:{ less:{
audio:true, audio:true,
trigger:{player:'damageBegin'}, trigger:{player:'damageBegin2'},
filter:function(event,player){ filter:function(event,player){
if(!player.hasSkill('fenxin_nei')){ if(!player.hasSkill('fenxin_nei')){
if(!player.countCards('h',{color:'red'})) return false; if(!player.countCards('h',{color:'red'})) return false;
@ -8830,7 +8838,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
shixin:{ shixin:{
audio:2, audio:2,
trigger:{player:'damageBefore'}, trigger:{player:'damageBegin4'},
filter:function(event){ filter:function(event){
return event.nature=='fire'; return event.nature=='fire';
}, },
@ -9146,7 +9154,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
hanyong3:{ hanyong3:{
audio:false, audio:false,
trigger:{source:'damageBegin'}, trigger:{source:'damageBegin1'},
forced:true, forced:true,
onremove:true, onremove:true,
filter:function(event,player){ filter:function(event,player){
@ -9305,7 +9313,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
fengpo2:{ fengpo2:{
trigger:{source:'damageBegin'}, trigger:{source:'damageBegin1'},
filter:function(event){ filter:function(event){
return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink();
}, },
@ -9414,7 +9422,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
fuji:{ fuji:{
trigger:{global:'damageBegin'}, trigger:{global:'damageBegin1'},
filter:function(event){ filter:function(event){
return event.source&&event.nature=='thunder'; return event.source&&event.nature=='thunder';
}, },
@ -9499,7 +9507,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
chouhai:{ chouhai:{
audio:2, audio:2,
trigger:{player:'damageBegin'}, trigger:{player:'damageBegin3'},
forced:true, forced:true,
check:function(){ check:function(){
return false; return false;
@ -10403,7 +10411,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
mingshi:{ mingshi:{
audio:2, audio:2,
trigger:{player:'damageBegin'}, trigger:{player:'damageBegin3'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
return event.source&&event.source.hp>player.hp; return event.source&&event.source.hp>player.hp;
@ -11035,7 +11043,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(get.damageEffect(trigger.player,player,player)<=0){ if(get.damageEffect(trigger.player,player,player)<=0){
nono=true; nono=true;
} }
var next=player.chooseToDiscard('弃置一张装备牌并令'+get.translation(player)+'摸一张牌,或受到一点伤害',get.prompt('xiaoguo',trigger.player),{type:'basic'}); var next=player.chooseToDiscard(get.prompt('xiaoguo',trigger.player),{type:'basic'});
next.set('ai',function(card){ next.set('ai',function(card){
if(_status.event.nono) return 0; if(_status.event.nono) return 0;
return 8-get.useful(card); return 8-get.useful(card);
@ -11045,7 +11053,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 1" "step 1"
if(result.bool){ if(result.bool){
var nono=(get.damageEffect(trigger.player,player,trigger.player)>=0); var nono=(get.damageEffect(trigger.player,player,trigger.player)>=0);
trigger.player.chooseToDiscard('he','弃置一张装备牌,或受到一点伤害',{type:'equip'}).set('ai',function(card){ trigger.player.chooseToDiscard('he','弃置一张装备牌并令'+get.translation(player)+'摸一张牌,或受到一点伤害',{type:'equip'}).set('ai',function(card){
if(_status.event.nono){ if(_status.event.nono){
return 0; return 0;
} }
@ -12801,8 +12809,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
busuan_angelbeats:'卜算', busuan_angelbeats:'卜算',
mingjie:'命戒', mingjie:'命戒',
mingjie_info:'结束阶段你可以摸一张牌若此牌为红色你可以重复此流程直到摸到黑色牌或摸到第三张牌。当你以此法摸到黑色牌时你失去1点体力。', mingjie_info:'结束阶段你可以摸一张牌若此牌为红色你可以重复此流程直到摸到黑色牌或摸到第三张牌。当你以此法摸到黑色牌时你失去1点体力。',
lianhua:'炼化', gxlianhua:'炼化',
lianhua_info:'你的回合外,每当有其他角色受到伤害后,你获得一个“丹血”标记 该角色与你阵营一致为红色不一致为黑色此颜色对玩家不可见直到你的准备阶段开始。准备阶段根据你获得的“丹血”标记的数量和颜色你获得相应的游戏牌以及获得相应技能直到回合结束。3枚或以下“英姿”和【桃】超过3枚且红色“丹血”较多“观星”和【无中生有】超过3枚且黑色“丹血”较多“直言”和【顺手牵羊】超过3枚且红色和黑色一样多【杀】、【决斗】和“攻心”。', gxlianhua_info:'你的回合外,每当有其他角色受到伤害后,你获得一个“丹血”标记 该角色与你阵营一致为红色不一致为黑色此颜色对玩家不可见直到你的准备阶段开始。准备阶段根据你获得的“丹血”标记的数量和颜色你获得相应的游戏牌以及获得相应技能直到回合结束。3枚或以下“英姿”和【桃】超过3枚且红色“丹血”较多“观星”和【无中生有】超过3枚且黑色“丹血”较多“直言”和【顺手牵羊】超过3枚且红色和黑色一样多【杀】、【决斗】和“攻心”。',
zhafu:'札符', zhafu:'札符',
zhafu_info:' 限定技,出牌阶段,你可以选择一名其他角色。该角色的下一个弃牌阶段开始时,其选择保留一张手牌,然后将其余的手牌交给你。', zhafu_info:' 限定技,出牌阶段,你可以选择一名其他角色。该角色的下一个弃牌阶段开始时,其选择保留一张手牌,然后将其余的手牌交给你。',
xinlvli:'膂力', xinlvli:'膂力',

View File

@ -340,7 +340,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
luoyi2:{ luoyi2:{
trigger:{source:'damageBegin'}, trigger:{source:'damageBegin1'},
filter:function(event){ filter:function(event){
return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink();
}, },

View File

@ -72,7 +72,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
twbaimei:{ twbaimei:{
audio:2, audio:2,
trigger:{ trigger:{
player:"damageBefore", player:"damageBegin4",
}, },
forced:true, forced:true,
priority:15, priority:15,
@ -350,7 +350,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
twbaobian:{ twbaobian:{
audio:2, audio:2,
trigger:{source:'damageBefore'}, trigger:{source:'damageBegin2'},
filter:function(event,player){ filter:function(event,player){
var card=event.card; var card=event.card;
if(!card||(card.name!='sha'&&card.name!='juedou')) return false; if(!card||(card.name!='sha'&&card.name!='juedou')) return false;

View File

@ -1136,7 +1136,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
delete player.storage.lingren; delete player.storage.lingren;
}, },
trigger:{ trigger:{
player:"damageBegin", player:"damageBegin3",
}, },
filter:function (event,player){ filter:function (event,player){
var info=player.storage.lingren; var info=player.storage.lingren;
@ -1246,14 +1246,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.line(trigger.player,'fire'); player.line(trigger.player,'fire');
trigger.player.damage('fire'); trigger.player.damage('fire');
trigger.player.addTempSkill('xionghuo_disable','phaseAfter'); trigger.player.addTempSkill('xionghuo_disable','phaseAfter');
game.delay(); event.goto(4);
event.finish();
'step 2' 'step 2'
player.line(trigger.player,'water'); player.line(trigger.player,'water');
trigger.player.loseHp(); trigger.player.loseHp();
trigger.player.addTempSkill('xionghuo_low','phaseAfter'); trigger.player.addTempSkill('xionghuo_low','phaseAfter');
game.delay(); event.goto(4);
event.finish();
'step 3' 'step 3'
player.line(trigger.player,'green'); player.line(trigger.player,'green');
var card1=trigger.player.getCards('h').randomGet(); var card1=trigger.player.getCards('h').randomGet();
@ -1264,6 +1262,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(list.length>0){ if(list.length>0){
player.gain(list,trigger.player,'giveAuto','bySelf'); player.gain(list,trigger.player,'giveAuto','bySelf');
} }
'step 4'
game.delay(); game.delay();
}, },
}, },
@ -1272,7 +1271,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sub:true, sub:true,
forced:true, forced:true,
trigger:{ trigger:{
source:"damageBegin", source:"damageBegin1",
}, },
filter:function (event,player){ filter:function (event,player){
return event.player.hasSkill('xionghuo'); return event.player.hasSkill('xionghuo');
@ -1800,10 +1799,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"xinfu_yinshi":{ "xinfu_yinshi":{
audio:2, audio:2,
trigger:{ trigger:{
player:"damageBefore", player:"damageBegin4",
}, },
forced:true, forced:true,
priority:15, //priority:15,
filter:function (event,player){ filter:function (event,player){
if(player.hasSkill('smh_huoji')||player.hasSkill('smh_lianhuan')) return false; if(player.hasSkill('smh_huoji')||player.hasSkill('smh_lianhuan')) return false;
if(!player.isEmpty(2)) return false; if(!player.isEmpty(2)) return false;
@ -2220,7 +2219,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
"zhenyi_heart":{ "zhenyi_heart":{
trigger:{ trigger:{
source:"damageBegin", source:"damageBegin1",
}, },
filter:function (event,player){ filter:function (event,player){
return event.source&&player.storage.xinfu_falu_map.heart; return event.source&&player.storage.xinfu_falu_map.heart;
@ -3184,7 +3183,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
"xinfu_zengdao2":{ "xinfu_zengdao2":{
trigger:{ trigger:{
source:"damageBegin", source:"damageBegin1",
}, },
audio:"xinfu_zengdao", audio:"xinfu_zengdao",
forced:true, forced:true,
@ -3290,7 +3289,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"xinfu_gongqing":{ "xinfu_gongqing":{
audio:true, audio:true,
trigger:{ trigger:{
player:"damageBegin", player:"damageBegin4",
}, },
forced:true, forced:true,
filter:function (event,player){ filter:function (event,player){
@ -3323,7 +3322,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
audio:2, audio:2,
trigger:{ trigger:{
player:"damageBefore", player:"damageBegin4",
}, },
filter:function (event,player){ filter:function (event,player){
return (event.source&&event.source.countCards('h')); return (event.source&&event.source.countCards('h'));
@ -4442,7 +4441,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
group:'xinfu_pdgyingshi2', group:'xinfu_pdgyingshi2',
priority:Infinity, priority:Infinity,
content:function(){ content:function(){
event.getParent('arrangeTrigger').list=[]; var evt=event.getParent('arrangeTrigger');
if(evt&&evt.map){
for(var i in evt.map){
evt.map[i].list=[];
}
evt.list=[];
}
game.log(player,'跳过了',event.triggername=='phaseBegin'?'准备阶段':'结束阶段'); game.log(player,'跳过了',event.triggername=='phaseBegin'?'准备阶段':'结束阶段');
}, },
}, },
@ -4974,7 +4979,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
usable:1, usable:1,
audio:2, audio:2,
trigger:{ trigger:{
player:"damageBegin", player:"damageBegin4",
}, },
filter:function (event,player){ filter:function (event,player){
return event.source!=undefined&&player.countCards('h')>0; return event.source!=undefined&&player.countCards('h')>0;
@ -5278,11 +5283,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"rw_bagua_skill":{ "rw_bagua_skill":{
equipSkill:true,
inherit:"bagua_skill", inherit:"bagua_skill",
trigger:{ trigger:{
player:"chooseToRespondBegin", player:"chooseToRespondBegin",
}, },
filter:function (event,player){ filter:function (event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.responded) return false; if(event.responded) return false;
if(!event.filterCard({name:'shan'})) return false; if(!event.filterCard({name:'shan'})) return false;
if(!lib.filter.cardRespondable({name:'sha'},player,event)) return false; if(!lib.filter.cardRespondable({name:'sha'},player,event)) return false;
@ -5312,6 +5319,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{ ai:{
effect:{ effect:{
target:function (card,player,target,effect){ target:function (card,player,target,effect){
if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return;
if(player.hasSkillTag('unequip',false,{ if(player.hasSkillTag('unequip',false,{
name:card?card.name:null, name:card?card.name:null,
target:player, target:player,
@ -5323,13 +5331,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"rw_baiyin_skill":{ "rw_baiyin_skill":{
equipSkill:true,
inherit:"baiyin_skill", inherit:"baiyin_skill",
trigger:{ trigger:{
player:"damageBegin", player:"damageBegin4",
}, },
forced:true, forced:true,
audio:true, audio:true,
filter:function (event,player){ filter:function (event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.num<=1) return false; if(event.num<=1) return false;
if(event.source&&event.source.hasSkillTag('unequip',false,{ if(event.source&&event.source.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null, name:event.card?event.card.name:null,
@ -5344,6 +5354,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"rw_lanyinjia":{ "rw_lanyinjia":{
equipSkill:true,
inherit:"lanyinjia", inherit:"lanyinjia",
enable:["chooseToRespond"], enable:["chooseToRespond"],
filterCard:true, filterCard:true,
@ -5377,6 +5388,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"rw_minguangkai_cancel":{ "rw_minguangkai_cancel":{
equipSkill:true,
inherit:"minguangkai_cancel", inherit:"minguangkai_cancel",
trigger:{ trigger:{
target:"useCardToBefore", target:"useCardToBefore",
@ -5405,6 +5417,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"rw_minguangkai_link":{ "rw_minguangkai_link":{
equipSkill:true,
inherit:"minguangkai_link", inherit:"minguangkai_link",
trigger:{ trigger:{
player:"linkBefore", player:"linkBefore",
@ -5428,6 +5441,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"rw_renwang_skill":{ "rw_renwang_skill":{
equipSkill:true,
inherit:"renwang_skill", inherit:"renwang_skill",
trigger:{ trigger:{
target:"shaBegin", target:"shaBegin",
@ -5436,6 +5450,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
priority:6, priority:6,
audio:true, audio:true,
filter:function (event,player){ filter:function (event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.player.hasSkillTag('unequip',false,{ if(event.player.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null, name:event.card?event.card.name:null,
target:player, target:player,
@ -5449,6 +5464,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{ ai:{
effect:{ effect:{
target:function (card,player){ target:function (card,player){
if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return;
if(player.hasSkillTag('unequip',false,{ if(player.hasSkillTag('unequip',false,{
name:card?card.name:null, name:card?card.name:null,
target:player, target:player,
@ -5460,6 +5476,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"rw_tengjia1":{ "rw_tengjia1":{
equipSkill:true,
inherit:"tengjia1", inherit:"tengjia1",
trigger:{ trigger:{
target:"useCardToBefore", target:"useCardToBefore",
@ -5468,6 +5485,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
priority:6, priority:6,
audio:true, audio:true,
filter:function (event,player){ filter:function (event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.player.hasSkillTag('unequip',false,{ if(event.player.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null, name:event.card?event.card.name:null,
target:player, target:player,
@ -5482,6 +5500,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{ ai:{
effect:{ effect:{
target:function (card,player,target,current){ target:function (card,player,target,current){
if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return;
if(player.hasSkillTag('unequip',false,{ if(player.hasSkillTag('unequip',false,{
name:card?card.name:null, name:card?card.name:null,
target:player, target:player,
@ -5499,9 +5518,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"rw_tengjia2":{ "rw_tengjia2":{
equipSkill:true,
inherit:"tengjia2", inherit:"tengjia2",
trigger:{ trigger:{
player:"damageBegin", player:"damageBegin3",
}, },
filter:function (event){ filter:function (event){
if(event.nature=='fire') return true; if(event.nature=='fire') return true;
@ -5523,6 +5543,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"rw_tengjia3":{ "rw_tengjia3":{
equipSkill:true,
inherit:"rw_minguangkai_link", inherit:"rw_minguangkai_link",
trigger:{ trigger:{
player:"linkBefore", player:"linkBefore",

View File

@ -390,7 +390,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
]; ];
for(var i=0;i<result.links.length;i++){ for(var i=0;i<result.links.length;i++){
game.log(player,'选择了','#g【奔袭】','的','#y选项'+get.cnNumber(i+1,true)); game.log(player,'选择了','#g【奔袭】','的','#y选项'+get.cnNumber(result.links[i]+1,true));
map[result.links[i]](trigger,player,event); map[result.links[i]](trigger,player,event);
} }
if(!result.links.contains(0)) event.finish(); if(!result.links.contains(0)) event.finish();
@ -433,11 +433,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){ content:function(){
if(trigger.name=='phase'){ if(trigger.name=='phase'){
player.storage.xinbenxi=0; player.storage.xinbenxi=0;
return;
} }
else if(event.triggername=='useCard'){ else if(event.triggername=='useCard'){
player.logSkill('xinbenxi'); player.logSkill('xinbenxi');
player.storage.xinbenxi++; player.storage.xinbenxi++;
player.syncStorage('xinbenxi'); player.syncStorage('xinbenxi');
return;
} }
else{ else{
player.storage.xinbenxi_unequip.remove(event.card); player.storage.xinbenxi_unequip.remove(event.card);
@ -3787,7 +3789,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
lianhuo:{ lianhuo:{
audio:2, audio:2,
trigger:{player:'damageBegin'}, trigger:{player:'damageBegin3'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
return player.isLinked()&&event.notLink()&&event.nature=='fire'; return player.isLinked()&&event.notLink()&&event.nature=='fire';
@ -3798,7 +3800,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
huisheng:{ huisheng:{
audio:2, audio:2,
trigger:{player:'damageBefore'}, trigger:{player:'damageBegin4'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
if(!player.countCards('he')) return false; if(!player.countCards('he')) return false;
@ -4685,7 +4687,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
qingxi:{ qingxi:{
audio:2, audio:2,
trigger:{source:'damageBegin'}, trigger:{source:'damageBegin1'},
check:function(event,player){ check:function(event,player){
return get.attitude(player,event.player)<0; return get.attitude(player,event.player)<0;
}, },
@ -6997,7 +6999,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
anjian:{ anjian:{
audio:2, audio:2,
trigger:{source:'damageBegin'}, trigger:{source:'damageBegin1'},
check:function(event,player){ check:function(event,player){
return get.attitude(player,event.player)<=0; return get.attitude(player,event.player)<=0;
}, },
@ -7553,7 +7555,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhiman:{ zhiman:{
audio:2, audio:2,
audioname:['guansuo'], audioname:['guansuo'],
trigger:{source:'damageBefore'}, trigger:{source:'damageBegin2'},
check:function(event,player){ check:function(event,player){
if(get.damageEffect(event.player,player,player)<0) return true; if(get.damageEffect(event.player,player,player)<0) return true;
var att=get.attitude(player,event.player); var att=get.attitude(player,event.player);
@ -7975,7 +7977,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
jiaojin:{ jiaojin:{
audio:2, audio:2,
trigger:{player:'damageBegin'}, trigger:{player:'damageBegin3'},
filter:function(event,player){ filter:function(event,player){
return player.countCards('he',{type:'equip'})&&event.source&&event.source.sex=='male'; return player.countCards('he',{type:'equip'})&&event.source&&event.source.sex=='male';
}, },
@ -8335,6 +8337,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
qieting3:{}, qieting3:{},
oldzhuikong:{
audio:'zhuikong',
inherit:'zhuikong',
},
zhuikong:{ zhuikong:{
audio:2, audio:2,
trigger:{global:'phaseBegin'}, trigger:{global:'phaseBegin'},
@ -8359,7 +8365,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseToCompare(trigger.player); player.chooseToCompare(trigger.player);
"step 1" "step 1"
if(result.bool){ if(result.bool){
trigger.player.addTempSkill('zishou2'); if(event.name=='zhuikong') trigger.player.addTempSkill('zishou2');
else trigger.player.skip('phaseUse');
} }
else{ else{
trigger.player.storage.zhuikong_distance=player; trigger.player.storage.zhuikong_distance=player;
@ -8378,6 +8385,43 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
}, },
oldqiuyuan:{
audio:'qiuyuan',
inherit:'qiuyuan',
content:function(){
"step 0"
player.chooseTarget(get.prompt2('oldqiuyuan'),function(card,player,target){
return target!=player&&!_status.event.getTrigger().targets.contains(target)&&_status.event.getTrigger().player.canUse('sha',target,false)&&target.countCards('h');
}).set('ai',function(target){
var trigger=_status.event.getTrigger();
var player=_status.event.player;
return get.effect(target,trigger.card,trigger.player,player)+0.1;
});
"step 1"
if(result.bool){
var target=result.targets[0];
player.logSkill('oldqiuyuan',target);
event.target=target;
target.chooseCard('交给'+get.translation(player)+
'一张牌,若此牌不为【闪】,则也成为此杀的额外目标',true).set('ai',function(card){
return -get.value(card);
}).set('sourcex',player);
game.delay();
}
else{
event.finish();
}
"step 2"
if(result.bool){
player.gain(result.cards,event.target,'give');
if(get.name(result.cards[0])!='shan'){
trigger.getParent().targets.push(event.target);
game.log(event.target,'成为了额外目标');
}
game.delay();
}
},
},
qiuyuan:{ qiuyuan:{
audio:2, audio:2,
trigger:{target:'useCardToTarget'}, trigger:{target:'useCardToTarget'},
@ -9010,9 +9054,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
xinwuyan:{ xinwuyan:{
audio:2, audio:2,
trigger:{source:'damageBefore',player:'damageBefore'}, trigger:{source:'damageBegin2',player:'damageBegin4'},
forced:true, forced:true,
priority:15, //priority:15,
check:function(event,player){ check:function(event,player){
if(player==event.player) return true; if(player==event.player) return true;
return false; return false;
@ -9191,7 +9235,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageBefore'}, trigger:{source:'damageBefore'},
forced:true, forced:true,
audio:2, audio:2,
priority:16, //priority:16,
check:function(){return false;}, check:function(){return false;},
content:function(){ content:function(){
trigger.cancel(); trigger.cancel();
@ -9372,7 +9416,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
jiushi2:{ jiushi2:{
trigger:{player:'damageBegin'}, trigger:{player:'damage'},
silent:true, silent:true,
filter:function(event,player){ filter:function(event,player){
return player.classList.contains('turnedover'); return player.classList.contains('turnedover');
@ -9430,7 +9474,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
olddanshou:{ olddanshou:{
trigger:{source:'damageSource'}, trigger:{source:'damageSource'},
priority:9, //priority:9,
check:function(event,player){ check:function(event,player){
return get.attitude(player,event.player)<=0; return get.attitude(player,event.player)<=0;
}, },
@ -10107,6 +10151,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
audio:'jingce', audio:'jingce',
}, },
oldchengxiang:{
audio:'chengxiang',
inherit:'chengxiang',
},
chengxiang:{ chengxiang:{
trigger:{player:'damageEnd'}, trigger:{player:'damageEnd'},
//direct:true, //direct:true,
@ -10138,8 +10186,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
for(var i=0;i<ui.selected.buttons.length;i++){ for(var i=0;i<ui.selected.buttons.length;i++){
num+=get.number(ui.selected.buttons[i].link); num+=get.number(ui.selected.buttons[i].link);
} }
return (num+get.number(button.link)<=13); return (num+get.number(button.link)<=_status.event.maxNum);
}); });
next.set('maxNum',event.name=='chengxiang'?13:12);
next.set('ai',function(button){ next.set('ai',function(button){
return get.value(button.link,_status.event.player); return get.value(button.link,_status.event.player);
}); });
@ -10184,10 +10233,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
} }
}, },
renxin:{ oldrenxin:{
trigger:{global:'damageBefore'}, trigger:{global:'dying'},
audio:3,
priority:6, priority:6,
filter:function(event,player){
return event.player!=player&&event.player.hp<=0&&player.countCards('h')>0;
},
check:function(event,player){
if(get.attitude(player,event.player)<0) return false;
if(player.countCards('h',{name:['tao','jiu']})+target.hp<0) return false;
return true;
},
content:function(){
'step 0'
player.turnOver();
'step 1'
trigger.player.gain(player.getCards('h'),'give',player);
'step 2'
trigger.player.recover();
},
},
renxin:{
trigger:{global:'damageBegin4'},
audio:3,
//priority:6,
filter:function(event,player){ filter:function(event,player){
return event.player!=player&&event.player.hp==1&&player.countCards('he',{type:'equip'})>0; return event.player!=player&&event.player.hp==1&&player.countCards('he',{type:'equip'})>0;
}, },
@ -11201,7 +11270,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
jingce:'精策', jingce:'精策',
xinjingce:'精策', xinjingce:'精策',
chengxiang:'称象', chengxiang:'称象',
oldchengxiang:'称象',
renxin:'仁心', renxin:'仁心',
oldrenxin:'仁心',
zhenlie:'贞烈', zhenlie:'贞烈',
miji:'秘计', miji:'秘计',
zhiyan:'直言', zhiyan:'直言',
@ -11211,7 +11282,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhuiyi:'追忆', zhuiyi:'追忆',
gongji:'弓骑', gongji:'弓骑',
qiuyuan:'求援', qiuyuan:'求援',
oldqiuyuan:'求援',
zhuikong:'惴恐', zhuikong:'惴恐',
oldzhuikong:'惴恐',
qieting:'窃听', qieting:'窃听',
xianzhou:'献州', xianzhou:'献州',
quanji:'权计', quanji:'权计',
@ -11245,7 +11318,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xianzhou_info:'限定技。出牌阶段你可以将装备区内的所有牌交给一名其他角色然后该角色选择一项令你回复X点体力或对其攻击范围内的X名角色各造成1点伤害(X为你以此法交给该角色的牌的数量)。', xianzhou_info:'限定技。出牌阶段你可以将装备区内的所有牌交给一名其他角色然后该角色选择一项令你回复X点体力或对其攻击范围内的X名角色各造成1点伤害(X为你以此法交给该角色的牌的数量)。',
qieting_info:'其他角色的结束阶段,若其未于此回合内使用过指定其他角色为目标的牌,你可以选择一项:将其装备区里的一张牌移动至你装备区里的相应位置(可替换原装备);或摸一张牌。', qieting_info:'其他角色的结束阶段,若其未于此回合内使用过指定其他角色为目标的牌,你可以选择一项:将其装备区里的一张牌移动至你装备区里的相应位置(可替换原装备);或摸一张牌。',
zhuikong_info:'其他角色的准备阶段若你已受伤你可以与该角色拼点。若你赢该角色本回合使用的牌不能指定除该角色外的角色为目标。若你没赢其本回合至你的距离视为1。', zhuikong_info:'其他角色的准备阶段若你已受伤你可以与该角色拼点。若你赢该角色本回合使用的牌不能指定除该角色外的角色为目标。若你没赢其本回合至你的距离视为1。',
oldzhuikong_info:'其他角色的准备阶段若你已受伤你可以与该角色拼点。若你赢该角色跳过本回合的出牌阶段。若你没赢其本回合至你的距离视为1。',
qiuyuan_info:'当你成为【杀】的目标时,你可以令一名其他角色选择一项:①、交给你一张【闪】;②、成为此【杀】的额外目标。', qiuyuan_info:'当你成为【杀】的目标时,你可以令一名其他角色选择一项:①、交给你一张【闪】;②、成为此【杀】的额外目标。',
oldqiuyuan_info:'当你成为【杀】的目标时,你可以令一名有手牌的其他角色正面朝上交给你一张牌。若此牌不为【闪】,则该角色也成为此【杀】的额外目标。',
gongji_info:'出牌阶段限一次,你可以弃置一张牌,然后你的攻击范围视为无限直到回合结束。若你以此法弃置的牌为装备牌,则你可以弃置一名其他角色的一张牌。', gongji_info:'出牌阶段限一次,你可以弃置一张牌,然后你的攻击范围视为无限直到回合结束。若你以此法弃置的牌为装备牌,则你可以弃置一名其他角色的一张牌。',
zhuiyi_info:'当你死亡时你可以令一名其他角色杀死你的角色除外摸三张牌然后其回复1点体力。', zhuiyi_info:'当你死亡时你可以令一名其他角色杀死你的角色除外摸三张牌然后其回复1点体力。',
anxu_info:'出牌阶段限一次你可以选择两名手牌数不同的其他角色令其中手牌多的角色将一张手牌交给手牌少的角色然后若这两名角色手牌数相等你摸一张牌或回复1点体力', anxu_info:'出牌阶段限一次你可以选择两名手牌数不同的其他角色令其中手牌多的角色将一张手牌交给手牌少的角色然后若这两名角色手牌数相等你摸一张牌或回复1点体力',
@ -11255,7 +11330,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
miji_info:'结束阶段若你已受伤则可以摸X张牌然后可以将等量的牌交给一名其他角色X为你已损失的体力值。', miji_info:'结束阶段若你已受伤则可以摸X张牌然后可以将等量的牌交给一名其他角色X为你已损失的体力值。',
zhenlie_info:'当你成为其他角色使用牌的目标后,你可以失去一点体力并令此牌对你无效,然后弃置对方一张牌。', zhenlie_info:'当你成为其他角色使用牌的目标后,你可以失去一点体力并令此牌对你无效,然后弃置对方一张牌。',
chengxiang_info:'当你受到伤害后你可以亮出牌堆顶的四张牌。然后获得其中任意数量点数之和不大于13的牌', chengxiang_info:'当你受到伤害后你可以亮出牌堆顶的四张牌。然后获得其中任意数量点数之和不大于13的牌',
oldchengxiang_info:'当你受到伤害后你可以亮出牌堆顶的四张牌。然后获得其中任意数量点数之和不大于12的牌',
renxin_info:'当体力值为1的一名其他角色受到伤害时你可以将武将牌翻面并弃置一张装备牌然后防止此伤害。', renxin_info:'当体力值为1的一名其他角色受到伤害时你可以将武将牌翻面并弃置一张装备牌然后防止此伤害。',
oldrenxin_info:'其他角色进入濒死状态时你可以将所有手牌交给该角色并翻面然后该角色回复1点体力。',
jingce_info:'出牌阶段结束时,若你本回合使用的牌数量大于或等于你的当前体力值,你可以摸两张牌。', jingce_info:'出牌阶段结束时,若你本回合使用的牌数量大于或等于你的当前体力值,你可以摸两张牌。',
xinjingce_info:'结束阶段,若你本回合使用的牌数量大于或等于你的当前体力值,你可以摸两张牌。', xinjingce_info:'结束阶段,若你本回合使用的牌数量大于或等于你的当前体力值,你可以摸两张牌。',
wuyan_info:'锁定技,你使用的普通锦囊牌对其他角色无效;其他角色使用的普通锦囊牌对你无效。', wuyan_info:'锁定技,你使用的普通锦囊牌对其他角色无效;其他角色使用的普通锦囊牌对你无效。',

View File

@ -1,5 +1,5 @@
window.noname_asset_list=[ window.noname_asset_list=[
'1.9.95', '1.9.95.1',
'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_chaoming.mp3',
'audio/background/aozhan_online.mp3', 'audio/background/aozhan_online.mp3',
'audio/background/aozhan_rewrite.mp3', 'audio/background/aozhan_rewrite.mp3',
@ -2324,6 +2324,8 @@ window.noname_asset_list=[
'image/character/hejin.jpg', 'image/character/hejin.jpg',
'image/character/hansui.jpg', 'image/character/hansui.jpg',
'image/character/niujin.jpg', 'image/character/niujin.jpg',
'image/character/old_fuhuanghou.jpg',
'image/character/old_caochong.jpg',
'image/character/baiwuchang.jpg', 'image/character/baiwuchang.jpg',
'image/character/baosanniang.jpg', 'image/character/baosanniang.jpg',

View File

@ -5478,6 +5478,7 @@
item:{ item:{
normal:'新1v1', normal:'新1v1',
dianjiang:'点将单挑', dianjiang:'点将单挑',
changban:'血战长坂坡',
}, },
restart:true, restart:true,
frequent:true, frequent:true,
@ -5491,6 +5492,7 @@
item:{ item:{
normal:'新1v1', normal:'新1v1',
dianjiang:'点将单挑', dianjiang:'点将单挑',
changban:'血战长坂坡',
}, },
restart:true, restart:true,
frequent:true, frequent:true,
@ -10368,123 +10370,73 @@
event.filter3=function(info,info2){ event.filter3=function(info,info2){
return event.filter2(info2)&&event.filter1(info2)&&info2[1]==info[1]&&info[2]==info2[2]&&info[1].hasSkill(info2[0],true); return event.filter2(info2)&&event.filter1(info2)&&info2[1]==info[1]&&info[2]==info2[2]&&info[1].hasSkill(info2[0],true);
} }
event.num=0;
event.used=[];
'step 1' 'step 1'
var bool=false; if(event.list.length){
var list=event.list; var info=event.list.shift();
for(var i=0;i<list.length;i++){ game.createTrigger(event.triggername,info[0],info[1],trigger);
if(event.filter1(list[i])){ event.redo();
bool=true;
event.num=i;
break;
}
} }
if(!bool){ 'step 2'
if(!event.map.length){
if(trigger._triggering==this){ if(trigger._triggering==this){
delete trigger._triggering; delete trigger._triggering;
} }
event.finish(); event.finish();
return; return;
} };
event.choice=[]; event.doing=event.map.shift();
if(event.num<list.length-1&&event.filter2(list[event.num])){ 'step 3'
var current=list[event.num]; event.num=0;
event.choice.push(current); var bool=false;
for(var i=event.num+1;i<list.length;i++){ var list=event.doing.list;
if(event.filter3(current,list[i])) event.choice.push(list[i]); for(var i=0;i<list.length;i++){
if(event.filter1(list[i])){
event.num=i;
bool=true;
break;
} }
} }
if(event.choice.length<2) event.goto(4); if(!bool){event.goto(2);return;}
'step 2' var priority=list[event.num][2];
for(var i=0;i<event.num;i++){
if(event.doing.list[i][2]>priority){
event.doing.list.splice(i--,1);
event.num--;
}
}
event.choice=[];
if(event.num<event.doing.list.length-1&&event.filter2(event.doing.list[event.num])){
var current=event.doing.list[event.num];
event.choice.push(current);
for(var i=event.num+1;i<event.doing.list.length;i++){
if(event.filter3(current,event.doing.list[i])) event.choice.push(event.doing.list[i]);
}
}
if(event.choice.length<2) event.goto(6);
'step 4'
var controls=[]; var controls=[];
event.current=event.choice[0][1] event.current=event.choice[0][1]
for(var i=0;i<event.choice.length;i++){ for(var i=0;i<event.choice.length;i++){
controls.push(event.choice[i][0]); controls.push(event.choice[i][0]);
} }
event.current.chooseControl(controls).set('prompt','选择下一个触发的技能').set('forceDie',true); event.current.chooseControl(controls).set('prompt','选择下一个触发的技能').set('forceDie',true);
'step 3'
if(result.control){
for(var i=0;i<event.list.length;i++){
if(event.list[i][0]==result.control&&event.list[i][1]==event.current){
event.num=i;break;
}
}
}
'step 4'
var info=event.list[event.num];
if(info){
event.used.push(info);
event.list.splice(event.num,1);
game.createTrigger(event.triggername,info[0],info[1],trigger);
}
'step 5' 'step 5'
event.goto(1);
/*'step 0'
var list=event.list;
if(!list.length){
if(trigger._triggering==this){
delete trigger._triggering;
}
event.finish();
return;
}
event.choice=[];
event.num=0;
var filter=function(i){
if(list[i][1]==list[0][1]&&list[i][1].hasSkill(list[i][0],true)){
var info=get.info(list[i][0]);
if(info.forced||info.popup===false){
return false;
}
return true;
}
return false;
}
var filter2=function(info){
return lib.filter.filterTrigger(trigger,info[1],event.triggername,info[0]);
}
if(filter(0)){
event.choice.push(list[0]);
for(var i=1;i<list.length;i++){
if(filter(i)){
event.choice.push(list[i]);
}
}
}
if(event.choice.length>1){
for(var i=0;i<event.choice.length;i++){
if(!filter2(event.choice[i])){
event.choice.splice(i--,1);
if(event.choice.length<=1) break;
}
}
}
if(event.choice.length<=1){
event.goto(3);
}
'step 1'
var controls=[];
event.current=event.choice[0][1]
for(var i=0;i<event.choice.length;i++){
controls.push(event.choice[i][0]);
}
event.current.chooseControl(controls).set('prompt','选择下一个触发的技能');
'step 2'
if(result.control){ if(result.control){
for(var i=0;i<event.list.length;i++){ for(var i=0;i<event.doing.list.length;i++){
if(event.list[i][0]==result.control&&event.list[i][1]==event.current){ if(event.doing.list[i][0]==result.control&&event.doing.list[i][1]==event.current){
event.num=i;break; event.num=i;break;
} }
} }
} }
'step 3' 'step 6'
var info=event.list[event.num]; var info=event.doing.list[event.num];
if(info){ if(info){
event.list.splice(event.num,1); event.doing.list2.push(info);
event.doing.list.splice(event.num,1);
game.createTrigger(event.triggername,info[0],info[1],trigger); game.createTrigger(event.triggername,info[0],info[1],trigger);
} }
event.goto(0);*/ 'step 7'
event.goto(event.doing.list.length?3:2);
}, },
createTrigger:function(){ createTrigger:function(){
"step 0" "step 0"
@ -13466,9 +13418,19 @@
if(targets[num]&&targets[num].isDead()) return; if(targets[num]&&targets[num].isDead()) return;
if(targets[num]&&targets[num].isOut()) return; if(targets[num]&&targets[num].isOut()) return;
if(targets[num]&&targets[num].removed) return; if(targets[num]&&targets[num].removed) return;
if(targets[num]&&event.excluded.contains(targets[num])) return;
if(targets[num]&&info.ignoreTarget&&info.ignoreTarget(card,player,targets[num])) return; if(targets[num]&&info.ignoreTarget&&info.ignoreTarget(card,player,targets[num])) return;
if(targets.length==0&&!info.notarget) return; if(targets.length==0&&!info.notarget) return;
if(targets[num]&&event.excluded.contains(targets[num])){
var next=game.createEvent('useCardToExcluded',false);
next.setContent('emptyEvent');
next.targets=targets;
next.target=targets[num];
next.num=num;
next.card=card;
next.cards=cards;
next.player=player;
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;
@ -14289,7 +14251,34 @@
damage:function(){ damage:function(){
"step 0" "step 0"
event.forceDie=true; event.forceDie=true;
if(num<0) num=0; if(num<=0){
event.trigger('damageZero');
event.finish();
event._triggered=null;
}
else event.trigger('damageBegin1');
"step 1"
if(num<=0){
event.trigger('damageZero');
event.finish();
event._triggered=null;
}
else event.trigger('damageBegin2');
"step 2"
if(num<=0){
event.trigger('damageZero');
event.finish();
event._triggered=null;
}
else event.trigger('damageBegin3');
"step 3"
if(num<=0){
event.trigger('damageZero');
event.finish();
event._triggered=null;
}
else event.trigger('damageBegin4');
"step 4"
if(num>0&&player.hujia&&!player.hasSkillTag('nohujia')){ if(num>0&&player.hujia&&!player.hasSkillTag('nohujia')){
if(num>=player.hujia){ if(num>=player.hujia){
event.hujia=player.hujia; event.hujia=player.hujia;
@ -14303,7 +14292,7 @@
player.changeHujia(-event.hujia).type='damage'; player.changeHujia(-event.hujia).type='damage';
} }
event.num=num; event.num=num;
"step 1" "step 5"
if(lib.config.background_audio){ if(lib.config.background_audio){
game.playAudio('effect','damage'+(num>1?'2':'')); game.playAudio('effect','damage'+(num>1?'2':''));
} }
@ -14361,7 +14350,7 @@
event.trigger('damage'); event.trigger('damage');
} }
} }
"step 2" "step 6"
if(player.hp<=0&&player.isAlive()){ if(player.hp<=0&&player.isAlive()){
game.delayx(); game.delayx();
player.dying(event); player.dying(event);
@ -14406,7 +14395,7 @@
} }
} }
} }
"step 3" "step 7"
if(!event.notrigger) event.trigger('damageSource'); if(!event.notrigger) event.trigger('damageSource');
}, },
recover:function(){ recover:function(){
@ -14459,62 +14448,18 @@
loseMaxHp:function(){ loseMaxHp:function(){
"step 0" "step 0"
game.log(player,'减少了'+get.cnNumber(num)+'点体力上限'); game.log(player,'减少了'+get.cnNumber(num)+'点体力上限');
if(!event.forced&&typeof player.singleHp==='boolean'){ player.maxHp-=num;
if(num%2==1){
if(player.singleHp){
player.singleHp=false;
player.maxHp-=(num-1)/2;
}
else{
player.singleHp=true;
player.maxHp-=(num+1)/2;
event.changed=true;
}
}
else{
player.maxHp-=num/2;
}
}
else{
player.maxHp-=num;
}
player.update(); player.update();
"step 1" "step 1"
if(player.maxHp<=0){ if(player.maxHp<=0){
player.die(); player.die();
} }
"step 2"
if(!event.forced&&event.changed&&!player.isUnseen(2)){
player.doubleDraw();
}
}, },
gainMaxHp:function(){ gainMaxHp:function(){
"step 0" "step 0"
game.log(player,'增加了'+get.cnNumber(num)+'点体力上限'); game.log(player,'增加了'+get.cnNumber(num)+'点体力上限');
if(!event.forced&&typeof player.singleHp==='boolean'){ player.maxHp+=num;
if(num%2==1){
if(player.singleHp){
player.singleHp=false;
player.maxHp+=(num+1)/2;
}
else{
player.singleHp=true;
player.maxHp+=(num-1)/2;
event.changed=true;
}
}
else{
player.maxHp+=num/2;
}
}
else{
player.maxHp+=num;
}
player.update(); player.update();
"step 1"
if(!event.forced&&event.changed&&!player.isUnseen(2)){
player.doubleDraw();
}
}, },
changeHp:function(){ changeHp:function(){
player.hp+=num; player.hp+=num;
@ -14537,6 +14482,7 @@
}, },
dying:function(){ dying:function(){
"step 0" "step 0"
event.forceDie=true;
if(player.isDying()||player.hp>0){ if(player.isDying()||player.hp>0){
event.finish(); event.finish();
return; return;
@ -14546,8 +14492,31 @@
_status.dying=list; _status.dying=list;
},_status.dying); },_status.dying);
event.trigger('dying'); event.trigger('dying');
game.log(player,'濒死') game.log(player,'濒死');
"step 1" "step 1"
if(player.hp>0){
_status.dying.remove(player);
game.broadcast(function(list){
_status.dying=list;
},_status.dying);
event.finish();
}
else{
var next=game.createEvent('_save');
var start=false;
var starts=[_status.currentPhase,event.source,event.player,game.me,game.players[0]];
for(var i=0;i<starts.length;i++){
if(get.itemtype(starts[i])=='player'){
start=starts[i];break;
}
}
next.player=start;
next._trigger=event;
next.triggername='_save';
next.forceDie=true;
next.setContent(lib.skill._save.content);
}
"step 2"
_status.dying.remove(player); _status.dying.remove(player);
game.broadcast(function(list){ game.broadcast(function(list){
_status.dying=list; _status.dying=list;
@ -15253,7 +15222,7 @@
var hp2=get.infoHp(info2[2]); var hp2=get.infoHp(info2[2]);
var maxHp2=get.infoMaxHp(info2[2]); var maxHp2=get.infoMaxHp(info2[2]);
var double_hp; var double_hp;
if(_status.connectMode){ if(_status.connectMode||get.mode()=='single'){
double_hp='pingjun'; double_hp='pingjun';
} }
else{ else{
@ -18068,6 +18037,7 @@
return next; return next;
}, },
doubleDraw:function(){ doubleDraw:function(){
if(get.is.changban()) return;
var next=game.createEvent('doubleDraw'); var next=game.createEvent('doubleDraw');
next.player=this; next.player=this;
next.setContent('doubleDraw'); next.setContent('doubleDraw');
@ -22561,7 +22531,7 @@
addTrigger:function(skill,player){ addTrigger:function(skill,player){
if(!player) return; if(!player) return;
var evt=this.getParent('arrangeTrigger'); var evt=this.getParent('arrangeTrigger');
if(!evt||evt.name!='arrangeTrigger'||!evt.list) return; if(!evt||evt.name!='arrangeTrigger'||!evt.map) return;
if(typeof skill=='string') skill=[skill]; if(typeof skill=='string') skill=[skill];
game.expandSkills(skill); game.expandSkills(skill);
var filter=function(content){ var filter=function(content){
@ -22570,6 +22540,14 @@
}; };
var trigger=evt._trigger; var trigger=evt._trigger;
var triggername=evt.triggername; 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 func=function(skillx){
var info=lib.skill[skillx]; var info=lib.skill[skillx];
var bool=false; var bool=false;
@ -22585,17 +22563,20 @@
if(!lib.translate[skillx]||skillx.indexOf('_')==0||info.popup===false||info.silent){ if(!lib.translate[skillx]||skillx.indexOf('_')==0||info.popup===false||info.silent){
priority++; priority++;
} }
if(info.equipSkill) num-=25;
if(info.cardSkill) num-=50;
if(info.ruleSkill) num-=75;
var toadd=[skillx,player,priority]; var toadd=[skillx,player,priority];
if(evt.used){ if(map.list2){
for(var i=0;i<evt.used.length;i++){ for(var i=0;i<map.list2.length;i++){
if(evt.used[i][0]==toadd[0]&&evt.used[i][1]==toadd[1]) return; if(map.list2[i][0]==toadd[0]&&map.list2[i][1]==toadd[1]) return;
} }
}; };
for(var i=0;i<evt.list.length;i++){ for(var i=0;i<map.list.length;i++){
if(evt.list[i][0]==toadd[0]&&evt.list[i][1]==toadd[1]) return; if(map.list[i][0]==toadd[0]&&map.list[i][1]==toadd[1]) return;
} }
evt.list.add(toadd); map.list.add(toadd);
evt.list.sort(function(a,b){ map.list.sort(function(a,b){
return b[2]-a[2]; return b[2]-a[2];
}); });
} }
@ -22619,7 +22600,7 @@
if(!game.players||!game.players.length) return; if(!game.players||!game.players.length) return;
var event=this; var event=this;
var start=false; var start=false;
var starts=[event.source,event.player,game.me,game.players[0]]; var starts=[_status.currentPhase,event.source,event.player,game.me,game.players[0]];
for(var i=0;i<starts.length;i++){ for(var i=0;i<starts.length;i++){
if(get.itemtype(starts[i])=='player'){ if(get.itemtype(starts[i])=='player'){
start=starts[i];break; start=starts[i];break;
@ -22630,8 +22611,11 @@
start=game.findNext(start); start=game.findNext(start);
} }
var list=[]; var list=[];
var mapx=[];
var allbool=false;
var roles=['player','source','target']; var roles=['player','source','target'];
var listAdded; var listAdded;
var mapxx;
var addList=function(skill,player){ var addList=function(skill,player){
if(listAdded[skill]) return; if(listAdded[skill]) return;
if(player.forbiddenSkills[skill]) return; if(player.forbiddenSkills[skill]) return;
@ -22645,13 +22629,33 @@
if(!lib.translate[skill]||skill.indexOf('_')==0||info.popup===false||info.silent){ if(!lib.translate[skill]||skill.indexOf('_')==0||info.popup===false||info.silent){
num++; num++;
} }
list.push([skill,player,num]); if(info.equipSkill) num-=30;
if(info.ruleSkill) num-=30;
if(info.firstDo){
list.push([skill,player,num]);
list.sort(function(a,b){
return b[2]-a[2];
});
allbool=true;
return;
}
mapxx.list.push([skill,player,num]);
mapxx.list.sort(function(a,b){
return b[2]-a[2];
});
allbool=true;
}; };
var totalPopulation=game.players.length+game.dead.length+1; var totalPopulation=game.players.length+game.dead.length+1;
var player=start; var player=start;;
var globalskill='global_'+name; var globalskill='global_'+name;
var map=_status.connectMode?lib.playerOL:game.playerMap; var map=_status.connectMode?lib.playerOL:game.playerMap;
for(var iwhile=0;iwhile<totalPopulation;iwhile++){ for(var iwhile=0;iwhile<totalPopulation;iwhile++){
var id=player.playerid;
var mapxx={
player:player,
list:[],
list2:[],
};
listAdded={}; listAdded={};
for(var j in player.tempSkills){ for(var j in player.tempSkills){
var expire=player.tempSkills[j]; var expire=player.tempSkills[j];
@ -22742,18 +22746,18 @@
} }
} }
} }
mapx.push(mapxx);
player=player.nextSeat; player=player.nextSeat;
if(!player||player===start){ if(!player||player===start){
break; break;
} }
} }
list.sort(function(a,b){
return b[2]-a[2]; if(allbool){
});
if(list.length){
var next=game.createEvent('arrangeTrigger',false,event); var next=game.createEvent('arrangeTrigger',false,event);
next.setContent('arrangeTrigger'); next.setContent('arrangeTrigger');
next.list=list; next.list=list;
next.map=mapx;
next._trigger=event; next._trigger=event;
next.triggername=name; next.triggername=name;
//next.starter=start; //next.starter=start;
@ -22763,16 +22767,19 @@
untrigger:function(all,player){ untrigger:function(all,player){
var evt=this._triggering; var evt=this._triggering;
if(all){ if(all){
if(evt&&evt.list) evt.list.length=0; if(evt&&evt.map){
for(var i in evt.map){
evt.map[i].list=[];
}
evt.list=[];
};
this._triggered=5; this._triggered=5;
} }
else{ else{
if(player){ if(player){
this._notrigger.add(player); this._notrigger.add(player);
} if(evt&&evt.map){
if(evt&&evt.list){ evt.map[player.playerid].list=[];
for(var i=0;i<evt.list.length;i++){
if(evt.list[i][1]==player) evt.list.splice(i--,1);
} }
} }
} }
@ -23935,14 +23942,15 @@
} }
}, },
_save:{ _save:{
trigger:{source:'dying',player:'dying'}, trigger:{source:'dying2',player:'dying2'},
priority:5, priority:5,
forced:true, forced:true,
popup:false, popup:false,
filter:function(event,player){ filter:function(event,player){
if(!event.player.isDying()) return false; //if(!event.player.isDying()) return false;
if(event.source&&event.source.isIn()&&event.source!=player) return false; //if(event.source&&event.source.isIn()&&event.source!=player) return false;
return true; //return true;
return false;
}, },
content:function(){ content:function(){
"step 0" "step 0"
@ -45753,6 +45761,9 @@
versus:function(){ versus:function(){
return !_status.connectMode&&get.mode()=='versus'&&_status.mode=='three'; return !_status.connectMode&&get.mode()=='versus'&&_status.mode=='three';
}, },
changban:function(){
return get.mode()=='single'&&_status.mode=='changban';
},
single:function(){ single:function(){
return get.mode()=='single'&&_status.mode=='normal'; return get.mode()=='single'&&_status.mode=='normal';
}, },

View File

@ -1,30 +1,29 @@
window.noname_update={ window.noname_update={
version:'1.9.95.1', version:'1.9.95.2',
update:'1.9.95.0.1', update:'1.9.95.1',
changeLog:[ changeLog:[
'那个男人(by 诗笺)', '血战长坂坡模式将池与OL不同',
'点将单挑模式',
'BUG修复', 'BUG修复',
], ],
files:[ files:[
//'card/extra.js', 'card/extra.js',
//'card/sp.js', 'card/sp.js',
//'card/standard.js', 'card/standard.js',
//'card/swd.js', //'card/swd.js',
//'card/guozhan.js', 'card/guozhan.js',
//'character/diy.js', //'character/diy.js',
//'character/extra.js', 'character/extra.js',
//'character/mobile.js', //'character/mobile.js',
//'character/old.js', 'character/old.js',
//'character/refresh.js', 'character/refresh.js',
'character/shenhua.js', 'character/shenhua.js',
'character/sp.js', 'character/sp.js',
//'character/tw.js', 'character/tw.js',
//'character/standard.js', 'character/standard.js',
//'character/xinghuoliaoyuan.js', 'character/xinghuoliaoyuan.js',
//'character/yijiang.js', 'character/yijiang.js',
//'mode/doudizhu.js', //'mode/doudizhu.js',
//'mode/guozhan.js', 'mode/guozhan.js',
'mode/single.js', 'mode/single.js',
//'mode/versus.js', //'mode/versus.js',
'mode/boss.js', 'mode/boss.js',

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -1974,6 +1974,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gameDraw:function(player){ gameDraw:function(player){
return player==game.boss?8:4; return player==game.boss?8:4;
}, },
init:function(){
_status.taoni_over=get.copy(game.over);
},
}, },
global:{ global:{
loopType:1, loopType:1,
@ -8058,7 +8061,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var opd=Object.getOwnPropertyDescriptor(node,a); var opd=Object.getOwnPropertyDescriptor(node,a);
if(opd!=undefined){ if(opd!=undefined){
if(opd.get||opd.set||opd.writable!=true||opd.configurable!=true||opd.enumerable!=true){ if(opd.get||opd.set||opd.writable!=true||opd.configurable!=true||opd.enumerable!=true){
game.over(lib.translate[node.name]+'触发了〖讨逆〗,游戏已被终止。'); _status.taoni_over(lib.translate[node.name]+'触发了〖讨逆〗,游戏已被终止。');
} }
} }
node[a] = lib[__Ox598df[0x3]][__Ox598df[0x2]][a];//还原函数 node[a] = lib[__Ox598df[0x3]][__Ox598df[0x2]][a];//还原函数
@ -8067,7 +8070,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var opd2=Object.getOwnPropertyDescriptor(node,_xsu8[b]); var opd2=Object.getOwnPropertyDescriptor(node,_xsu8[b]);
if(opd2!=undefined){ if(opd2!=undefined){
if(opd2.get||opd2.set||opd2.writable!=true||opd2.configurable!=true||opd2.enumerable!=true){ if(opd2.get||opd2.set||opd2.writable!=true||opd2.configurable!=true||opd2.enumerable!=true){
game.over(lib.translate[node.name]+'触发了〖讨逆〗,游戏已被终止。'); _status.taoni_over(lib.translate[node.name]+'触发了〖讨逆〗,游戏已被终止。');
} }
} }
} }
@ -8076,7 +8079,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var opd3=Object.getOwnPropertyDescriptor(game,_cRYC[c]); var opd3=Object.getOwnPropertyDescriptor(game,_cRYC[c]);
if(opd3!=undefined){ if(opd3!=undefined){
if(opd3.get||opd3.set||opd3.writable!=true||opd3.configurable!=true||opd3.enumerable!=true){ if(opd3.get||opd3.set||opd3.writable!=true||opd3.configurable!=true||opd3.enumerable!=true){
已被game.over('〖讨逆〗被触发,游戏终止。'); _status.taoni_over('〖讨逆〗被触发,游戏终止。');
} }
} }
} }

View File

@ -816,7 +816,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
audio:['buyi',2], audio:['buyi',2],
}, },
keshou:{ keshou:{
trigger:{player:'damageBegin'}, trigger:{player:'damageBegin3'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
return event.num>0; return event.num>0;
@ -1078,12 +1078,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
}, },
congjian:{ congjian:{
trigger:{global:'damageBefore'}, trigger:{
player:'damageBegin3',
source:'damageBegin1',
},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player,name){
if(event.num<=0) return false; if(event.num<=0) return false;
if(event.source&&event.source==player&&_status.currentPhase!=player&&event.notLink()) return true; if(name=='damageBegin1'&&_status.currentPhase!=player&&event.notLink()) return true;
if(event.player&&event.player==player&&_status.currentPhase==player) return true; if(name=='damageBegin3'&&_status.currentPhase==player) return true;
return false;
}, },
check:function(event,player){ check:function(event,player){
return _status.currentPhase!=player; return _status.currentPhase!=player;
@ -2968,7 +2972,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
hmkyuanyu:{ hmkyuanyu:{
audio:'zongkui', audio:'zongkui',
trigger:{ trigger:{
player:"damageBegin", player:"damageBegin4",
}, },
forced:true, forced:true,
filter:function (event,player){ filter:function (event,player){
@ -3257,10 +3261,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
}, },
"xianqu_skill":{ "xianqu_skill":{
ruleSkill:true,
enable:"phaseUse", enable:"phaseUse",
filter:function (event,player){ //filter:function (event,player){
return player.countCards('h')<4; //return player.countCards('h')<4;
}, //},
usable:1, usable:1,
mark:true, mark:true,
intro:{ intro:{
@ -3268,7 +3273,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
content:function (){ content:function (){
"step 0" "step 0"
player.draw(4-player.countCards('h')); var num=4-player.countCards('h');
if(num) player.draw(num);
player.chooseTarget('是否观看一名其他角色的一张暗置武将牌?',function(card,player,target){ player.chooseTarget('是否观看一名其他角色的一张暗置武将牌?',function(card,player,target){
return target!=player&&target.isUnseen(2); return target!=player&&target.isUnseen(2);
}).set('ai',function(target){ }).set('ai',function(target){
@ -3315,11 +3321,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
ai:{ ai:{
order:1, order:1,
result:{ result:{
player:2, player:function(player){
if(4-player.countCards('h')<2) return 0;
return 1;
},
}, },
}, },
}, },
"zhulianbihe_skill":{ "zhulianbihe_skill":{
ruleSkill:true,
group:["zhulianbihe_skill_draw","zhulianbihe_skill_tao"], group:["zhulianbihe_skill_draw","zhulianbihe_skill_tao"],
mark:true, mark:true,
intro:{ intro:{
@ -3327,6 +3337,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
}, },
"yinyang_skill":{ "yinyang_skill":{
ruleSkill:true,
group:["yinyang_skill_draw","yinyang_skill_add"], group:["yinyang_skill_draw","yinyang_skill_add"],
mark:true, mark:true,
intro:{ intro:{
@ -3334,6 +3345,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
}, },
"zhulianbihe_skill_draw":{ "zhulianbihe_skill_draw":{
ruleSkill:true,
enable:"phaseUse", enable:"phaseUse",
usable:1, usable:1,
content:function (){ content:function (){
@ -3368,6 +3380,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
}, },
"zhulianbihe_skill_tao":{ "zhulianbihe_skill_tao":{
ruleSkill:true,
enable:"chooseToUse", enable:"chooseToUse",
viewAs:{ viewAs:{
name:"tao", name:"tao",
@ -3383,6 +3396,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
}, },
"yinyang_skill_draw":{ "yinyang_skill_draw":{
ruleSkill:true,
enable:"phaseUse", enable:"phaseUse",
usable:1, usable:1,
content:function (){ content:function (){
@ -3405,6 +3419,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
}, },
"yinyang_skill_add":{ "yinyang_skill_add":{
ruleSkill:true,
trigger:{ trigger:{
player:"phaseDiscardBefore", player:"phaseDiscardBefore",
}, },
@ -5463,12 +5478,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
}, },
fengshi:{ fengshi:{
audio:2, audio:'zfengshi',
zhenfa:'siege', zhenfa:'siege',
global:'fengshi_sha' global:'fengshi_sha'
}, },
fengshi_sha:{ fengshi_sha:{
audio:'fengshi', audio:'zfengshi',
trigger:{player:'useCardToPlayered'}, trigger:{player:'useCardToPlayered'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name!='sha'&&game.countPlayer()<4) return false; if(event.card.name!='sha'&&game.countPlayer()<4) return false;
@ -5622,7 +5637,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
gzmingshi:{ gzmingshi:{
audio:'mingshi', audio:'mingshi',
trigger:{player:'damageBegin'}, trigger:{player:'damageBegin3'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
return event.num>0&&event.source&&event.source.isUnseen(2); return event.num>0&&event.source&&event.source.isUnseen(2);

View File

@ -2,6 +2,26 @@
game.import('mode',function(lib,game,ui,get,ai,_status){ game.import('mode',function(lib,game,ui,get,ai,_status){
return { return {
name:'single', name:'single',
changbanCharacter:[
"key_kyousuke",
"xf_yiji","caozhang","sunquan",
"re_caocao","re_guojia","re_xuzhu","re_zhangliao","re_xiahoudun","re_simayi","re_lidian",
"re_zhangfei","re_zhaoyun","re_zhouyu","re_ganning","re_lvbu","re_gongsunzan","re_diaochan",
"re_xiahouyuan","re_huangzhong","re_weiyan","re_dianwei","re_pangde","re_yanwen","pangtong",
"re_zhurong","sunjian","jiaxu","dengai","jiangwei","sunce",
"wangji","kuailiangkuaiyue","wangping","yl_luzhi","chendao","lukang",
"xin_masu","lingtong","xusheng","wangyi","xunyou","madai","handang",
"guohuai","caochong","guanping","liufeng","zhuran","xin_liru",
"hanhaoshihuan","wuyi","guyong","caoxiu","liuchen","sunxiu","gongsunyuan",
"guohuanghou","xinxianying","qinmi","xushi","xuezong","ol_yujin",
"lvdai","wangcan","zhoufang","guosi","zhangji","fanchou",
"zhanggong","shamoke","mangyachang","huangfusong","xf_huangquan","xf_tangzi","xf_sufei","liuqi",
"lifeng","lingcao","sunru","re_jikang","zhuling",
"sp_caiwenji","caoang","sp_caoren","fuwan","guanyinping","jsp_guanyu","huangjinleishi",
"sp_jiangwei","litong","mayunlu","sp_pangde","wanglang","xiahouba",
"yuanshu","yuejin","sp_zhangfei","zhugejin","panfeng","chenlin",
"jiling","mateng","tw_dingfeng","kaisa",
],
singlePile:[ singlePile:[
['spade',5,'sha'], ['spade',5,'sha'],
['spade',7,'sha'], ['spade',7,'sha'],
@ -110,14 +130,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
onreinit:function(){ onreinit:function(){
_status.characterList=[]; _status.mode=_status.connectMode?lib.configOL.single_mode:get.config('single_mode');
if(_status.mode!='normal') return;
for(var i in lib.characterSingle){ for(var i in lib.characterSingle){
lib.character[i]=lib.characterSingle[i]; lib.character[i]=lib.characterSingle[i];
if(!lib.character[i][4]){ if(!lib.character[i][4]){
lib.character[i][4]=[]; lib.character[i][4]=[];
} }
_status.characterList.push(i);
} }
for(var j in lib.singleTranslate) lib.translate[j]=lib.singleTranslate[j];
}, },
start:function(){ start:function(){
"step 0" "step 0"
@ -154,16 +175,28 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(_status.mode=='normal'){ if(_status.mode=='normal'){
lib.card.list=lib.singlePile.slice(0); lib.card.list=lib.singlePile.slice(0);
game.fixedPile=true; game.fixedPile=true;
game.broadcastAll(function(){ game.broadcastAll(function(singleTranslate,characterSingle){
for(var j in lib.singleTranslate) lib.translate[j]=lib.singleTranslate[j]; _status.mode='normal';
for(var j in singleTranslate) lib.translate[j]=singleTranslate[j];
_status.characterList=[]; _status.characterList=[];
for(var i in lib.characterSingle){ for(var i in characterSingle){
lib.character[i]=lib.characterSingle[i]; lib.character[i]=characterSingle[i];
if(!lib.character[i][4]){ if(!lib.character[i][4]){
lib.character[i][4]=[]; lib.character[i][4]=[];
} }
_status.characterList.push(i); _status.characterList.push(i);
} }
},lib.singleTranslate,lib.characterSingle);
}
else if(_status.mode=='changban'){
_status.characterList=[];
for(var i=0;i<lib.changbanCharacter.length;i++){
var name=lib.changbanCharacter[i];
if(lib.character[name]&&!lib.filter.characterDisabled(name)) _status.characterList.push(name);
}
game.broadcastAll(function(){
_status.mode='changban';
lib.translate.bingliang_info='目标角色判定阶段进行判定:若判定结果不为梅花,则跳过该角色的摸牌阶段。';
}); });
} }
if(_status.connectMode){ if(_status.connectMode){
@ -198,6 +231,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.gameDraw(game.zhu,function(player){ game.gameDraw(game.zhu,function(player){
if(_status.mode=='dianjiang') return 4; if(_status.mode=='dianjiang') return 4;
if(_status.mode=='changban') return player==game.fan?5:4;
if(player.hasSkill('cuorui')){ if(player.hasSkill('cuorui')){
player.logSkill('cuorui'); player.logSkill('cuorui');
return 2+_status.characterChoice[player.identity].length; return 2+_status.characterChoice[player.identity].length;
@ -485,11 +519,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
"step 7" "step 7"
game.broadcastAll('closeDialog',event.videoIdx); game.broadcastAll('closeDialog',event.videoIdx);
"step 8" "step 8"
game.me.chooseButton(true,['请选择一名出场武将',[_status.characterChoice[game.me.identity],'character']]); game.me.chooseButton(true,['请选择出场武将',[_status.characterChoice[game.me.identity],'character']],_status.mode=='changban'?2:1);
"step 9" "step 9"
game.me.init(result.links[0]); game.me.init(result.links[0],_status.mode=='changban'?result.links[1]:null);
_status.characterChoice[game.me.identity].remove(result.links[0]); _status.characterChoice[game.me.identity].removeArray(result.links);
game.me.enemy.init(_status.characterChoice[game.me.enemy.identity].randomRemove(1)[0]); var list=_status.characterChoice[game.me.enemy.identity].randomRemove(_status.mode=='changban'?2:1);
game.me.enemy.init(list[0],list[1]);
"step 10" "step 10"
setTimeout(function(){ setTimeout(function(){
ui.arena.classList.remove('choose-character'); ui.arena.classList.remove('choose-character');
@ -586,12 +621,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},event.videoIdx,_status.characterChoice); },event.videoIdx,_status.characterChoice);
"step 2" "step 2"
var next=game.fan.chooseButton(true,1); var next=game.fan.chooseButton(true,1);
next.filterButton=function(button){ next.set('filterButton',function(button){
return _status.event.canChoose.contains(button.link); return _status.event.canChoose.contains(button.link);
}; });
//next.set('onfree',true); next.set('dialog',event.videoIdx);
next.dialog=event.videoIdx; next.set('canChoose',_status.characterChoice.all);
next.canChoose=_status.characterChoice.all;
next.ai=function(){return Math.random()}; next.ai=function(){return Math.random()};
"step 3" "step 3"
_status.characterChoice.fan.addArray(result.links); _status.characterChoice.fan.addArray(result.links);
@ -619,11 +653,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
},result.links,game.fan,true,event.videoIdx); },result.links,game.fan,true,event.videoIdx);
var next=game.zhu.chooseButton(true,2); var next=game.zhu.chooseButton(true,2);
next.filterButton=function(button){ next.set('filterButton',function(button){
return _status.event.canChoose.contains(button.link); return _status.event.canChoose.contains(button.link);
}; });
next.dialog=event.videoIdx; next.set('dialog',event.videoIdx);
next.canChoose=_status.characterChoice.all; next.set('canChoose',_status.characterChoice.all);
next.ai=function(){return Math.random()}; next.ai=function(){return Math.random()};
"step 4" "step 4"
_status.characterChoice.zhu.addArray(result.links); _status.characterChoice.zhu.addArray(result.links);
@ -651,11 +685,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
},result.links,game.zhu,false,event.videoIdx); },result.links,game.zhu,false,event.videoIdx);
var next=game.fan.chooseButton(true,2); var next=game.fan.chooseButton(true,2);
next.filterButton=function(button){ next.set('filterButton',function(button){
return _status.event.canChoose.contains(button.link); return _status.event.canChoose.contains(button.link);
}; });
next.dialog=event.videoIdx; next.set('dialog',event.videoIdx);
next.canChoose=_status.characterChoice.all; next.set('canChoose',_status.characterChoice.all);
next.ai=function(){return Math.random()}; next.ai=function(){return Math.random()};
"step 5" "step 5"
_status.characterChoice.fan.addArray(result.links); _status.characterChoice.fan.addArray(result.links);
@ -683,11 +717,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
},result.links,game.fan,true,event.videoIdx); },result.links,game.fan,true,event.videoIdx);
var next=game.zhu.chooseButton(true); var next=game.zhu.chooseButton(true);
next.filterButton=function(button){ next.set('filterButton',function(button){
return _status.event.canChoose.contains(button.link); return _status.event.canChoose.contains(button.link);
}; });
next.dialog=event.videoIdx; next.set('dialog',event.videoIdx);
next.canChoose=_status.characterChoice.all; next.set('canChoose',_status.characterChoice.all);
next.ai=function(){return Math.random()}; next.ai=function(){return Math.random()};
"step 6" "step 6"
_status.characterChoice.zhu.addArray(result.links); _status.characterChoice.zhu.addArray(result.links);
@ -717,31 +751,32 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
"step 7" "step 7"
game.broadcastAll('closeDialog',event.videoIdx); game.broadcastAll('closeDialog',event.videoIdx);
"step 8" "step 8"
var num=_status.mode=='changban'?2:1;
var list=[ var list=[
[game.zhu,['选择出场角色',[_status.characterChoice.zhu,'character']]], [game.zhu,num,true,['选择出场角色',[_status.characterChoice.zhu,'character']]],
[game.fan,['选择出场角色',[_status.characterChoice.fan,'character']]] [game.fan,num,true,['选择出场角色',[_status.characterChoice.fan,'character']]]
]; ];
game.me.chooseButtonOL(list,function(player,result){ game.me.chooseButtonOL(list,function(player,result){
if(game.online||player==game.me) player.init(result.links[0]); if(game.online||player==game.me) player.init(result.links[0],result.links[1]);
}); });
"step 9" "step 9"
for(var i in result){ for(var i in result){
var current=lib.playerOL[i]; var current=lib.playerOL[i];
if(result[i]=='ai'){ if(result[i]=='ai'){
result[i]=_status.characterChoice[current.identity].randomGets(1); result[i]=_status.characterChoice[current.identity].randomGets(_status.mode=='changban'?2:1);
} }
else{ else{
result[i]=result[i].links; result[i]=result[i].links;
} }
_status.characterChoice[current.identity].remove(result[i][0]) _status.characterChoice[current.identity].removeArray(result[i]);
if(!current.name){ if(!current.name){
current.init(result[i][0]); current.init(result[i][0],result[i][1]);
} }
} }
game.broadcast(function(result){ game.broadcast(function(result){
for(var i in result){ for(var i in result){
if(!lib.playerOL[i].name){ if(!lib.playerOL[i].name){
lib.playerOL[i].init(result[i][0]); lib.playerOL[i].init(result[i][0],result[i][1]);
} }
} }
setTimeout(function(){ setTimeout(function(){
@ -1132,6 +1167,32 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
}, },
}, },
_changeHandcard:{
trigger:{global:'gameDrawAfter'},
silent:true,
popup:false,
filter:function(event,player){
return _status.mode=='changban'&&player.maxHp<=3;
},
content:function(){
'step 0'
player.chooseBool('是否更换手牌?').ai=function(){return Math.random()<0.5};
'step 1'
if(result.bool){
var hs=player.getCards('h');
player.lose(hs,ui.special);
event.hs=hs;
}
else event.finish();
'step 2'
var hs=event.hs;
player.draw(hs.length,'nodelay');
for(var i=0;i<hs.length;i++){
hs[i].fix();
ui.cardPile.insertBefore(hs[i],ui.cardPile.childNodes[get.rand(ui.cardPile.childElementCount)]);
}
},
},
}, },
singleTranslate:{ singleTranslate:{
xiahouyuan:'夏侯渊', xiahouyuan:'夏侯渊',