Add files via upload
This commit is contained in:
parent
3a1bdcbf2b
commit
2efebc60d3
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -142,7 +142,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(game.hasPlayer(function(current){
|
||||
return (get.attitude(target,current)<0&&
|
||||
target.canUse(card,current,true,true)&&
|
||||
!current.getEquip('baiyin')&&
|
||||
!current.hasSkillTag('filterDamage',null,{
|
||||
player:player,
|
||||
card:card,
|
||||
})&&
|
||||
get.effect(current,card,target)>0);
|
||||
})){
|
||||
return 1;
|
||||
|
@ -835,12 +838,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})||player.hasSkillTag('unequip_ai',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})) return;
|
||||
if(card.name=='nanman'||card.name=='wanjian') return 'zerotarget';
|
||||
if(card.name=='sha'){
|
||||
var equip1=player.getEquip(1);
|
||||
if(equip1&&equip1.name=='zhuque') return 1.9;
|
||||
if(equip1&&equip1.name=='qinggang') return 1;
|
||||
if(!card.nature) return 'zerotarget';
|
||||
}
|
||||
}
|
||||
|
@ -914,8 +920,27 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
//priority:-10,
|
||||
content:function(){
|
||||
trigger.num=1;
|
||||
},
|
||||
ai:{
|
||||
filterDamage:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(player.hasSkillTag('unequip2')) return false;
|
||||
if(arg&&arg.player){
|
||||
if(arg.player.hasSkillTag('unequip',false,{
|
||||
name:arg.card?arg.card.name:null,
|
||||
target:player,
|
||||
card:arg.card,
|
||||
})) return false;
|
||||
if(arg.player.hasSkillTag('unequip_ai',false,{
|
||||
name:arg.card?arg.card.name:null,
|
||||
target:player,
|
||||
card:arg.card,
|
||||
})) return false;
|
||||
if(arg.player.hasSkillTag('jueqing',false,player)) return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
zhuque_skill:{
|
||||
equipSkill:true,
|
||||
trigger:{player:'useCard1'},
|
||||
|
|
|
@ -1060,10 +1060,14 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
nothunder:true,
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(card.name=='sha'&&player.getEquip('qinggang')||target.hasSkillTag('unequip2')) return;
|
||||
if(target.hasSkillTag('unequip2')) return;
|
||||
if(player.hasSkillTag('unequip',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
target:target,
|
||||
card:card
|
||||
})||player.hasSkillTag('unequip_ai',false,{
|
||||
name:card?card.name:null,
|
||||
target:target,
|
||||
card:card
|
||||
})) return;
|
||||
if(get.tag(card,'natureDamage')) return 'zerotarget';
|
||||
|
|
|
@ -163,12 +163,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(player.hasSkill('jiu')&&!target.getEquip('baiyin')){
|
||||
if(player.hasSkill('jiu')&&!target.hasSkillTag('filterDamage',null,{
|
||||
player:player,
|
||||
card:{name:'sha'},
|
||||
})){
|
||||
if(get.attitude(player,target)>0){
|
||||
return -6;
|
||||
return -7;
|
||||
}
|
||||
else{
|
||||
return -3;
|
||||
return -4;
|
||||
}
|
||||
}
|
||||
return -1.5;
|
||||
|
@ -234,8 +237,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
type:'basic',
|
||||
cardcolor:'red',
|
||||
notarget:true,
|
||||
nodelay:true,
|
||||
content:function(){
|
||||
event.result='shaned';
|
||||
event.getParent().delayx=false;
|
||||
game.delay(0.5);
|
||||
},
|
||||
ai:{
|
||||
basic:{
|
||||
|
@ -1441,39 +1447,36 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
equipSkill:true,
|
||||
trigger:{player:'useCard'},
|
||||
forced:true,
|
||||
audio:'qinglong_skill',
|
||||
filter:function(event,player){
|
||||
return get.mode()=='guozhan'&&event.card.name=='sha';
|
||||
},
|
||||
content:function(){
|
||||
var players=trigger.targets;
|
||||
for(var i=0;i<players.length;i++){
|
||||
players[i].addTempSkill('qinglong_guozhan_mingzhi');
|
||||
players[i].storage.qinglong_guozhan_mingzhi.add(trigger.card);
|
||||
}
|
||||
if(!_status.qinglong_guozhan) _status.qinglong_guozhan=[];
|
||||
_status.qinglong_guozhan=[];
|
||||
_status.qinglong_guozhan.add(trigger);
|
||||
game.countPlayer2(function(current){
|
||||
current.addTempSkill('qinglong_guozhan_mingzhi');
|
||||
});
|
||||
var next=game.createEvent('qinglong_guozhan');
|
||||
event.next.remove(next);
|
||||
trigger.after.add(next);
|
||||
next.setContent(function(){
|
||||
_status.qinglong_guozhan.remove(event.parent);
|
||||
});
|
||||
}
|
||||
},
|
||||
qinglong_guozhan_mingzhi:{
|
||||
equipSkill:true,
|
||||
vanish:true,
|
||||
silent:true,
|
||||
onremove:true,
|
||||
trigger:{global:'useCardAfter'},
|
||||
filter:function(event,player){
|
||||
return player.storage.qinglong_guozhan_mingzhi.contains(event.card);
|
||||
},
|
||||
init:function(player){
|
||||
if(!player.storage.qinglong_guozhan_mingzhi){
|
||||
player.storage.qinglong_guozhan_mingzhi=[];
|
||||
}
|
||||
},
|
||||
content:function(){
|
||||
player.storage.qinglong_guozhan_mingzhi.remove(trigger.card);
|
||||
if(!player.storage.qinglong_guozhan_mingzhi.length){
|
||||
player.removeSkill('qinglong_guozhan_mingzhi');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
nomingzhi:true
|
||||
nomingzhi:true,
|
||||
skillTagFilter:function(player){
|
||||
if(_status.qinglong_guozhan){
|
||||
for(var i=0;i<_status.qinglong_guozhan.length;i++){
|
||||
if(_status.qinglong_guozhan[i].targets.contains(player)) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
}
|
||||
},
|
||||
hanbing_skill:{
|
||||
|
@ -1496,7 +1499,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(target.hp==1) return false;
|
||||
if(event.num>1||player.hasSkill('tianxianjiu')||
|
||||
player.hasSkill('luoyi2')||player.hasSkill('reluoyi2')) return false;
|
||||
if(target.countCards('he')<2) return -1;
|
||||
if(target.countCards('he')<2) return false;
|
||||
var num=0;
|
||||
var cards=target.getCards('he');
|
||||
for(var i=0;i<cards.length;i++){
|
||||
|
@ -1542,11 +1545,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return;
|
||||
if(target.hasSkillTag('unequip2')) return;
|
||||
if(player.hasSkillTag('unequip',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})||player.hasSkillTag('unequip_ai',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})) return;
|
||||
if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget';
|
||||
}
|
||||
|
@ -1612,13 +1619,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
trigger.target.addTempSkill('qinggang2');
|
||||
trigger.target.storage.qinggang2.add(trigger.card);
|
||||
},
|
||||
/*ai:{
|
||||
unequip:true,
|
||||
ai:{
|
||||
unequip_ai:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(arg&&arg.name=='sha') return true;
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
},
|
||||
qinggang2:{
|
||||
firstDo:true,
|
||||
|
@ -1855,6 +1862,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{player:['chooseToRespondBegin','chooseToUseBegin']},
|
||||
filter:function(event,player){
|
||||
if(event.responded) return false;
|
||||
if(event.bagua_skill) return false;
|
||||
if(!event.filterCard({name:'shan'},player,event)) return false;
|
||||
if(event.name=='chooseToRespond'&&!lib.filter.cardRespondable({name:'shan'},player,event)) return false;
|
||||
if(player.hasSkillTag('unequip2')) return false;
|
||||
|
@ -1880,6 +1888,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
event.bagua_skill=true;
|
||||
player.judge('bagua',function(card){return (get.color(card)=='red')?1.5:-0.5});
|
||||
"step 1"
|
||||
if(result.judge>0){
|
||||
|
@ -1892,11 +1901,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
respondShan:true,
|
||||
effect:{
|
||||
target:function(card,player,target,effect){
|
||||
if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return;
|
||||
if(target.hasSkillTag('unequip2')) return;
|
||||
if(player.hasSkillTag('unequip',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})||player.hasSkillTag('unequip_ai',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})) return;
|
||||
if(get.tag(card,'respondShan')) return 0.5;
|
||||
}
|
||||
|
@ -2249,6 +2262,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
cixiong_skill:'雌雄双股剑',
|
||||
qinggang_skill:'青釭剑',
|
||||
qinglong_skill:'青龙偃月刀',
|
||||
qinglong_guozhan:'青龙偃月刀',
|
||||
zhangba_skill:'丈八蛇矛',
|
||||
guanshi_skill:'贯石斧',
|
||||
fangtian_skill:'方天画戟',
|
||||
|
|
105
character/diy.js
105
character/diy.js
|
@ -15,6 +15,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
key_kagari:['female','shen',3,['kagari_zongsi'],['key']],
|
||||
key_rei:['male','key',4,['xiandeng','shulv','xisheng']],
|
||||
key_komari:['female','key',3,['komari_tiankou','komari_xueshang']],
|
||||
key_yukine:['female','key',3,['yukine_wenzhou']],
|
||||
// diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']],
|
||||
// diy_hanlong:['male','wei',4,['siji','ciqiu']],
|
||||
diy_feishi:['male','shu',3,['shuaiyan','moshou']],
|
||||
|
@ -91,7 +92,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
diy:{
|
||||
diy_tieba:["diy_wenyang","ns_zuoci","ns_lvzhi","ns_wangyun","ns_nanhua","ns_nanhua_left","ns_nanhua_right","ns_huamulan","ns_huangzu","ns_jinke","ns_yanliang","ns_wenchou","ns_caocao","ns_caocaosp","ns_zhugeliang","ns_wangyue","ns_yuji","ns_xinxianying","ns_guanlu","ns_simazhao","ns_sunjian","ns_duangui","ns_zhangbao","ns_masu","ns_zhangxiu","ns_lvmeng","ns_shenpei","ns_yujisp","ns_yangyi","ns_liuzhang","ns_xinnanhua"],
|
||||
diy_default:["diy_feishi","diy_liuyan","diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","diy_liufu","diy_xizhenxihong","diy_liuzan","diy_zaozhirenjun","diy_yangyi","diy_tianyu"],
|
||||
diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_kagari","key_umi","key_rei","key_komari"],
|
||||
diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_kagari","key_umi","key_rei","key_komari","key_yukine"],
|
||||
},
|
||||
},
|
||||
characterIntro:{
|
||||
|
@ -105,6 +106,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
diy_tianyu:'字国让,渔阳雍奴(今天津市武清区东北)人。三国时期曹魏将领。初从刘备,因母亲年老回乡,后跟随公孙瓒,公孙瓒败亡,劝说鲜于辅加入曹操。曹操攻略河北时,田豫正式得到曹操任用,历任颖阴、郎陵令、弋阳太守等。',
|
||||
},
|
||||
characterTitle:{
|
||||
key_yukine:'#gClannad',
|
||||
key_komari:'#bLittle Busters!',
|
||||
key_umi:'#bSummer Pockets',
|
||||
key_rei:'#gHarmonia',
|
||||
|
@ -148,6 +150,82 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
yuji:['zuoci']
|
||||
},
|
||||
skill:{
|
||||
yukine_wenzhou:{
|
||||
trigger:{global:'phaseUseBegin'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return event.player.countCards('he')>0;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
event.forceDie=true;
|
||||
var ask=trigger.player.chooseCard('he',get.prompt('yukine_wenzhou'));
|
||||
if(player==trigger.player){
|
||||
ask.set('prompt2','选择一张牌,然后从牌堆中获得一张与此牌类型相同的牌。本回合内使用与此牌类型相同的牌时不可被其他角色响应。');
|
||||
}
|
||||
else ask.set('prompt2','将一张牌交给'+get.translation(player)+'然后其可以选择:交给你一张牌;或令你从牌堆中获得一张与此牌类型相同的牌,且你本回合内使用与此牌类型相同的牌时不可被响应。');
|
||||
ask.set('ai',function(card){
|
||||
if(get.attitude(_status.event.player,_status.event.getParent().player)>0) return 10-get.value(card);
|
||||
return -1;
|
||||
});
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.logSkill('yukine_wenzhou',trigger.player);
|
||||
event.type=get.type(result.cards[0],'trick');
|
||||
if(trigger.player!=player) trigger.player.give(result.cards,player,'giveAuto');
|
||||
}
|
||||
else event.finish();
|
||||
"step 2"
|
||||
if(player==trigger.player||player.countCards('he')==0){
|
||||
event._result={index:1};
|
||||
}
|
||||
else{
|
||||
player.chooseControl().set('choiceList',[
|
||||
'将一张牌交给'+get.translation(trigger.player),
|
||||
'令'+get.translation(trigger.player)+'从牌堆中获得一张'+get.translation(event.type)+'牌,且其本回合内使用与此牌名称相同的牌时不可被响应',
|
||||
]).set('forceDie',true).set('ai',function(){
|
||||
if(get.attitude(_status.event.player,_status.event.getTrigger().player)>0) return 1;
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
"step 3"
|
||||
if(result.index==1){
|
||||
var magic=get.cardPile2(function(card){
|
||||
return get.type(card,'trick')==event.type;
|
||||
});
|
||||
if(magic){
|
||||
trigger.player.addTempSkill('yukine_magic','phaseUseEnd');
|
||||
trigger.player.storage.yukine_magic.add(magic.name);
|
||||
trigger.player.gain(magic,'draw');
|
||||
}
|
||||
event.finish();
|
||||
}
|
||||
else player.chooseCard('he',true,'选择要交给'+get.translation(trigger.player)+'的牌').set('ai',function(card){
|
||||
return -get.value(card,_status.event.getTrigger().player);
|
||||
});
|
||||
"step 4"
|
||||
if(result.bool) player.give(result.cards,trigger.player,'giveAuto');
|
||||
},
|
||||
},
|
||||
yukine_magic:{
|
||||
trigger:{player:'useCard'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
charlotte:true,
|
||||
filter:function(event,player){
|
||||
return player.storage.yukine_magic&&player.storage.yukine_magic.contains(event.card.name);
|
||||
},
|
||||
content:function(){
|
||||
trigger.directHit.addArray(game.filterPlayer(function(current){
|
||||
if(player!=current) return true;
|
||||
return !player.hasSkill('yukine_wenzhou');
|
||||
}));
|
||||
},
|
||||
onremove:true,
|
||||
init:function(player,skill){
|
||||
if(!player.storage[skill]) player.storage[skill]=[];
|
||||
},
|
||||
},
|
||||
komari_tiankou:{
|
||||
trigger:{
|
||||
player:'useCard2',
|
||||
|
@ -287,6 +365,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
player.loseHp();
|
||||
'step 1'
|
||||
player.draw(2);
|
||||
player.insertPhase();
|
||||
player.storage.umi_shiroha=trigger.player;
|
||||
player.addTempSkill('umi_shiroha');
|
||||
|
@ -338,30 +417,37 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
event.skills=skills;
|
||||
event.chosen=[];
|
||||
'step 2'
|
||||
var next=player.chooseButton(['是否获得一名已死亡角色的一个技能?',[event.chara,'player']]);
|
||||
var next=player.chooseTarget('是否获得一名已死亡角色的一个技能?');
|
||||
next.set('chara',event.chara);
|
||||
next.set('skills',event.skills);
|
||||
next.set('chosen',event.chosen);
|
||||
next.set('filterButton',function(button){
|
||||
next.set('filterTarget',function(card,player,target){
|
||||
if(target.isAlive()) return false;
|
||||
var evt=_status.event;
|
||||
if(!evt.chosen.length) return true;
|
||||
var skills=evt.skills[evt.chara.indexOf(button.link)];
|
||||
var skills=evt.skills[evt.chara.indexOf(target)];
|
||||
if(skills.length==1&&skills[0]==evt.chosen[0]) return false;
|
||||
return true;
|
||||
});
|
||||
next.set('deadTarget',true);
|
||||
next.set('ai',function(){return Math.random()});
|
||||
'step 3'
|
||||
if(!result.bool) event.finish();
|
||||
else{
|
||||
event.temp=result.links[0];
|
||||
var list=event.skills[event.chara.indexOf(result.links[0])];
|
||||
result.links[0].line(player,{color:[251, 193, 217]})
|
||||
event.temp=result.targets[0];
|
||||
var list=event.skills[event.chara.indexOf(result.targets[0])];
|
||||
result.targets[0].line(player,{color:[251, 193, 217]})
|
||||
list.removeArray(event.chosen);
|
||||
player.chooseControl(list).set('prompt','选择获得一个技能');
|
||||
}
|
||||
'step 4'
|
||||
player.addSkill(result.control,get.groupnature(event.temp.group)||'key');
|
||||
player.addSkill(result.control);
|
||||
var info=get.info(result.control);
|
||||
if(info.zhuSkill){
|
||||
if(!player.storage.zhuSkill_umi_qihuan) player.storage.zhuSkill_umi_qihuan=[];
|
||||
player.storage.zhuSkill_umi_qihuan.push(result.control);
|
||||
}
|
||||
event.chosen.push(result.control);
|
||||
if(event.chosen.length<2) event.goto(2);
|
||||
},
|
||||
|
@ -5481,6 +5567,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
key_umi2:'鹰原羽未',
|
||||
key_rei:'零',
|
||||
key_komari:'神北小毬',
|
||||
key_yukine:'宫泽有纪宁',
|
||||
lucia_duqu:'毒躯',
|
||||
lucia_duqu_info:'锁定技,①当你对其他角色造成伤害或受到其他角色的伤害时,你和对方各获得一张花色点数随机的【毒】。<br>②当你因【毒】失去体力时,你改为回复等量的体力。<br>③当你处于濒死状态时,你可以使用一张【毒】(每回合限一次)。',
|
||||
lucia_zhenren:'振刃',
|
||||
|
@ -5502,7 +5589,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
umi_chaofan:'炒饭',
|
||||
umi_chaofan_info:'出牌阶段限一次,你可以弃置两张花色不同的手牌并选择一名其他角色。你摸一张牌,若你的体力值:大于2,目标角色回复1点体力;等于2,目标角色摸两张牌;小于2,目标角色受到1点无来源且对应渠道为这两张牌的火焰伤害。',
|
||||
umi_lunhui:'轮回',
|
||||
umi_lunhui_info:'一名其他角色的回合结束时,若你的手牌数小于体力值,则你可以失去1点体力。若如此做,你进行一个额外回合,且你于此回合内计算与此角色的距离视为1。',
|
||||
umi_lunhui_info:'一名其他角色的回合结束时,若你的手牌数小于体力值,则你可以失去1点体力。若如此做,你摸两张牌并进行一个额外回合,且你于此回合内计算与此角色的距离视为1。',
|
||||
umi_shiroha:'轮回 - 延时效果',
|
||||
umi_qihuan:'七幻',
|
||||
umi_qihuan_info:'限定技,当你处于濒死状态时,你可以移去此武将牌。若如此做,你回复X点体力(X为场上势力数)。然后,你可获得场上已死亡角色武将牌上的至多两个技能。',
|
||||
|
@ -5510,6 +5597,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
komari_tiankou_info:'锁定技,当你使用红色的非伤害性基本牌/锦囊牌选择目标时,或成为其他角色使用的这些牌的目标时,你选择一项:1.摸一张牌;2.为此牌增加一个目标',
|
||||
komari_xueshang:'血殇',
|
||||
komari_xueshang_info:'锁定技,蓄力技,当有角色死亡时,你对自己造成<span class=yellowtext>1</span>点伤害,然后对所有其他角色依次造成<span class=firetext>1</span>点伤害。当有角色因此法进入濒死状态时,你加1点体力上限并回复1点体力,然后失去此技能并终止此技能的所有后续结算。',
|
||||
yukine_wenzhou:'问咒',
|
||||
yukine_wenzhou_info:'一名角色的出牌阶段开始时,其可以交给你一张牌。若如此做,你选择一项:交给其一张牌,或令其从牌堆中获得一张与此牌类型相同的牌,且其于此阶段内使用与此牌牌名相同的牌时无法被响应。',
|
||||
|
||||
ns_chuanshu:'传术',
|
||||
ns_chuanshu_info:'<span class=yellowtext>限定技</span> 当一名其他角色进入濒死状态时,你可以令其选择获得技能【雷击】或【鬼道】,其回复体力至1并摸两张牌。当该被【传术】的角色造成或受到一次伤害后,你摸一张牌。其阵亡后,你重置技能【传术】',
|
||||
|
|
|
@ -435,7 +435,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
lianpo:{
|
||||
audio:true,
|
||||
trigger:{player:'phaseAfter'},
|
||||
trigger:{global:'phaseAfter'},
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
return player.getStat('kill')>0;
|
||||
|
@ -598,14 +598,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
renjie2:{
|
||||
audio:true,
|
||||
trigger:{player:'discardAfter'},
|
||||
trigger:{player:'loseAfter'},
|
||||
forced:true,
|
||||
filter:function(event){
|
||||
if(event.type!='discard'||!event.cards2) return false;
|
||||
var evt=event.getParent('phaseDiscard');
|
||||
return evt&&evt.name=='phaseDiscard'
|
||||
},
|
||||
content:function(){
|
||||
player.addMark('renjie',trigger.cards.length);
|
||||
player.addMark('renjie',trigger.cards2.length);
|
||||
}
|
||||
},
|
||||
sbaiyin:{
|
||||
|
@ -638,7 +639,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
player.chooseCard('是否弃置一枚“忍”,并发动【鬼才】?','he').ai=function(card){
|
||||
player.chooseCard('是否弃置一枚“忍”,并发动〖鬼才〗?','he',function(card){
|
||||
var player=_status.event.player;
|
||||
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
|
||||
if(mod2!='unchanged') return mod2;
|
||||
var mod=game.checkMod(card,player,'unchanged','cardRespondable',player);
|
||||
if(mod!='unchanged') return mod;
|
||||
return true;
|
||||
}).ai=function(card){
|
||||
var trigger=_status.event.parent._trigger;
|
||||
var player=_status.event.player;
|
||||
var result=trigger.judge(card)-trigger.judge(trigger.player.judging[0]);
|
||||
|
|
|
@ -781,13 +781,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
oldxuanfeng:{
|
||||
audio:'xuanfeng',
|
||||
trigger:{player:'loseEnd'},
|
||||
trigger:{player:'loseAfter'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='e') return true;
|
||||
}
|
||||
return false;
|
||||
return event.es&&event.es.length>0;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
|
|
|
@ -798,7 +798,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"step 0"
|
||||
player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+
|
||||
get.translation(trigger.player.judging[0])+','+get.prompt('xinguidao'),'he',function(card){
|
||||
return get.color(card)=='black';
|
||||
if(get.color(card)!='black') return false;
|
||||
var player=_status.event.player;
|
||||
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
|
||||
if(mod2!='unchanged') return mod2;
|
||||
var mod=game.checkMod(card,player,'unchanged','cardRespondable',player);
|
||||
if(mod!='unchanged') return mod;
|
||||
return true;
|
||||
}).set('ai',function(card){
|
||||
var trigger=_status.event.getTrigger();
|
||||
var player=_status.event.player;
|
||||
|
@ -1302,6 +1308,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
result.targets.sortBySeat();
|
||||
player.logSkill('new_retuxi',result.targets);
|
||||
player.gainMultiple(result.targets);
|
||||
trigger.num-=result.targets.length;
|
||||
|
@ -2676,7 +2683,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
"step 0"
|
||||
player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+
|
||||
get.translation(trigger.player.judging[0])+','+get.prompt('reguicai'),'he').set('ai',function(card){
|
||||
get.translation(trigger.player.judging[0])+','+get.prompt('reguicai'),'he',function(card){
|
||||
var player=_status.event.player;
|
||||
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
|
||||
if(mod2!='unchanged') return mod2;
|
||||
var mod=game.checkMod(card,player,'unchanged','cardRespondable',player);
|
||||
if(mod!='unchanged') return mod;
|
||||
return true;
|
||||
}).set('ai',function(card){
|
||||
var trigger=_status.event.getTrigger();
|
||||
var player=_status.event.player;
|
||||
var judging=_status.event.judging;
|
||||
|
@ -3056,21 +3070,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
relianying:{
|
||||
audio:2,
|
||||
trigger:{player:'loseEnd'},
|
||||
trigger:{player:'loseAfter'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
if(player.countCards('h')) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='h') return true;
|
||||
}
|
||||
return false;
|
||||
return event.hs&&event.hs.length;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
var num=0;
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(trigger.cards[i].original=='h') num++;
|
||||
}
|
||||
var num=trigger.hs.length;
|
||||
player.chooseTarget('选择发动连营的目标',[1,num]).ai=function(target){
|
||||
var player=_status.event.player;
|
||||
if(player==target) return get.attitude(player,target)+10;
|
||||
|
|
|
@ -348,43 +348,36 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
"xinfu_zuilun":{
|
||||
group:["xinfu_zuilun_count"],
|
||||
subSkill:{
|
||||
count:{
|
||||
sub:true,
|
||||
silent:true,
|
||||
popup:false,
|
||||
trigger:{
|
||||
player:"discardAfter",
|
||||
},
|
||||
filter:function (event,player){
|
||||
return _status.currentPhase==player;
|
||||
},
|
||||
content:function (){
|
||||
player.addTempSkill('xinfu_zuilun_discarded');
|
||||
},
|
||||
forced:true,
|
||||
},
|
||||
discarded:{
|
||||
sub:true,
|
||||
},
|
||||
},
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:"phaseJieshuBegin",
|
||||
},
|
||||
check:function (event,player){
|
||||
var num=0;
|
||||
if(player.hasSkill('xinfu_zuilun_discarded')) num++;
|
||||
if(player.getHistory('lose',function(evt){
|
||||
return evt.type=='discard';
|
||||
}).length) num++;
|
||||
if(!player.isMinHandcard()) num++;
|
||||
if(!player.getStat('damage')) num++;
|
||||
if(num==3) return player.hp>=2;
|
||||
return true;
|
||||
},
|
||||
prompt:function (event,player){
|
||||
var num=3;
|
||||
if(player.getHistory('lose',function(evt){
|
||||
return evt.type=='discard';
|
||||
}).length) num--;
|
||||
if(!player.isMinHandcard()) num--;
|
||||
if(!player.getStat('damage')) num--;
|
||||
return get.prompt('xinfu_zuilun')+'(可获得'+get.cnNumber(num)+'张牌)'
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
event.num=0;
|
||||
event.cards=get.cards(3);
|
||||
if(player.hasSkill('xinfu_zuilun_discarded')) event.num++;
|
||||
if(player.getHistory('lose',function(evt){
|
||||
return evt.type=='discard';
|
||||
}).length) event.num++;
|
||||
if(!player.isMinHandcard()) event.num++;
|
||||
if(!player.getStat('damage')) event.num++;
|
||||
'step 1'
|
||||
|
@ -1172,6 +1165,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
"nzry_binglve":{audio:2},
|
||||
nzry_huaiju_ai:{
|
||||
charlotte:true,
|
||||
ai:{
|
||||
filterDamage:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(!player.hasMark('nzry_huaiju')) return false;
|
||||
if(!game.hasPlayer(function(current){
|
||||
return current.hasSkill('tachibana_effect');
|
||||
})) return false;
|
||||
if(arg&&arg.player){
|
||||
if(arg.player.hasSkillTag('jueqing',false,player)) return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"nzry_huaiju":{
|
||||
marktext:"橘",
|
||||
intro:{
|
||||
|
@ -1187,6 +1195,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
forced:true,
|
||||
content:function(){
|
||||
player.addMark('nzry_huaiju',3);
|
||||
player.addSkill('nzry_huaiju_ai');
|
||||
},
|
||||
group:['tachibana_effect'],
|
||||
},
|
||||
|
@ -1246,6 +1255,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.loseHp();
|
||||
};
|
||||
target.addMark('nzry_huaiju',1);
|
||||
target.addSkill('nzry_huaiju_ai');
|
||||
},
|
||||
},
|
||||
"nzry_zhenglun":{
|
||||
|
@ -1271,36 +1281,54 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
direct:true,
|
||||
filter:function (event,player){
|
||||
return event.num>0;
|
||||
var cards=[];
|
||||
player.getHistory('lose',function(evt){
|
||||
if(evt.type=='discard'&&evt.getParent('phaseDiscard')==event) cards.addArray(evt.cards2);
|
||||
});
|
||||
return cards.length>0;
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
event.str1='令至多'+trigger.num+'名角色摸一张牌';
|
||||
event.str2='对任意名体力值之和为'+trigger.num+'的角色造成一点伤害';
|
||||
var cards=[];
|
||||
player.getHistory('lose',function(evt){
|
||||
if(evt.type=='discard'&&evt.getParent('phaseDiscard')==trigger) cards.addArray(evt.cards2);
|
||||
});
|
||||
event.num=cards.length;
|
||||
event.str1='令至多'+event.num+'名角色摸一张牌';
|
||||
event.str2='对任意名体力值之和为'+event.num+'的角色造成一点伤害';
|
||||
player.chooseControl('cancel2').set('ai',function(){
|
||||
if(game.countPlayer(function(current){return get.attitude(player,current)<0&¤t.hp==trigger.num})>0&&trigger.num<=3) return 1;
|
||||
if(game.countPlayer(function(current){return get.attitude(player,current)<0&¤t.hp==event.num})>0&&event.num<=3) return 1;
|
||||
return 0;
|
||||
}).set('choiceList',[event.str1,event.str2]).set('prompt','是否发动【溃诛】?');
|
||||
'step 1'
|
||||
if(result.control=='cancel2') event.finish();
|
||||
event.control=[event.str1,event.str2][result.index];
|
||||
'step 2'
|
||||
var str='请选择【溃诛】的目标';
|
||||
if(event.bool==false) str='所选目标体力之和不足'+trigger.num+',请重选';
|
||||
var str='请选择〖溃诛〗的目标';
|
||||
if(event.bool==false) str='<br>所选目标体力之和不足'+event.num+',请重选';
|
||||
if(event.control==event.str2){
|
||||
player.chooseTarget(str,[1,Infinity],function(card,player,target){
|
||||
player.chooseTarget(str,function(card,player,target){
|
||||
var targets=ui.selected.targets;
|
||||
var num=0;
|
||||
for(var i=0;i<targets.length;i++){
|
||||
num+=targets[i].hp;
|
||||
};
|
||||
return num+target.hp<=trigger.num;
|
||||
return num+target.hp<=_status.event.num;
|
||||
}).set('ai',function(target){
|
||||
if(ui.selected.targets[0]!=undefined) return -1;
|
||||
return get.attitude(player,target)<0;
|
||||
}).promptbar='none';
|
||||
}else{
|
||||
player.chooseTarget('请选择【溃诛】的目标',[1,trigger.num]).ai=function(target){
|
||||
}).set('promptbar','none').set('num',event.num).set('selectTarget',function(){
|
||||
var targets=ui.selected.targets;
|
||||
var num=0;
|
||||
for(var i=0;i<targets.length;i++){
|
||||
num+=targets[i].hp;
|
||||
}
|
||||
if(num==_status.event.num) return ui.selected.targets.length;
|
||||
return ui.selected.targets.length+1;
|
||||
});
|
||||
}
|
||||
else{
|
||||
player.chooseTarget('请选择〖溃诛〗的目标',[1,event.num]).ai=function(target){
|
||||
return get.attitude(player,target);
|
||||
};
|
||||
};
|
||||
|
@ -1311,21 +1339,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.line(targets);
|
||||
player.logSkill('nzry_kuizhu',targets);
|
||||
game.asyncDraw(targets);
|
||||
}else{
|
||||
}
|
||||
else{
|
||||
var num=0;
|
||||
for(var i=0;i<targets.length;i++){
|
||||
num+=targets[i].hp;
|
||||
};
|
||||
if(num<trigger.num){
|
||||
if(num<event.num){
|
||||
event.bool=false;
|
||||
event.goto(2);
|
||||
}else{
|
||||
}
|
||||
else{
|
||||
player.line(targets);
|
||||
player.logSkill('nzry_kuizhu');
|
||||
for(var i=0;i<targets.length;i++){
|
||||
targets[i].damage();
|
||||
};
|
||||
if(targets.length>=2) player.damage();
|
||||
if(targets.length>=2) player.loseHp();
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1333,53 +1363,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
"nzry_zhizheng":{
|
||||
audio:2,
|
||||
group:["nzry_zhizheng_1","nzry_zhizheng_2"],
|
||||
trigger:{
|
||||
player:'useCardAfter'
|
||||
},
|
||||
filter:function (event,player){
|
||||
return player.isPhaseUsing();
|
||||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
content:function(){
|
||||
player.storage.nzry_zhizheng++;
|
||||
},
|
||||
subSkill:{
|
||||
others:{
|
||||
sub:true,
|
||||
mod:{
|
||||
targetEnabled:function(card,player,target){
|
||||
if(player.hasSkill('nzry_zhizheng')&&player.isPhaseUsing()&&get.distance(target,player,'attack')>1) return false;
|
||||
playerEnabled:function(card,player,target){
|
||||
var info=get.info(card);
|
||||
if(target!=player&&(!info||!info.singleCard||!ui.selected.targets.length)&&player.isPhaseUsing()&&get.distance(target,player,'attack')>1) return false;
|
||||
},
|
||||
},
|
||||
},
|
||||
"1":{
|
||||
trigger:{
|
||||
player:['phaseUseBefore','phaseUseAfter']
|
||||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
content:function(){
|
||||
if(event.triggername=='phaseUseBefore') game.countPlayer(function(current){
|
||||
if(current!=player){
|
||||
current.addTempSkill('nzry_zhizheng_others','phaseUseAfter');
|
||||
}
|
||||
});
|
||||
player.storage.nzry_zhizheng=0;
|
||||
},
|
||||
},
|
||||
"2":{
|
||||
trigger:{
|
||||
player:'phaseUseEnd'
|
||||
},
|
||||
direct:true,
|
||||
forced:true,
|
||||
filter:function (event,player){
|
||||
return player.storage.nzry_zhizheng<game.countPlayer(function(current){return get.distance(current,player,'attack')>1});
|
||||
return player.getHistory('useCard',function(evt){
|
||||
return evt.getParent('phaseUse')==event;
|
||||
})<game.countPlayer(function(current){return get.distance(current,player,'attack')>1})&&game.hasPlayer(function(target){
|
||||
return get.distance(target,player,'attack')>1&&target.countDiscardableCards(player,'he');
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseTarget(get.prompt('nzry_zhizheng'),"弃置一名攻击范围内不包含你的角色的一张牌",function(card,player,target){
|
||||
player.chooseTarget("请选择〖掣政〗的目标","弃置一名攻击范围内不包含你的角色的一张牌",true,function(card,player,target){
|
||||
return get.distance(target,player,'attack')>1&&target.countDiscardableCards(player,'he');
|
||||
}).ai=function(target){
|
||||
return -get.attitude(player,target);
|
||||
|
@ -1387,13 +1390,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 1'
|
||||
if(result.bool){
|
||||
player.line(result.targets);
|
||||
player.logSkill('nzry_zhizheng');
|
||||
player.discardPlayerCard(result.targets[0],'he',1,true);
|
||||
};
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"nzry_lijun":{
|
||||
unique:true,
|
||||
global:'nzry_lijun1',
|
||||
|
@ -2858,14 +2858,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
tuntian:{
|
||||
audio:2,
|
||||
audioname:['gz_dengai'],
|
||||
trigger:{player:'loseEnd'},
|
||||
trigger:{player:'loseAfter'},
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
if(player==_status.currentPhase) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original&&event.cards[i].original!='j') return true;
|
||||
}
|
||||
return false;
|
||||
return event.cards2&&event.cards2.length>0;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -3263,82 +3260,47 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
guzheng:{
|
||||
audio:2,
|
||||
audioname:['re_zhangzhang'],
|
||||
// unique:true,
|
||||
// gainable:true,
|
||||
group:["guzheng_count"],
|
||||
subSkill:{
|
||||
count:{
|
||||
trigger:{global:['loseEnd','cardsDiscardAfter']},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
if(event.guzhenged) return false;
|
||||
if(!event.cards||!event.cards.length) return false;
|
||||
var evt=event.getParent('phaseDiscard');
|
||||
return evt&&evt.name=='phaseDiscard'&&evt.player!=player;
|
||||
},
|
||||
content:function(){
|
||||
var evt=event.getParent('phaseDiscard');
|
||||
trigger.guzhenged=true;
|
||||
if(!evt.guzhengcards) evt.guzhengcards=[];
|
||||
evt.guzhengcards.addArray(trigger.cards);
|
||||
},
|
||||
sub:true,
|
||||
},
|
||||
},
|
||||
trigger:{global:'phaseDiscardAfter'},
|
||||
filter:function(event,player){
|
||||
if(event.player!=player&&event.player.isIn()&&
|
||||
event.guzhengcards&&event.guzhengcards.length){
|
||||
for(var i=0;i<event.guzhengcards.length;i++){
|
||||
if(get.position(event.guzhengcards[i],true)=='d'){
|
||||
return true;
|
||||
}
|
||||
if(event.player!=player&&event.player.isIn()){
|
||||
return event.player.getHistory('lose',function(evt){
|
||||
return evt.type=='discard'&&evt.getParent('phaseDiscard')==event&&evt.hs.filterInD('d').length>0;
|
||||
}).length>0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
checkx:function(event,player){
|
||||
var du=false;
|
||||
var num=0;
|
||||
for(var i=0;i<event.guzhengcards.length;i++){
|
||||
if(get.position(event.guzhengcards[i],true)=='d'){
|
||||
num++;
|
||||
if(event.guzhengcards[i].name=='du'){
|
||||
du=true;
|
||||
checkx:function(event,player,cards,cards2){
|
||||
if(cards.length>2||get.attitude(player,event.player)>0) return true;
|
||||
for(var i=0;i<cards2.length;i++){
|
||||
if(get.value(cards2[i],event.player)<0) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(get.attitude(player,event.player)>0){
|
||||
if(du&&num<=3){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if(du) return true;
|
||||
return num>2;
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
"step 0"
|
||||
event.cards=trigger.guzhengcards.slice(0);
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(get.position(event.cards[i],true)!='d'){
|
||||
event.cards.splice(i,1);i--;
|
||||
}
|
||||
}
|
||||
if(event.cards.length==0){
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
var check=lib.skill.guzheng.checkx(trigger,player);
|
||||
player.chooseCardButton(event.cards,'固政:选择令'+get.translation(trigger.player)+'收回的牌').set('ai',function(button){
|
||||
var cards=[];
|
||||
var cards2=[];
|
||||
game.getGlobalHistory('cardMove',function(evt){
|
||||
if(evt.name=='cardsDiscard'&&evt.getParent('phaseDiscard')==trigger) cards.addArray(evt.cards.filterInD('d'));
|
||||
});
|
||||
game.countPlayer2(function(current){
|
||||
current.getHistory('lose',function(evt){
|
||||
if(evt.type!='discard'||evt.getParent('phaseDiscard')!=trigger) return;
|
||||
cards.addArray(evt.cards.filterInD('d'));
|
||||
if(current==trigger.player) cards2.addArray(evt.hs.filterInD('d'));
|
||||
})
|
||||
});
|
||||
event.cards=cards;
|
||||
var check=lib.skill.guzheng.checkx(trigger,player,cards,cards2);
|
||||
player.chooseCardButton(cards,'固政:选择令'+get.translation(trigger.player)+'收回的牌').set('ai',function(button){
|
||||
if(_status.event.check){
|
||||
return 20-get.value(button.link);
|
||||
return 20-get.value(button.link,_status.event.getTrigger().player);
|
||||
}
|
||||
return 0;
|
||||
}).set('check',check);
|
||||
}).set('check',check).set('cards',cards2).set('filterButton',function(button){
|
||||
return _status.event.cards.contains(button.link);
|
||||
});
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
game.delay(0.5);
|
||||
|
@ -5421,7 +5383,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
direct:true,
|
||||
content:function(){
|
||||
"step 0";
|
||||
player.chooseTarget(get.prompt2('releiji')).ai=function(target){
|
||||
player.chooseTarget(get.prompt2('releiji'),function(card,player,target){
|
||||
return target!=player;
|
||||
}).ai=function(target){
|
||||
if(target.hasSkill('hongyan')) return 0;
|
||||
return get.damageEffect(target,_status.event.player,_status.event.player,'thunder');
|
||||
};
|
||||
|
@ -6200,16 +6164,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
fenji:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
global:["gainAfter","discardAfter"],
|
||||
global:["gainAfter","loseAfter"],
|
||||
},
|
||||
filter:function (event){
|
||||
var player=event[event.name=='gain'?'source':'player'];
|
||||
if(!player||_status.currentPhase==player||player.isDead()) return false;
|
||||
if(event[event.name=='gain'?'bySelf':'notBySelf']!=true) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='h') return true;
|
||||
var evt=event;
|
||||
if(event.name=='lose'){
|
||||
if(event.type!='discard') return false;
|
||||
evt=event.getParent();
|
||||
}
|
||||
return false;
|
||||
var player=evt[event.name=='gain'?'source':'player'];
|
||||
if(!player||_status.currentPhase==player||player.isDead()) return false;
|
||||
if(evt[event.name=='gain'?'bySelf':'notBySelf']!=true) return false;
|
||||
if(evt.name=='lose') return evt.hs.length>0;
|
||||
return event.relatedLose&&event.relatedLose.hs&&event.relatedLose.hs.length>0;
|
||||
},
|
||||
check:function(event,player){
|
||||
return get.attitude(player,event[event.name=='gain'?'source':'player'])>2;
|
||||
|
@ -6286,7 +6253,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"step 0"
|
||||
player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+
|
||||
get.translation(trigger.player.judging[0])+','+get.prompt('guidao'),'he',function(card){
|
||||
return get.color(card)=='black';
|
||||
if(get.color(card)!='black') return false;
|
||||
var player=_status.event.player;
|
||||
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
|
||||
if(mod2!='unchanged') return mod2;
|
||||
var mod=game.checkMod(card,player,'unchanged','cardRespondable',player);
|
||||
if(mod!='unchanged') return mod;
|
||||
return true;
|
||||
}).set('ai',function(card){
|
||||
var trigger=_status.event.getTrigger();
|
||||
var player=_status.event.player;
|
||||
|
|
237
character/sp.js
237
character/sp.js
|
@ -685,6 +685,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
cardEnabled:function(card,player){
|
||||
if(['trick','equip'].contains(get.type(card,'trick'))) return false;
|
||||
},
|
||||
cardSavable:function(card,player){
|
||||
if(['trick','equip'].contains(get.type(card,'trick'))) return false;
|
||||
},
|
||||
cardUsable:function(card,player,num){
|
||||
if(card.name=='sha'){
|
||||
return num+player.countMark('neifa_basic')*Math.min(5,player.countCards('h',function(cardx){
|
||||
|
@ -732,6 +735,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
cardEnabled:function(card,player){
|
||||
if(get.type(card)=='basic') return false;
|
||||
},
|
||||
cardSavable:function(card,player){
|
||||
if(get.type(card)=='basic') return false;
|
||||
},
|
||||
},
|
||||
intro:{
|
||||
name:'内伐 - 非基本牌',
|
||||
|
@ -854,7 +860,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var next=player.chooseToDiscard();
|
||||
if(event.triggername=='damageBegin1'){
|
||||
event.target=trigger.player;
|
||||
next.set('goon',get.attitude(player,event.target)<0&&!event.target.getEquip('baiyin')),
|
||||
next.set('goon',get.attitude(player,event.target)<0&&!event.target.hasSkillTag('filterDamage',null,{
|
||||
player:player,
|
||||
card:trigger.card,
|
||||
})),
|
||||
next.set('prompt2','弃置一张手牌,令对其造成的伤害+1');
|
||||
}
|
||||
else{
|
||||
|
@ -920,7 +929,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.chooseToDiscard('是否弃置一张手牌,令'+get.translation(trigger.card)+'对'+get.translation(trigger.target)+'的伤害+1?','h').set('logSkill',['hmxili',trigger.target]).set('goon',function(){
|
||||
var target=trigger.target;
|
||||
if(get.attitude(player,target)>=0) return false;
|
||||
if(target.getEquip('baiyin')||target.mayHaveShan()) return false;
|
||||
if(trigger.target.hasSkillTag('filterDamage',null,{
|
||||
player:trigger.player,
|
||||
card:trigger.card,
|
||||
})||target.mayHaveShan()) return false;
|
||||
return true;
|
||||
}()).ai=function(card){
|
||||
if(_status.event.goon) return 5-get.value(card);
|
||||
|
@ -1169,6 +1181,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
prepare:'give',
|
||||
discard:false,
|
||||
lose:false,
|
||||
content:function(){
|
||||
target.equip(cards[0]);
|
||||
},
|
||||
|
@ -1228,7 +1241,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
group:'pyzhuren_destroy',
|
||||
},
|
||||
pyzhuren_destroy:{
|
||||
trigger:{global:['loseEnd','cardsDiscardAfter']},
|
||||
trigger:{global:['loseAfter','cardsDiscardAfter']},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
var cs=event.cards;
|
||||
|
@ -1291,7 +1304,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(_status.event.goon) return 6-get.value(card);
|
||||
return -1;
|
||||
};
|
||||
next.set('goon',get.attitude(player,trigger.player)<0&&!trigger.player.getEquip('baiyin'))
|
||||
next.set('goon',get.attitude(player,trigger.player)<0&&!trigger.player.hasSkillTag('filterDamage',null,{
|
||||
player:player,
|
||||
card:trigger.card,
|
||||
}));
|
||||
next.logSkill=[event.name,trigger.player];
|
||||
'step 1'
|
||||
if(result.bool) trigger.num++;
|
||||
|
@ -2329,14 +2345,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
//蒋干
|
||||
weicheng:{
|
||||
audio:2,
|
||||
trigger:{global:'gainEnd'},
|
||||
trigger:{global:'gainAfter'},
|
||||
//forced:true,
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
if(event.source==player&&event.player!=player&&player.hp>player.countCards('h')){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='h') return true;
|
||||
}
|
||||
return event.relatedLose&&event.relatedLose.hs&&event.relatedLose.length>0;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -2406,7 +2420,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
direct:true,
|
||||
check:function(trigger,player){
|
||||
if(get.attitude(player,trigger.player)>=-1) return false;
|
||||
return !trigger.player.getEquip('baiyin')&&!trigger.player.getEquip('rewrite_baiyin');
|
||||
return !trigger.player.hasSkillTag('filterDamage',null,{
|
||||
player:player,
|
||||
card:trigger.card,
|
||||
});
|
||||
},
|
||||
content:function (){
|
||||
"step 0"
|
||||
|
@ -2468,7 +2485,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
"biaozhao2":{
|
||||
trigger:{
|
||||
global:["loseEnd","cardsDiscardEnd"],
|
||||
global:["loseAfter","cardsDiscardAfter"],
|
||||
},
|
||||
charlotte:true,
|
||||
forced:true,
|
||||
|
@ -2884,7 +2901,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function (){
|
||||
"step 0"
|
||||
player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+
|
||||
get.translation(trigger.player.judging[0])+','+get.prompt('huanshi_three'),'he').set('ai',function(card){
|
||||
get.translation(trigger.player.judging[0])+','+get.prompt('huanshi_three'),'he',function(card){
|
||||
var player=_status.event.player;
|
||||
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
|
||||
if(mod2!='unchanged') return mod2;
|
||||
var mod=game.checkMod(card,player,'unchanged','cardRespondable',player);
|
||||
if(mod!='unchanged') return mod;
|
||||
return true;
|
||||
}).set('ai',function(card){
|
||||
var trigger=_status.event.getTrigger();
|
||||
var player=_status.event.player;
|
||||
var judging=_status.event.judging;
|
||||
|
@ -3355,21 +3379,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{
|
||||
player:"loseEnd",
|
||||
},
|
||||
filter:function (event,player){
|
||||
var cs=event.cards;
|
||||
for(var i=0;i<cs.length;i++){
|
||||
if(get.type(cs[i])=='equip'&&cs[i].original=='e') return true;
|
||||
}
|
||||
return false;
|
||||
filter:function(event,player){
|
||||
return event.es.length>0;
|
||||
},
|
||||
content:function (){
|
||||
var cs=trigger.cards;
|
||||
var num=0;
|
||||
for(var i=0;i<cs.length;i++){
|
||||
if(get.type(cs[i])=='equip'&&cs[i].original=='e') num++;
|
||||
}
|
||||
player.storage.xinshanjia+=num;
|
||||
player.markSkill('xinshanjia');
|
||||
lib.skill.xinshanjia.sync(player);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -3381,13 +3395,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:"本局游戏内已失去过#张装备区内的牌",
|
||||
},
|
||||
frequent:true,
|
||||
init:function (player,skill){
|
||||
if(!player.storage[skill]) player.storage[skill]=0;
|
||||
sync:function(player){
|
||||
var history=player.actionHistory;
|
||||
var num=0;
|
||||
for(var i=0;i<history.length;i++){
|
||||
for(var j=0;j<history[i].lose.length;j++){
|
||||
num+=history[i].lose[j].es.length;
|
||||
}
|
||||
}
|
||||
player.storage.xinshanjia=num;
|
||||
if(num>0) player.markSkill('xinshanjia');
|
||||
},
|
||||
content:function (){
|
||||
'step 0'
|
||||
player.draw(3);
|
||||
'step 1'
|
||||
lib.skill.xinshanjia.sync(player);
|
||||
var num=3-player.storage.xinshanjia;
|
||||
if(num>0){
|
||||
player.chooseToDiscard('he',true,num);
|
||||
|
@ -3980,6 +4003,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
baijia:{
|
||||
audio:2,
|
||||
unique:true,
|
||||
derivation:'bmcanshi',
|
||||
juexingji:true,
|
||||
ai:{
|
||||
combo:'guju'
|
||||
|
@ -5268,11 +5292,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{player:'phaseDiscardEnd'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
if(event.cards){
|
||||
if(event.cards.length<2) return false;
|
||||
var cards=[];
|
||||
player.getHistory('lose',function(evt){
|
||||
if(evt.type=='discard'&&evt.getParent('phaseDiscard')==event) cards.addArray(evt.cards2);
|
||||
});
|
||||
if(cards){
|
||||
if(cards.length<2) return false;
|
||||
var suits=[];
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
var suit=get.suit(event.cards[i]);
|
||||
for(var i=0;i<cards.length;i++){
|
||||
var suit=get.suit(cards[i]);
|
||||
if(suits.contains(suit)){
|
||||
return false;
|
||||
}
|
||||
|
@ -6168,7 +6196,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
qizhou:{
|
||||
trigger:{player:['phaseBefore','equipAfter','loseAfter']},
|
||||
trigger:{player:['phaseBefore','equipEnd','loseEnd']},
|
||||
forced:true,
|
||||
popup:false,
|
||||
derivation:['mashu','reyingzi','duanbing','fenwei'],
|
||||
|
@ -7261,11 +7289,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
hongde:{
|
||||
audio:2,
|
||||
trigger:{player:['gainEnd','loseEnd']},
|
||||
trigger:{player:['gainAfter','loseAfter']},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
if(event.name=='lose'&&event.type=='gain'&&event.getParent().player==player) return false;
|
||||
return event.cards&&event.cards.length>1;
|
||||
if(event.name=='gain') return event.cards&&event.cards.length>1;
|
||||
return event.cards2&&event.cards2.length>1;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -10510,27 +10539,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var result=trigger.judge(card)-trigger.judge(judging);
|
||||
var attitude=get.attitude(player,trigger.player);
|
||||
return result*attitude;
|
||||
}).set('judging',trigger.player.judging[0]);
|
||||
}).set('judging',trigger.player.judging[0]).set('filterButton',function(button){
|
||||
var player=_status.event.player;
|
||||
var card=button.link;
|
||||
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
|
||||
if(mod2!='unchanged') return mod2;
|
||||
var mod=game.checkMod(card,player,'unchanged','cardRespondable',player);
|
||||
if(mod!='unchanged') return mod;
|
||||
return true;
|
||||
});
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.logSkill('midao',trigger.player);
|
||||
var card=result.links[0];
|
||||
player.storage.yishe.remove(card);
|
||||
player.syncStorage('yishe');
|
||||
if(player.storage.yishe.length==0){
|
||||
player.recover();
|
||||
player.unmarkSkill('yishe');
|
||||
event.forceDie=true;
|
||||
player.respond(result.links,'midao','highlight','noOrdering');
|
||||
result.cards=result.links;
|
||||
}
|
||||
else{
|
||||
player.markSkill('yishe');
|
||||
event.finish();
|
||||
}
|
||||
|
||||
player.$throw(card);
|
||||
game.broadcastAll(function(card){
|
||||
if(card.clone){
|
||||
card.clone.classList.add('thrownhighlight');
|
||||
}
|
||||
},card);
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
var card=result.cards[0];
|
||||
player.storage.yishe.remove(card);
|
||||
if(trigger.player.judging[0].clone){
|
||||
trigger.player.judging[0].clone.classList.remove('thrownhighlight');
|
||||
game.broadcast(function(card){
|
||||
|
@ -10540,9 +10570,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},trigger.player.judging[0]);
|
||||
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone]));
|
||||
}
|
||||
trigger.player.judging[0]=card;
|
||||
trigger.orderingCards.addArray(result.links);
|
||||
game.log(player,'的判定牌改为',card);
|
||||
game.cardsDiscard(trigger.player.judging[0]);
|
||||
trigger.player.judging[0]=result.cards[0];
|
||||
trigger.orderingCards.addArray(result.cards);
|
||||
game.log(trigger.player,'的判定牌改为',card);
|
||||
game.delay(2);
|
||||
}
|
||||
},
|
||||
|
@ -10901,13 +10932,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
global:'die',
|
||||
},
|
||||
silent:true,
|
||||
firstDo:true,
|
||||
filter:function(event,player){
|
||||
if(event.name=='gain'){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='h') return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if(event.name=='lose') return event.hs.length>0;
|
||||
return true;
|
||||
},
|
||||
content:function(){
|
||||
|
@ -11054,7 +11081,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:'manjuan',
|
||||
forced:true,
|
||||
priority:15,
|
||||
trigger:{player:'gainEnd'},
|
||||
trigger:{player:'gainAfter'},
|
||||
filter:function(event,player){
|
||||
return event.type!='xinmanjuan';
|
||||
},
|
||||
|
@ -11093,12 +11120,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
manjuan:{
|
||||
audio:true,
|
||||
trigger:{global:'discardAfter'},
|
||||
trigger:{global:'loseAfter'},
|
||||
filter:function(event,player){
|
||||
if(event.type!='discard') return false;
|
||||
if(event.player==player) return false;
|
||||
if(!player.countCards('he')) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(get.position(event.cards[i])=='d'){
|
||||
for(var i=0;i<event.cards2.length;i++){
|
||||
if(get.position(event.cards2[i],true)=='d'){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -11113,10 +11141,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"step 1"
|
||||
var cards=[];
|
||||
var suits=['club','spade','heart','diamond']
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(get.position(trigger.cards[i])=='d'){
|
||||
cards.push(trigger.cards[i]);
|
||||
suits.remove(get.suit(trigger.cards[i]));
|
||||
for(var i=0;i<trigger.cards2.length;i++){
|
||||
if(get.position(trigger.cards2[i],true)=='d'){
|
||||
cards.push(trigger.cards2[i],true);
|
||||
suits.remove(get.suit(trigger.cards2[i]));
|
||||
}
|
||||
}
|
||||
if(cards.length){
|
||||
|
@ -11844,10 +11872,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
lirang:{
|
||||
audio:2,
|
||||
trigger:{player:'discardAfter'},
|
||||
trigger:{player:'loseAfter'},
|
||||
filter:function(event,player){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(get.position(event.cards[i])=='d'){
|
||||
if(event.type!='discard') return false;
|
||||
for(var i=0;i<event.cards2.length;i++){
|
||||
if(get.position(event.cards2[i])=='d'){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -11859,9 +11888,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"step 0"
|
||||
if(trigger.delay==false) game.delay();
|
||||
event.cards=[];
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(get.position(trigger.cards[i])=='d'){
|
||||
event.cards.push(trigger.cards[i]);
|
||||
event.logged=false;
|
||||
for(var i=0;i<trigger.cards2.length;i++){
|
||||
if(get.position(trigger.cards2[i],true)=='d'){
|
||||
event.cards.push(trigger.cards2[i]);
|
||||
//ui.special.appendChild(trigger.cards[i]);
|
||||
}
|
||||
}
|
||||
|
@ -11990,12 +12020,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
shenxian:{
|
||||
audio:2,
|
||||
trigger:{global:'discardAfter'},
|
||||
trigger:{global:'loseAfter'},
|
||||
filter:function(event,player){
|
||||
if(event.player==player||_status.currentPhase==player) return false;
|
||||
if(event.type!='discard'||event.player==player||_status.currentPhase==player) return false;
|
||||
if(player.hasSkill('shenxian2')) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(get.type(event.cards[i])=='basic'){
|
||||
for(var i=0;i<event.cards2.length;i++){
|
||||
if(get.type(event.cards2[i])=='basic'){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -12023,6 +12053,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.judge();
|
||||
"step 1"
|
||||
player.storage.qiangwu=result.number;
|
||||
player.addTempSkill('qiangwu3','phaseUseEnd');
|
||||
},
|
||||
ai:{
|
||||
result:{
|
||||
|
@ -12030,6 +12061,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
order:11
|
||||
},
|
||||
},
|
||||
qiangwu3:{
|
||||
mod:{
|
||||
targetInRange:function(card,player){
|
||||
if(_status.currentPhase==player&&card.name=='sha'&&card.number<player.storage.qiangwu) return true;
|
||||
|
@ -12038,17 +12071,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(_status.currentPhase==player&&card.name=='sha'&&card.number>player.storage.qiangwu) return Infinity;
|
||||
}
|
||||
},
|
||||
group:['qiangwu2','qiangwu3']
|
||||
},
|
||||
qiangwu2:{
|
||||
trigger:{player:'phaseUseBegin'},
|
||||
silent:true,
|
||||
content:function(){
|
||||
delete player.storage.qiangwu;
|
||||
}
|
||||
},
|
||||
qiangwu3:{
|
||||
trigger:{player:'useCard'},
|
||||
trigger:{player:'useCard1'},
|
||||
filter:function(event,player){
|
||||
if(_status.currentPhase==player&&event.card.name=='sha'&&
|
||||
event.card.number>player.storage.qiangwu) return true;
|
||||
|
@ -12056,6 +12079,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
firstDo:true,
|
||||
content:function(){
|
||||
if(player.stat[player.stat.length-1].card.sha>0){
|
||||
player.stat[player.stat.length-1].card.sha--;
|
||||
|
@ -12165,7 +12189,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audioname:['liushan']
|
||||
},
|
||||
shoucheng:{
|
||||
trigger:{global:'loseEnd'},
|
||||
trigger:{global:'loseAfter'},
|
||||
audio:2,
|
||||
check:function(event,player){
|
||||
return get.attitude(player,event.player)>0;
|
||||
|
@ -12173,10 +12197,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(event,player){
|
||||
if(event.player.isDead()||event.player.countCards('h')) return false;
|
||||
if(_status.currentPhase==event.player) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='h') return true;
|
||||
}
|
||||
return false;
|
||||
return event.hs&&event.hs.length>0;
|
||||
},
|
||||
logTarget:'player',
|
||||
content:function(){
|
||||
|
@ -12505,15 +12526,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
sijian:{
|
||||
trigger:{player:'loseEnd'},
|
||||
trigger:{player:'loseAfter'},
|
||||
direct:true,
|
||||
audio:2,
|
||||
filter:function(event,player){
|
||||
if(player.countCards('h')) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='h') return true;
|
||||
}
|
||||
return false;
|
||||
return event.hs&&event.hs.length>0;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
|
@ -13141,6 +13159,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else{
|
||||
return get.color(card)=='black'?0:-10+result;
|
||||
}
|
||||
}).set('filterButton',function(button){
|
||||
var player=_status.event.target;
|
||||
var card=button.link;
|
||||
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
|
||||
if(mod2!='unchanged') return mod2;
|
||||
var mod=game.checkMod(card,player,'unchanged','cardRespondable',player);
|
||||
if(mod!='unchanged') return mod;
|
||||
return true;
|
||||
}).set('judge',judge).set('attitude',attitude);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
|
@ -13177,14 +13203,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mingzhe:{
|
||||
audio:2,
|
||||
trigger:{player:['useCardAfter','respondAfter','discardAfter']},
|
||||
trigger:{player:['useCard','respond','loseAfter']},
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
if(player==_status.currentPhase) return false;
|
||||
if(event.cards){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(get.color(event.cards[i])=='red'&&
|
||||
event.cards[i].original!='j') return true;
|
||||
if(event.name!='lose') return get.color(event.card)=='red';
|
||||
if(event.type!='discard') return false;
|
||||
if(event.cards2){
|
||||
for(var i=0;i<event.cards2.length;i++){
|
||||
if(get.color(event.cards2[i])=='red') return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -13192,10 +13219,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
"step 0"
|
||||
event.count=1;
|
||||
if(trigger.name=='discard'){
|
||||
if(trigger.name=='lose'){
|
||||
event.count=0;
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(get.color(trigger.cards[i])=='red'&&trigger.cards[i].original!='j') event.count++;
|
||||
for(var i=0;i<trigger.cards2.length;i++){
|
||||
if(get.color(trigger.cards2[i])=='red') event.count++;
|
||||
}
|
||||
}
|
||||
"step 1"
|
||||
|
|
|
@ -210,7 +210,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
"step 0"
|
||||
player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+
|
||||
get.translation(trigger.player.judging[0])+','+get.prompt('guicai'),'h').set('ai',function(card){
|
||||
get.translation(trigger.player.judging[0])+','+get.prompt('guicai'),'h',function(card){
|
||||
var player=_status.event.player;
|
||||
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
|
||||
if(mod2!='unchanged') return mod2;
|
||||
var mod=game.checkMod(card,player,'unchanged','cardRespondable',player);
|
||||
if(mod!='unchanged') return mod;
|
||||
return true;
|
||||
}).set('ai',function(card){
|
||||
var trigger=_status.event.getTrigger();
|
||||
var player=_status.event.player;
|
||||
var judging=_status.event.judging;
|
||||
|
@ -1969,14 +1976,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
lianying:{
|
||||
audio:2,
|
||||
trigger:{player:'loseEnd'},
|
||||
trigger:{player:'loseAfter'},
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
if(player.countCards('h')) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='h') return true;
|
||||
}
|
||||
return false;
|
||||
return event.hs&&event.hs.length>0;
|
||||
},
|
||||
content:function(){
|
||||
player.draw();
|
||||
|
@ -1999,20 +2003,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xiaoji:{
|
||||
audio:2,
|
||||
audioname:['sp_sunshangxiang','re_sunshangxiang'],
|
||||
trigger:{player:'loseEnd'},
|
||||
trigger:{player:'loseAfter'},
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='e') return true;
|
||||
}
|
||||
return false;
|
||||
return event.es&&event.es.length>0;
|
||||
},
|
||||
content:function(){
|
||||
var num=0;
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(trigger.cards[i].original=='e') num+=2;
|
||||
"step 0"
|
||||
event.count=trigger.es.length;
|
||||
"step 1"
|
||||
event.count--;
|
||||
player.draw(2);
|
||||
"step 2"
|
||||
if(event.count>0){
|
||||
player.chooseBool(get.prompt2('xiaoji')).set('frequentSkill','xiaoji').ai=lib.filter.all;
|
||||
}
|
||||
"step 3"
|
||||
if(result.bool){
|
||||
player.logSkill('xiaoji');
|
||||
event.goto(1);
|
||||
}
|
||||
player.draw(num);
|
||||
},
|
||||
ai:{
|
||||
noe:true,
|
||||
|
|
|
@ -368,9 +368,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'使用'+get.translation(cards)+'。(没有距离限制)',
|
||||
'将'+get.translation(cards)+'当做【杀】使用。',
|
||||
]).set('ai',function(){
|
||||
var list=[0,1];
|
||||
return list.randomGet();
|
||||
});
|
||||
return _status.event.choice;
|
||||
}).set('choice',target.getUseValue(card,false)>target.getUseValue({name:'sha',cards:cards})?0:1);
|
||||
}
|
||||
else if(bool1){
|
||||
event.directindex=0;
|
||||
|
@ -407,19 +406,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
subSkill:{
|
||||
lose:{
|
||||
trigger:{
|
||||
player:"loseEnd",
|
||||
global:"phaseDiscardBegin",
|
||||
},
|
||||
audio:'xinfu_bijing',
|
||||
filter:function (event,player){
|
||||
if(!player.storage.xinfu_bijing) return false;
|
||||
if(_status.currentPhase==player) return false;
|
||||
return event.cards.contains(player.storage.xinfu_bijing);
|
||||
if(event.player==player) return false;
|
||||
return player.getHistory('lose',function(evt){
|
||||
return evt.cards.contains(player.storage.xinfu_bijing);
|
||||
}).length>0&&event.player.countCards('he')>0;
|
||||
},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:false,
|
||||
logTarget:'player',
|
||||
content:function (){
|
||||
_status.currentPhase.storage.bijing=player;
|
||||
_status.currentPhase.addTempSkill('xinfu_bijing_effect');
|
||||
trigger.player.chooseToDiscard(2,true,'he');
|
||||
},
|
||||
sub:true,
|
||||
},
|
||||
|
@ -430,7 +430,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
forced:true,
|
||||
filter:function (event,player){
|
||||
if(!player.storage.xinfu_bijing)return false;
|
||||
return get.owner(player.storage.xinfu_bijing)==player;
|
||||
return player.getCards('h').contains(player.storage.xinfu_bijing);
|
||||
},
|
||||
content:function (){
|
||||
player.discard(player.storage.xinfu_bijing);
|
||||
|
@ -438,20 +438,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
sub:true,
|
||||
},
|
||||
effect:{
|
||||
trigger:{
|
||||
player:"phaseDiscardBegin",
|
||||
},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:false,
|
||||
content:function (){
|
||||
player.storage.bijing.logSkill('xinfu_bijing');
|
||||
player.storage.bijing.line(player,'green');
|
||||
player.chooseToDiscard(2,'he',true);
|
||||
},
|
||||
sub:true,
|
||||
},
|
||||
},
|
||||
trigger:{
|
||||
player:"phaseJieshuBegin",
|
||||
|
@ -1878,25 +1864,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
forced:true,
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:["discardAfter","enterGame"],
|
||||
player:["loseAfter","enterGame"],
|
||||
global:"gameDrawAfter",
|
||||
},
|
||||
filter:function (event,player){
|
||||
if(event.name!='discard') return true;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(!player.hasMark('xinfu_falu_'+get.suit(event.cards[i]))) return true;
|
||||
if(event.name!='lose') return true;
|
||||
if(event.type!='discard') return false;
|
||||
for(var i=0;i<event.cards2.length;i++){
|
||||
if(!player.hasMark('xinfu_falu_'+get.suit(event.cards2[i]))) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
content:function (){
|
||||
if(trigger.name!='discard'){
|
||||
if(trigger.name!='lose'){
|
||||
for(var i=0;i<lib.suit.length;i++){
|
||||
if(!player.hasMark('xinfu_falu_'+lib.suit[i])) player.addMark('xinfu_falu_'+lib.suit[i]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
var suit=get.suit(trigger.cards[i]);
|
||||
for(var i=0;i<trigger.cards2.length;i++){
|
||||
var suit=get.suit(trigger.cards2[i]);
|
||||
if(!player.hasMark('xinfu_falu_'+suit)) player.addMark('xinfu_falu_'+suit);
|
||||
}
|
||||
},
|
||||
|
@ -2061,8 +2048,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return player.hasMark('xinfu_falu_heart');
|
||||
},
|
||||
check:function (event,player){
|
||||
if(get.attitude(player,event.player>0)) return false;
|
||||
if(event.player.getEquip('baiyin')||event.player.getEquip('rewrite_baiyin')) return false;
|
||||
if(get.attitude(player,event.player)>=0) return false;
|
||||
if(event.player.hasSkillTag('filterDamage',null,{
|
||||
player:player,
|
||||
card:event.card,
|
||||
})) return false;
|
||||
return player.hasMark('xinfu_falu_spade')||get.color(ui.cardPile.firstChild)=='black';
|
||||
},
|
||||
prompt2:function(event){
|
||||
|
@ -2134,9 +2124,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var sha=false;
|
||||
var jiu=false;
|
||||
for(var i=0;i<hs.length;i++){
|
||||
if(game.hasPlayer(function(current){
|
||||
return trigger.player.canUse(hs[i],current)&&get.effect(current,hs[i],trigger.player,trigger.player)>0;
|
||||
})){
|
||||
if(trigger.player.hasValueTarget(hs[i])){
|
||||
if(hs[i].name=='sha'&&!sha){
|
||||
sha=true;
|
||||
map.basic+=2;
|
||||
|
@ -2164,7 +2152,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
delete player.storage.xinfu_yanyu2;
|
||||
},
|
||||
trigger:{
|
||||
global:["loseEnd","cardsDiscardEnd"],
|
||||
global:["loseAfter","cardsDiscardAfter"],
|
||||
},
|
||||
direct:true,
|
||||
filter:function (event,player){
|
||||
|
@ -2206,9 +2194,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var att=get.attitude(_status.event.player,target);
|
||||
var card=_status.event.card;
|
||||
var val=get.value(card);
|
||||
if(target==_status.currentPhase&&game.hasPlayer(function(current){
|
||||
return target.canUse(card,current)&&get.effect(current,card,target,target)>0;
|
||||
})) att=att*2;
|
||||
if(target==_status.currentPhase&&target.hasValueTarget(card)) att=att*2;
|
||||
return att*val;
|
||||
}).set('card',event.togain);
|
||||
}
|
||||
|
@ -2449,7 +2435,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var raweffect=function(player,target){
|
||||
if(player.countCards('h','sha')){
|
||||
return get.effect(target,{name:'sha'},player,target);
|
||||
}else{
|
||||
}
|
||||
else{
|
||||
var att=get.attitude(player,target);
|
||||
var nh=target.countCards('h');
|
||||
if(att>0){
|
||||
|
@ -2697,15 +2684,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"qinguo_lose":{
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:"loseEnd",
|
||||
player:"loseAfter",
|
||||
},
|
||||
filter:function (event,player){
|
||||
if(event.getParent().name=='equip') return false;
|
||||
if(player.hp!=player.countCards('e')||!player.isDamaged()) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='e') return true;
|
||||
}
|
||||
return false;
|
||||
return event.es&&event.es.length>0;
|
||||
},
|
||||
frequent:true,
|
||||
content:function (){
|
||||
|
@ -3143,19 +3127,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"xinfu_gongqing":{
|
||||
audio:true,
|
||||
trigger:{
|
||||
player:"damageBegin4",
|
||||
player:["damageBegin3","damageBegin4"],
|
||||
},
|
||||
forced:true,
|
||||
filter:function (event,player){
|
||||
filter:function (event,player,name){
|
||||
if(!event.source) return false;
|
||||
var range=event.source.getAttackRange();
|
||||
if(range==3) return false;
|
||||
if(range<3&&event.num<=1) return false;
|
||||
return true;
|
||||
if(range<3) return name='damageBegin4'&&event.num>1;
|
||||
return name='damageBegin3';
|
||||
},
|
||||
//priority:-9.5,
|
||||
content:function (){
|
||||
trigger.num=trigger.source.getAttackRange()<3?1:trigger.num+1;
|
||||
trigger.num=event.triggername=='damageBegin4'?1:trigger.num+1;
|
||||
},
|
||||
ai:{
|
||||
filterDamage:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(arg&&arg.player){
|
||||
if(arg.player.hasSkillTag('jueqing',false,player)) return false;
|
||||
if(arg.player.getAttackRange()<3) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
"xinfu_andong":{
|
||||
|
@ -3558,7 +3552,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.order({name:'sha'})+0.4;
|
||||
},
|
||||
result:{
|
||||
target:function (card,player,target){
|
||||
target:function (player,target){
|
||||
if(player.hasCard(function(card){
|
||||
if(get.position(card)!="h") return false;
|
||||
var val=get.value(card);
|
||||
|
@ -4382,47 +4376,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},'h');
|
||||
},
|
||||
respondSha:true,
|
||||
basic:{
|
||||
useful:[5,1],
|
||||
value:[5,1],
|
||||
},
|
||||
order:function (){
|
||||
if(_status.event.player.hasSkillTag('presha',true,null,true)) return 10.1;
|
||||
return 3.1;
|
||||
},
|
||||
result:{
|
||||
target:function (player,target){
|
||||
if(player.hasSkill('jiu')&&!target.getEquip('baiyin')){
|
||||
if(get.attitude(player,target)>0){
|
||||
return -6;
|
||||
}
|
||||
else{
|
||||
return -3;
|
||||
}
|
||||
}
|
||||
return -1.5;
|
||||
},
|
||||
},
|
||||
tag:{
|
||||
respond:1,
|
||||
respondShan:1,
|
||||
damage:function (card){
|
||||
if(card.nature=='poison') return;
|
||||
return 1;
|
||||
},
|
||||
natureDamage:function (card){
|
||||
if(card.nature) return 1;
|
||||
},
|
||||
fireDamage:function (card,nature){
|
||||
if(card.nature=='fire') return 1;
|
||||
},
|
||||
thunderDamage:function (card,nature){
|
||||
if(card.nature=='thunder') return 1;
|
||||
},
|
||||
poisonDamage:function (card,nature){
|
||||
if(card.nature=='poison') return 1;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"yizan_use":{
|
||||
|
@ -4823,7 +4776,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"xinfu_jiyuan":{
|
||||
trigger:{
|
||||
global:"dying",
|
||||
source:"gainEnd",
|
||||
source:"gainAfter",
|
||||
},
|
||||
//priority:6,
|
||||
audio:2,
|
||||
|
@ -4894,17 +4847,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function (event,player){
|
||||
return player.storage.xinfu_zhaoxin.length<3&&player.countCards('h')>0;
|
||||
},
|
||||
visible:true,
|
||||
filterCard:true,
|
||||
selectCard:function (){
|
||||
var player=_status.event.player;
|
||||
return [1,3-player.storage.xinfu_zhaoxin.length];
|
||||
},
|
||||
discard:false,
|
||||
lose:false,
|
||||
//lose:false,
|
||||
delay:0,
|
||||
content:function (){
|
||||
'step 0'
|
||||
player.lose(cards,ui.special,'toStorage')
|
||||
//player.lose(cards,ui.special,'toStorage')
|
||||
player.$give(cards,player,false);
|
||||
player.storage.xinfu_zhaoxin=player.storage.xinfu_zhaoxin.concat(cards);
|
||||
player.markSkill('xinfu_zhaoxin');
|
||||
|
@ -5057,7 +5011,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"qc_mingzhe":{
|
||||
audio:"xinfu_qianchong",
|
||||
trigger:{
|
||||
player:["useCardAfter","respondAfter","discardAfter"],
|
||||
player:["useCard","respond","loseAfter"],
|
||||
},
|
||||
frequent:true,
|
||||
filter:function (event,player){
|
||||
|
@ -5068,10 +5022,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var i=0;i<es.length;i++){
|
||||
if(get.color(es[i])!='red') return false;
|
||||
}
|
||||
if(event.cards){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(get.color(event.cards[i])=='red'&&
|
||||
event.cards[i].original!='j') return true;
|
||||
if(event.name!='lose') return get.color(event.card)=='red';
|
||||
if(event.type!='discard') return false;
|
||||
if(event.cards2){
|
||||
for(var i=0;i<event.cards2.length;i++){
|
||||
if(get.color(event.cards2[i])=='red') return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -5079,10 +5034,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function (){
|
||||
"step 0"
|
||||
event.count=1;
|
||||
if(trigger.name=='discard'){
|
||||
if(trigger.name=='lose'){
|
||||
event.count=0;
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(get.color(trigger.cards[i])=='red'&&trigger.cards[i].original!='j') event.count++;
|
||||
for(var i=0;i<trigger.cards2.length;i++){
|
||||
if(get.color(trigger.cards2[i])=='red') event.count++;
|
||||
}
|
||||
}
|
||||
"step 1"
|
||||
|
@ -5090,8 +5045,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
event.count--;
|
||||
"step 2"
|
||||
if(event.count){
|
||||
if(lib.config.autoskilllist.contains('mingzhe')) player.chooseBool(get.prompt2('mingzhe'));
|
||||
else event._result={bool:true};
|
||||
player.chooseBool(get.prompt2('mingzhe')).set('frequentSkill',event.name);
|
||||
}
|
||||
else event.finish();
|
||||
"step 3"
|
||||
|
@ -5186,16 +5140,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
target:player,
|
||||
card:event.card
|
||||
})) return false;
|
||||
return (event.card.name=='sha'&&['spade','club','heart'].contains(get.suit(event.card)))
|
||||
return (event.card.name=='sha'&&(get.suit(event.card)=='heart'||get.color(event.card)=='black'))
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function (card,player,target){
|
||||
if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return;
|
||||
if(target.hasSkillTag('unequip2')) return;
|
||||
if(player.hasSkillTag('unequip',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})||player.hasSkillTag('unequip_ai',false,{
|
||||
name:card?card.name:null,
|
||||
target:player,
|
||||
card:card
|
||||
})) return;
|
||||
if(card.name=='sha'&&['spade','club','heart'].contains(get.suit(card))) return 'zerotarget';
|
||||
},
|
||||
|
|
|
@ -532,9 +532,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(card.name=='sha'&&get.color(card)=='red'){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
var current=game.players[i];
|
||||
if(current!=player&&get.attitude(player,current)>0&&game.hasPlayer(function(target){
|
||||
return target!=current&¤t.canUse(card,target)&&get.effect(target,card,current,current)>0
|
||||
})) return 7;
|
||||
if(current!=player&&get.attitude(player,current)>0&¤t.hasValueTarget(card)) return 7;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -545,9 +543,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var card=ui.selected.cards[0];
|
||||
var att=get.attitude(player,target);
|
||||
if(get.value(card)<0) return -att*2;
|
||||
if(target.countCards('h',{name:'sha',color:'red'})||target.hasSkill('wusheng')||target.hasSkill('new_rewusheng')||target.hasSkill('wushen')||(card.name=='sha'&&get.color(card)=='red'&&game.hasPlayer(function(target2){
|
||||
return target2!=target&&target.canUse({name:'sha'},target2)&&get.effect(target2,{name:'sha'},target,target)>0
|
||||
}))) return att*2;
|
||||
if(target.countCards('h',{name:'sha',color:'red'})||target.hasSkill('wusheng')||target.hasSkill('new_rewusheng')||target.hasSkill('wushen')||(card.name=='sha'&&get.color(card)=='red'&&target.hasValueTarget(card))) return att*2;
|
||||
var eff=0;
|
||||
game.countPlayer(function(current){
|
||||
if(target!=current&&get.distance(target,current,'attack')>1) return;
|
||||
|
@ -569,13 +565,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 2'
|
||||
target.chooseToUse({
|
||||
filterCard:function(card){
|
||||
return card.name=='sha'&&get.color(card)!='black';
|
||||
return card.name=='sha'&&get.color(card)!='black'&&lib.filter.cardEnabled.apply(this,arguments);
|
||||
},
|
||||
prompt:'请使用一张不为黑色的【杀】,否则'+get.translation(player)+'可以对你或你攻击范围内的一名其他角色造成1点伤害',
|
||||
});
|
||||
'step 3'
|
||||
if(result.bool){
|
||||
player.draw();
|
||||
var num=1;
|
||||
game.countPlayer2(function(current){
|
||||
current.getHistory('damage',function(evt){
|
||||
if(evt.getParent(evt.notLink()?4:8)==event) num+=evt.num;
|
||||
});
|
||||
});
|
||||
player.draw(num);
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
|
@ -592,7 +594,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
result.targets[0].damage('nocard');
|
||||
}
|
||||
},
|
||||
group:['xinzhenjun_damage'],
|
||||
//group:['xinzhenjun_damage'],
|
||||
subSkill:{
|
||||
damage:{
|
||||
trigger:{global:'damage'},
|
||||
|
@ -862,57 +864,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
var players=game.filterPlayer();
|
||||
if(player.countCards('h',button.link)) return 0;
|
||||
if(button.link[2]=='wuzhong'){
|
||||
if(player.countCards('h')<player.hp){
|
||||
return 3+Math.random();
|
||||
}
|
||||
if(player.countCards('h',button.link[2])>0) return 0;
|
||||
if(button.link[2]=='wugu') return;
|
||||
var effect=player.getUseValue(button.link[2]);
|
||||
if(effect>0) return effect;
|
||||
return 0;
|
||||
}
|
||||
if(button.link[2]=='tao'){
|
||||
return 3+Math.random();
|
||||
}
|
||||
if(button.link[2]=='sha'){
|
||||
return 2+Math.random();
|
||||
}
|
||||
if(button.link[2]=='juedou'){
|
||||
return 2+Math.random();
|
||||
}
|
||||
if(button.link[2]=='guohe'){
|
||||
return 2+Math.random();
|
||||
}
|
||||
if(button.link[2]=='shunshou'){
|
||||
for(var i=0;i<players.length;i++){
|
||||
if(player.canUse('shunshou',players[i])&&get.attitude(player,players[i])<0){
|
||||
return 2+Math.random();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if(button.link[2]=='tiesuo'){
|
||||
return 1+Math.random();
|
||||
}
|
||||
if(button.link[2]=='jiu'){
|
||||
if(get.effect(player,{name:'jiu'})>0){
|
||||
return 1+Math.random();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if(button.link[2]=='nanman'||button.link[2]=='wanjian'||button.link[2]=='taoyuan'||button.link[2]=='wugu'){
|
||||
var eff=0;
|
||||
for(var i=0;i<players.length;i++){
|
||||
if(players[i]!=player){
|
||||
eff+=get.effect(players[i],{name:button.link[2]},player,player);
|
||||
}
|
||||
}
|
||||
if(eff>0){
|
||||
return eff+Math.random();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return Math.random();
|
||||
|
||||
},
|
||||
backup:function(links,player){
|
||||
return {
|
||||
|
@ -1053,6 +1009,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
viewAs:{name:'wuxie'},
|
||||
check:function(card){
|
||||
var player=_status.event.player;
|
||||
if(player.isPhaseUsing()) return 0;
|
||||
if(!player.storage.xintaoluan2) player.storage.xintaoluan2=0;
|
||||
var allshown=true,players=game.filterPlayer();
|
||||
for(var i=0;i<players.length;i++){
|
||||
|
@ -3510,57 +3467,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
var players=game.filterPlayer();
|
||||
if(player.countCards('h',button.link)) return 0;
|
||||
if(button.link[2]=='wuzhong'){
|
||||
if(player.countCards('h')<player.hp){
|
||||
return 3+Math.random();
|
||||
}
|
||||
if(player.countCards('h',button.link[2])>0) return 0;
|
||||
if(button.link[2]=='wugu') return 0;
|
||||
var effect=player.getUseValue(button.link[2]);
|
||||
if(effect>0) return effect;
|
||||
return 0;
|
||||
}
|
||||
if(button.link[2]=='tao'){
|
||||
return 3+Math.random();
|
||||
}
|
||||
if(button.link[2]=='sha'){
|
||||
return 2+Math.random();
|
||||
}
|
||||
if(button.link[2]=='juedou'){
|
||||
return 2+Math.random();
|
||||
}
|
||||
if(button.link[2]=='guohe'){
|
||||
return 2+Math.random();
|
||||
}
|
||||
if(button.link[2]=='shunshou'){
|
||||
for(var i=0;i<players.length;i++){
|
||||
if(player.canUse('shunshou',players[i])&&get.attitude(player,players[i])<0){
|
||||
return 2+Math.random();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if(button.link[2]=='tiesuo'){
|
||||
return 1+Math.random();
|
||||
}
|
||||
if(button.link[2]=='jiu'){
|
||||
if(get.effect(player,{name:'jiu'})>0){
|
||||
return 1+Math.random();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if(button.link[2]=='nanman'||button.link[2]=='wanjian'||button.link[2]=='taoyuan'||button.link[2]=='wugu'){
|
||||
var eff=0;
|
||||
for(var i=0;i<players.length;i++){
|
||||
if(players[i]!=player){
|
||||
eff+=get.effect(players[i],{name:button.link[2]},player,player);
|
||||
}
|
||||
}
|
||||
if(eff>0){
|
||||
return 1+Math.random();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return Math.random();
|
||||
|
||||
},
|
||||
backup:function(links,player){
|
||||
return {
|
||||
|
@ -4918,12 +4829,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(arg.target!=player.storage.xinxianzhen) return false;
|
||||
},
|
||||
effect:{
|
||||
player:function(card,player,target){
|
||||
if(target==player.storage.xinxianzhen&&['sha','guohe','shunshou','huogong','juedou'].contains(card.name)){
|
||||
if(game.hasPlayer(function(current){
|
||||
return current!=target&&player.canUse(card,current)&&get.effect(current,card,player,player)>0;
|
||||
})){
|
||||
return [1,1];
|
||||
player:function(card,player,target,current){
|
||||
if(!player.storage.xinxianzhen) return;
|
||||
if(target!=player.storage.xinxianzhen&&['sha','guohe','shunshou','huogong','juedou'].contains(card.name)){
|
||||
if(get.effect(player.storage.xinxianzhen,card,player,player)>0){
|
||||
return [1,2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5218,11 +5128,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
shenduan:{
|
||||
trigger:{player:'discardAfter'},
|
||||
trigger:{player:'loseAfter'},
|
||||
filter:function(event,player){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(get.color(event.cards[i])=='black'&&get.type(event.cards[i])=='basic'&&
|
||||
get.position(event.cards[i])=='d'){
|
||||
if(event.type!='discard') return;
|
||||
for(var i=0;i<event.cards2.length;i++){
|
||||
if(get.color(event.cards2[i])=='black'&&get.type(event.cards2[i])=='basic'&&
|
||||
get.position(event.cards2[i])=='d'){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -5232,10 +5143,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
var cards=[];
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(get.color(trigger.cards[i])=='black'&&get.type(trigger.cards[i])=='basic'&&
|
||||
get.position(trigger.cards[i])=='d'){
|
||||
cards.push(trigger.cards[i]);
|
||||
for(var i=0;i<trigger.cards2.length;i++){
|
||||
if(get.color(trigger.cards2[i])=='black'&&get.type(trigger.cards2[i])=='basic'&&
|
||||
get.position(trigger.cards2[i])=='d'){
|
||||
cards.push(trigger.cards2[i]);
|
||||
}
|
||||
}
|
||||
if(!cards.length){
|
||||
|
@ -5247,11 +5158,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 1'
|
||||
if(event.cards.length){
|
||||
player.chooseTarget(get.prompt('shenduan'),'将'+get.translation(event.cards)+(event.cards.length>1?'中的一张牌':'')+'当做【兵粮寸断】对一名其他角色使用',function(card,player,target){
|
||||
return player.canUse({name:'bingliang'},target,false);
|
||||
var cs=_status.event.cards;
|
||||
for(var i=0;i<cs.length;i++){
|
||||
if(player.canUse({name:'bingliang',cards:[cs[i]]},target,false)) return true;
|
||||
}
|
||||
return false;
|
||||
}).set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
return get.effect(target,{name:'bingliang'},player,player);
|
||||
});
|
||||
}).set('cards',cards);
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
|
@ -5264,7 +5179,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
else{
|
||||
delete event.directCard;
|
||||
player.chooseCardButton('选择一张牌当作兵断寸断使用',event.cards,true);
|
||||
player.chooseCardButton('选择一张牌当作兵断寸断使用',event.cards,true).set('filterButton',function(button){
|
||||
return player.canUse({name:'bingliang',cards:[button.link]},_status.event.target,false);
|
||||
}).set('target',event.current);
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -5281,9 +5198,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
if(card){
|
||||
event.cards.remove(card);
|
||||
event.current.addJudge('bingliang',[card]);
|
||||
player.line(event.current);
|
||||
player.useCard({name:'bingliang'},event.current,[card],'shenduan').animate=false;
|
||||
event.goto(1);
|
||||
player.logSkill('shenduan',event.current);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -5299,7 +5216,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var nh=trigger.player.countCards('h');
|
||||
var eff=get.effect(trigger.player,{name:'sha'},player,player);
|
||||
if(!player.canUse({name:'sha'},trigger.player)) eff=0;
|
||||
player.chooseCardButton(get.prompt('yonglve',trigger.player),trigger.player.getCards('j')).set('ai',function(button){
|
||||
player.discardPlayerCard(get.prompt('yonglve',trigger.player),trigger.player,'j').set('ai',function(button){
|
||||
var name=button.link.viewAs||button.link.name;
|
||||
var att=_status.event.att;
|
||||
var nh=_status.event.nh;
|
||||
|
@ -5312,25 +5229,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(name=='bingliang'&&nh<trigger.player.hp) return 1;
|
||||
}
|
||||
return 0;
|
||||
}).set('att',att).set('nh',nh).set('eff',eff);
|
||||
}).set('att',att).set('nh',nh).set('eff',eff).set('logSkill',['yonglve',trigger.player]);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
trigger.player.discard(result.links);
|
||||
if(player.canUse({name:'sha'},trigger.player)) player.useCard({name:'sha'},trigger.player,'yonglve');
|
||||
player.storage.yonglve=false;
|
||||
if(player.canUse({name:'sha'},trigger.player)){
|
||||
event.related=player.useCard({name:'sha'},trigger.player);
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
if(player.storage.yonglve){
|
||||
player.storage.yonglve=false;
|
||||
}
|
||||
else{
|
||||
if(!event.related||!game.hasPlayer2(function(current){
|
||||
return current.getHistory('damage',function(evt){
|
||||
return evt.getParent(2)==event.related;
|
||||
}).length>0;
|
||||
})){
|
||||
player.draw();
|
||||
}
|
||||
},
|
||||
group:'yonglve2'
|
||||
//group:'yonglve2'
|
||||
},
|
||||
yonglve2:{
|
||||
trigger:{source:'damage'},
|
||||
|
@ -5516,68 +5434,62 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
xinzhongyong:{
|
||||
trigger:{player:'shaAfter'},
|
||||
trigger:{player:'useCardAfter'},
|
||||
audio:'zhongyong',
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return get.itemtype(event.cards)=='cards'||(event.responded&&get.itemtype(event.responded.cards)=='cards');
|
||||
return event.card.name=='sha';
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
event.cards1=trigger.cards.slice(0);
|
||||
if(trigger.responded&&trigger.responded.cards&&trigger.responded.cards.length){
|
||||
event.cards2=trigger.responded.cards.slice(0);
|
||||
}
|
||||
event.sha=trigger.cards.slice(0).filterInD();
|
||||
event.shan=[];
|
||||
game.countPlayer2(function(current){
|
||||
current.getHistory('useCard',function(evt){
|
||||
if(evt.card.name=='shan'&&evt.getParent(3)==trigger) event.shan.addArray(evt.cards);
|
||||
});
|
||||
});
|
||||
event.shan.filterInD('d');
|
||||
if(!event.sha.length&&!event.shan.length) event.finish();
|
||||
player.chooseTarget(get.prompt2('zhongyong'),function(card,player,target){
|
||||
return target!=_status.event.source&&target!=player;
|
||||
return !_status.event.source.contains(target)&&target!=player;
|
||||
}).set('ai',function(target){
|
||||
return get.attitude(_status.event.player,target);
|
||||
}).set('source',trigger.target);
|
||||
}).set('source',trigger.targets);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
event.target=result.targets[0];
|
||||
if(!event.cards2){
|
||||
player.logSkill('xinzhongyong',event.target);
|
||||
event.sha=false;
|
||||
event.target.gain(event.cards1,'gain2');
|
||||
for(var i=0;i<event.cards1.length;i++){
|
||||
if(get.color(event.cards1[i])=='red') event.sha=true;break;
|
||||
}
|
||||
event.goto(3);
|
||||
}
|
||||
else{
|
||||
var sha=false;
|
||||
for(var i=0;i<event.cards1.length;i++){
|
||||
if(get.color(event.cards1[i])=='red') sha=true;break;
|
||||
}
|
||||
player.chooseControl('杀','闪',function(event,player){
|
||||
if(_status.event.choosesha) return '杀';
|
||||
return '闪';
|
||||
}).set('prompt','选择交给'+get.translation(result.targets)+'的牌').set('choosesha',sha);
|
||||
var target=result.targets[0];
|
||||
event.target=target;
|
||||
player.logSkill('xinzhongyong',target);
|
||||
if(event.sha.length&&event.shan.length){
|
||||
player.chooseControl().set('choiceList',[
|
||||
'将'+get.translation(event.sha)+'交给'+get.translation(target),
|
||||
'将'+get.translation(event.shan)+'交给'+get.translation(target),
|
||||
]).set('ai',function(){
|
||||
return _status.event.choice;
|
||||
}).set('choice',function(){
|
||||
if(get.color(event.sha)!='black') return 0;
|
||||
return 1;
|
||||
}());
|
||||
}
|
||||
else event._result={index:event.sha.length?0:1};
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 2"
|
||||
player.logSkill('xinzhongyong',event.target);
|
||||
event.sha=false;
|
||||
if(result.control=='杀'){
|
||||
event.target.gain(event.cards1,'gain2');
|
||||
for(var i=0;i<event.cards1.length;i++){
|
||||
if(get.color(event.cards1[i])=='red') event.sha=true;break;
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.target.gain(event.cards2,'gain2');
|
||||
for(var i=0;i<event.cards2.length;i++){
|
||||
if(get.color(event.cards2[i])=='red') event.sha=true;break;
|
||||
var cards=result.index==0?event.sha:event.shan;
|
||||
event.useSha=false;
|
||||
target.gain(cards,'gain2');
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(get.color(cards[i])=='red'){
|
||||
event.useSha=true;break;
|
||||
}
|
||||
}
|
||||
"step 3"
|
||||
if(event.sha){
|
||||
if(event.useSha){
|
||||
event.target.chooseToUse('是否使用一张杀?',{name:'sha'}).set('filterTarget',function(card,player,target){
|
||||
return target!=_status.event.sourcex&&get.distance(_status.event.sourcex,target,'attack')<=1&&player.canUse('sha',target,false);
|
||||
return target!=_status.event.sourcex&&get.distance(_status.event.sourcex,target,'attack')<=1&&lib.filter.targetEnabled.apply(this,arguments);
|
||||
}).set('sourcex',player);
|
||||
}
|
||||
}
|
||||
|
@ -6677,7 +6589,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
taoxi:{
|
||||
audio:2,
|
||||
trigger:{player:'useCardToBegin'},
|
||||
trigger:{player:'useCardToPlayered'},
|
||||
filter:function(event,player){
|
||||
return _status.currentPhase==player&&event.targets.length==1&&
|
||||
event.target.countCards('h')>0&&!player.hasSkill('taoxi4')&&player!=event.target;
|
||||
|
@ -7396,7 +7308,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
juece:{
|
||||
audio:2,
|
||||
trigger:{global:'loseEnd'},
|
||||
trigger:{global:'loseAfter'},
|
||||
check:function(event,player){
|
||||
return get.damageEffect(event.player,player,player)>0;
|
||||
},
|
||||
|
@ -7404,10 +7316,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.player.countCards('h')) return false;
|
||||
if(_status.currentPhase!=player) return false;
|
||||
if(event.player==player) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='h') return true;
|
||||
}
|
||||
return false;
|
||||
return event.hs&&event.hs.length>0;
|
||||
},
|
||||
content:function(){
|
||||
player.line(trigger.player,'green');
|
||||
|
@ -7563,12 +7472,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mod:{
|
||||
cardEnabled2:function(card,player){
|
||||
if(get.color(card)==player.storage.qianxi2) return false;
|
||||
if(get.color(card)==player.storage.qianxi2&&get.position(card)=='h') return false;
|
||||
},
|
||||
},
|
||||
intro:{
|
||||
content:function(color){
|
||||
return '不能使用或打出'+get.translation(color)+'的牌';
|
||||
return '不能使用或打出'+get.translation(color)+'的手牌';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -8912,10 +8821,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
zongxuan:{
|
||||
audio:2,
|
||||
trigger:{player:'discardAfter'},
|
||||
trigger:{player:'loseAfter'},
|
||||
filter:function(event,player){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(get.position(event.cards[i])=='d'){
|
||||
if(event.type!='discard') return false;
|
||||
for(var i=0;i<event.cards2.length;i++){
|
||||
if(get.position(event.cards2[i])=='d'){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -8926,9 +8836,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
"step 0"
|
||||
var cards=[];
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(get.position(trigger.cards[i])=='d'){
|
||||
cards.push(trigger.cards[i]);
|
||||
for(var i=0;i<trigger.cards2.length;i++){
|
||||
if(get.position(trigger.cards2[i],true)=='d'){
|
||||
cards.push(trigger.cards2[i]);
|
||||
}
|
||||
}
|
||||
player.chooseCardButton(cards,[1,cards.length],'纵玄:将弃置的牌按任意顺序置于牌堆顶(先选择的在上)').set('ai',function(){
|
||||
|
@ -9298,7 +9208,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
shangshi:{
|
||||
audio:2,
|
||||
trigger:{player:['loseEnd','changeHp']},
|
||||
trigger:{player:['loseAfter','changeHp']},
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
return player.countCards('h')<player.getDamagedHp();
|
||||
|
@ -9323,11 +9233,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
subSkill:{
|
||||
discard:{
|
||||
audio:2,
|
||||
trigger:{global:'discardAfter'},
|
||||
trigger:{global:'loseAfter'},
|
||||
filter:function(event,player){
|
||||
if(event.type!='discard') return false;
|
||||
if(event.player==player) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(get.suit(event.cards[i])=='club'&&get.position(event.cards[i])=='d'){
|
||||
for(var i=0;i<event.cards2.length;i++){
|
||||
if(get.suit(event.cards2[i])=='club'&&get.position(event.cards2[i],true)=='d'){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -9335,9 +9246,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
frequent:'check',
|
||||
check:function(event,player){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(get.suit(event.cards[i])=='club'&&get.position(event.cards[i])=='d'){
|
||||
if(event.cards[i].name=='du') return false;
|
||||
for(var i=0;i<event.cards2.length;i++){
|
||||
if(get.suit(event.cards2[i])=='club'&&get.position(event.cards2[i],true)=='d'){
|
||||
if(event.cards2[i].name=='du') return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -9347,32 +9258,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(trigger.delay==false) game.delay();
|
||||
"step 1"
|
||||
var cards=[];
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(get.suit(trigger.cards[i])=='club'&&get.position(trigger.cards[i])=='d'){
|
||||
cards.push(trigger.cards[i]);
|
||||
for(var i=0;i<trigger.cards2.length;i++){
|
||||
if(get.suit(trigger.cards2[i])=='club'&&get.position(trigger.cards2[i],true)=='d'){
|
||||
cards.push(trigger.cards2[i]);
|
||||
}
|
||||
}
|
||||
if(cards.length){
|
||||
player.gain(cards,'log');
|
||||
player.$gain2(cards);
|
||||
player.gain(cards,'log','gain2');
|
||||
}
|
||||
},
|
||||
},
|
||||
judge:{
|
||||
audio:2,
|
||||
trigger:{global:'judgeAfter'},
|
||||
trigger:{global:'cardsDiscardAfter'},
|
||||
frequent:'check',
|
||||
check:function(event,player){
|
||||
return event.result.card.name!='du';
|
||||
return event.cards[0].name!='du';
|
||||
},
|
||||
filter:function(event,player){
|
||||
if(event.player==player) return false;
|
||||
if(get.position(event.result.card)!='d') return false;
|
||||
return (get.suit(event.result.card)=='club');
|
||||
var evt=event.getParent().relatedEvent;
|
||||
if(!evt||evt.name!='judge') return;
|
||||
if(evt.player==player) return false;
|
||||
if(get.position(event.cards[0],true)!='d') return false;
|
||||
return (get.suit(event.cards[0])=='club');
|
||||
},
|
||||
content:function(){
|
||||
player.gain(trigger.result.card,'log');
|
||||
player.$gain2(trigger.result.card);
|
||||
player.gain(trigger.cards,'gain2','log');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9736,22 +9647,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xuanfeng:{
|
||||
audio:2,
|
||||
audioname:['boss_lvbu3'],
|
||||
trigger:{player:['loseEnd','phaseDiscardEnd']},
|
||||
trigger:{player:['loseAfter','phaseDiscardEnd']},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
if(event.name=='phaseDiscard'){
|
||||
return event.cards&&event.cards.length>1
|
||||
var cards=[];
|
||||
player.getHistory('lose',function(evt){
|
||||
if(evt&&evt.getParent('phaseDiscard')==event&&evt.hs) cards.addArray(evt.hs);
|
||||
});
|
||||
return cards.length>1;
|
||||
}
|
||||
else{
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='e') return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
else return event.es&&event.es.length>0;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
event.count=2;
|
||||
event.logged=false;
|
||||
"step 1"
|
||||
player.chooseTarget(get.prompt('xuanfeng'),'弃置一名其他角色的一张牌',function(card,player,target){
|
||||
if(player==target) return false;
|
||||
|
@ -9761,8 +9672,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
if(!event.logged){
|
||||
player.logSkill('xuanfeng',result.targets);
|
||||
player.line(result.targets,'green');
|
||||
event.logged=true;
|
||||
}
|
||||
else player.line(result.targets[0],'green');
|
||||
player.discardPlayerCard(result.targets[0],'he',true);
|
||||
event.count--;
|
||||
}
|
||||
|
@ -10987,7 +10901,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
rezhenjun:"镇军",
|
||||
rezhenjun_info:"准备阶段,你可以弃置一名手牌数多于体力值的角色的X张牌(X为其手牌数和体力值之差且至少为1),然后选择一项:1.你弃置X张牌;2.其摸X张牌。(X为其弃置的牌中非装备牌的数量)",
|
||||
xinzhenjun:'镇军',
|
||||
xinzhenjun_info:'出牌阶段开始时,你可以将一张牌交给一名其他角色,令其选择是否使用一张不为黑色的【杀】。若其选择是,则你于此【杀】结算完成后摸一张牌,且当此【杀】造成伤害时你摸X张牌(X为伤害点数)。若其选择否,则你对其或其攻击范围内的一名其他角色造成1点伤害。',
|
||||
xinzhenjun_info:'出牌阶段开始时,你可以将一张牌交给一名其他角色,令其选择是否使用一张不为黑色的【杀】。若其选择是,则你于此【杀】结算完成后摸1+X张牌(X为此【杀】造成的伤害总点数)。若其选择否,则你对其或其攻击范围内的一名其他角色造成1点伤害。',
|
||||
fenli:'奋励',
|
||||
fenli_info:'若你的手牌数为全场最多,你可以跳过摸牌阶段;若你的体力值为全场最多,你可以跳过出牌阶段;若你的装备区里有牌且数量为全场最多,你可以跳过弃牌阶段。',
|
||||
pingkou:'平寇',
|
||||
|
|
|
@ -466,10 +466,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
zbudao:{
|
||||
trigger:{player:'phaseDrawBegin'},
|
||||
check:function(event,player){
|
||||
if(player.hasFriend()) return true;
|
||||
return false;
|
||||
},
|
||||
//check:function(event,player){
|
||||
// if(player.hasFriend()) return true;
|
||||
// return false;
|
||||
//},
|
||||
content:function(){
|
||||
trigger.num++;
|
||||
player.addTempSkill('zbudao2','phaseDrawAfter');
|
||||
|
@ -508,8 +508,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return att-4;
|
||||
},
|
||||
forced:true,
|
||||
prompt:'请选择要送人的卡牌'
|
||||
//forced:true,
|
||||
prompt:'将获得的一张牌交给一名其他角色,或点取消'
|
||||
});
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
|
@ -1951,17 +1951,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
fengyan:{
|
||||
trigger:{global:'judgeAfter'},
|
||||
trigger:{global:'cardsDiscardAfter'},
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
if(event.player==player) return false;
|
||||
if(event.player.sex!='male') return false;
|
||||
if(get.position(event.result.card)!='o') return false;
|
||||
return (get.color(event.result.card)=='red');
|
||||
var evt=event.getParent().relatedEvent;
|
||||
if(!evt||evt.name!='judge') return;
|
||||
if(evt.player.sex!='male') return false;
|
||||
if(get.position(event.cards[0],true)!='d') return false;
|
||||
return (get.color(event.cards[0])=='red');
|
||||
},
|
||||
content:function(){
|
||||
player.gain(trigger.result.card);
|
||||
player.$gain2(trigger.result.card);
|
||||
player.gain(trigger.cards,'gain2');
|
||||
}
|
||||
},
|
||||
fengyi:{
|
||||
|
@ -3106,7 +3106,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
nichang2:'霓裳',
|
||||
nichang_info:'摸牌时,你可以选择不摸牌,并在结束阶段展示手牌,每少一种花色摸一张牌',
|
||||
fengyan:'丰艳',
|
||||
fengyan_info:'你可以获得其他男性角色的红色判定牌',
|
||||
fengyan_info:'你可以获得其他男性角色的红色判定牌。',
|
||||
zhulu:'逐鹿',
|
||||
zhulu_info:'回合外,当有普通锦囊牌结算完毕后,你可以立即弃掉一张相同花色手牌或装备区的牌,获得这张锦囊牌。',
|
||||
jieyong:'节用',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
window.noname_asset_list=[
|
||||
'1.9.97.7.1',
|
||||
'1.9.97.8',
|
||||
'audio/background/aozhan_chaoming.mp3',
|
||||
'audio/background/aozhan_online.mp3',
|
||||
'audio/background/aozhan_rewrite.mp3',
|
||||
|
@ -2258,6 +2258,8 @@ window.noname_asset_list=[
|
|||
'audio/skill/zhangwu2.mp3',
|
||||
'audio/skill/zhiheng_gz_jun_sunquan1.mp3',
|
||||
'audio/skill/zhiheng_gz_jun_sunquan2.mp3',
|
||||
'audio/skill/reluanji1.mp3',
|
||||
'audio/skill/reluanji2.mp3',
|
||||
|
||||
'font/huangcao.ttf',
|
||||
'font/shousha.ttf',
|
||||
|
@ -2712,6 +2714,7 @@ window.noname_asset_list=[
|
|||
'image/character/re_xugong.jpg',
|
||||
'image/character/yuantanyuanshang.jpg',
|
||||
'image/character/old_majun.jpg',
|
||||
'image/character/key_yukine.jpg',
|
||||
|
||||
'image/character/baiwuchang.jpg',
|
||||
'image/character/baosanniang.jpg',
|
||||
|
|
372
game/game.js
372
game/game.js
|
@ -17,13 +17,20 @@
|
|||
skillaudio:[],
|
||||
dieClose:[],
|
||||
dragline:[],
|
||||
dying:[]
|
||||
dying:[],
|
||||
globalHistory:[{
|
||||
cardMove:[],
|
||||
}],
|
||||
};
|
||||
var lib={
|
||||
configprefix:'noname_0.9_',
|
||||
versionOL:27,
|
||||
updateURLS:{
|
||||
coding:'https://nakamurayuri.coding.net/p/noname/d/noname/git/raw',
|
||||
github:'https://raw.githubusercontent.com/libccy/noname',
|
||||
},
|
||||
updateURL:'https://raw.githubusercontent.com/libccy/noname',
|
||||
mirrorURL:'https://gitlab.com/isgs/noname/raw',
|
||||
mirrorURL:'https://nakamurayuri.coding.net/p/noname/d/noname/git/raw',
|
||||
hallURL:'noname.pub',
|
||||
assetURL:'',
|
||||
changeLog:[],
|
||||
|
@ -501,6 +508,19 @@
|
|||
init:false,
|
||||
unfrequent:true
|
||||
},
|
||||
update_link:{
|
||||
name:'更新地址',
|
||||
init:'coding',
|
||||
unfrequent:true,
|
||||
item:{
|
||||
coding:'Coding',
|
||||
github:'GitHub',
|
||||
},
|
||||
onclick:function(item){
|
||||
game.saveConfig('update_link',item);
|
||||
lib.updateURL=lib.updateURLS[item]||lib.updateURLS.coding;
|
||||
},
|
||||
},
|
||||
update:function(config,map){
|
||||
if('ontouchstart' in document){
|
||||
map.touchscreen.show();
|
||||
|
@ -3418,6 +3438,10 @@
|
|||
name:'装备配音',
|
||||
init:false,
|
||||
},
|
||||
repeat_audio:{
|
||||
name:'播放重复语音',
|
||||
init:false,
|
||||
},
|
||||
volumn_audio:{
|
||||
name:'音效音量',
|
||||
init:8,
|
||||
|
@ -5813,6 +5837,11 @@
|
|||
brawl:{
|
||||
name:'乱斗',
|
||||
config:{
|
||||
huanhuazhizhan:{
|
||||
name:'幻化之战',
|
||||
init:true,
|
||||
frequent:true
|
||||
},
|
||||
duzhansanguo:{
|
||||
name:'毒战三国',
|
||||
init:true,
|
||||
|
@ -5843,6 +5872,11 @@
|
|||
init:true,
|
||||
frequent:true
|
||||
},
|
||||
baiyidujiang:{
|
||||
name:'白衣渡江',
|
||||
init:true,
|
||||
frequent:true
|
||||
},
|
||||
scene:{
|
||||
name:'创建场景',
|
||||
init:true,
|
||||
|
@ -5923,6 +5957,7 @@
|
|||
},
|
||||
onclick:function(num){
|
||||
game.saveConfig('battle_number',num,this._link.config.mode);
|
||||
if(_status.connectMode) return;
|
||||
if(!_status.event.getParent().showConfig&&!_status.event.showConfig) return;
|
||||
if(_status.event.getParent().changeDialog){
|
||||
_status.event.getParent().changeDialog();
|
||||
|
@ -5957,6 +5992,7 @@
|
|||
init:true,
|
||||
onclick:function(bool){
|
||||
game.saveConfig('free_choose',bool,this._link.config.mode);
|
||||
if(_status.connectMode) return;
|
||||
if(!_status.event.getParent().showConfig&&!_status.event.showConfig) return;
|
||||
if(!ui.cheat2&&get.config('free_choose')) ui.create.cheat2();
|
||||
else if(ui.cheat2&&!get.config('free_choose')){
|
||||
|
@ -5970,6 +6006,7 @@
|
|||
init:true,
|
||||
onclick:function(bool){
|
||||
game.saveConfig('change_choice',bool,this._link.config.mode);
|
||||
if(_status.connectMode) return;
|
||||
if(!_status.event.getParent().showConfig&&!_status.event.showConfig) return;
|
||||
if(!ui.cheat&&get.config('change_choice')) ui.create.cheat();
|
||||
else if(ui.cheat&&!get.config('change_choice')){
|
||||
|
@ -6491,10 +6528,11 @@
|
|||
return this.childNodes[row].childNodes[col];
|
||||
}
|
||||
};
|
||||
Array.prototype.filterInD=function(){
|
||||
Array.prototype.filterInD=function(pos){
|
||||
if(!pos) pos='o';
|
||||
var list=[];
|
||||
for(var i=0;i<this.length;i++){
|
||||
if(get.position(this[i],true)=='o') list.push(this[i]);
|
||||
if(get.position(this[i],true)==pos) list.push(this[i]);
|
||||
}
|
||||
return list;
|
||||
};
|
||||
|
@ -9869,6 +9907,7 @@
|
|||
}
|
||||
},
|
||||
cardsDiscard:function(){
|
||||
game.getGlobalHistory().cardMove.push(event);
|
||||
for(var i=0;i<cards.length;i++){
|
||||
cards[i].discard();
|
||||
}
|
||||
|
@ -9881,6 +9920,7 @@
|
|||
if(cards.length) game.cardsDiscard(cards);
|
||||
},
|
||||
cardsGotoOrdering:function(){
|
||||
game.getGlobalHistory().cardMove.push(event);
|
||||
for(var i=0;i<cards.length;i++){
|
||||
cards[i].goto(ui.ordering);
|
||||
}
|
||||
|
@ -9888,13 +9928,16 @@
|
|||
if(!evt.orderingCards) evt.orderingCards=[];
|
||||
if(!event.noOrdering&&!event.cardsOrdered){
|
||||
event.cardsOrdered=true;
|
||||
var next=game.createEvent('orderingDiscard',false,evt.getParent());
|
||||
var next=game.createEvent('orderingDiscard',false);
|
||||
event.next.remove(next)
|
||||
evt.after.push(next)
|
||||
next.relatedEvent=evt;
|
||||
next.setContent('orderingDiscard');
|
||||
}
|
||||
if(!event.noOrdering) evt.orderingCards.addArray(cards);
|
||||
},
|
||||
cardsGotoSpecial:function(){
|
||||
game.getGlobalHistory().cardMove.push(event);
|
||||
for(var i=0;i<cards.length;i++){
|
||||
cards[i].goto(ui.special);
|
||||
}
|
||||
|
@ -10084,6 +10127,9 @@
|
|||
}
|
||||
}
|
||||
player.ai.tempIgnore=[];
|
||||
_status.globalHistory.push({
|
||||
cardMove:[],
|
||||
});
|
||||
game.countPlayer2(function(current){
|
||||
current.actionHistory.push({useCard:[],respond:[],skipped:[],lose:[],gain:[],sourceDamage:[],damage:[]});
|
||||
current.stat.push({card:{},skill:{}});
|
||||
|
@ -13020,9 +13066,13 @@
|
|||
player.line(target,'green');
|
||||
}
|
||||
if(!event.chooseonly){
|
||||
if(event.delay!==false){
|
||||
var next=player.gain(event.cards,target,event.visibleMove?'give':'giveAuto','bySelf');
|
||||
if(event.delay===false){
|
||||
next.set('delay',false);
|
||||
}
|
||||
else{
|
||||
var next=player.gain(event.cards,target,'bySelf');
|
||||
target[event.visibleMove?'$give':'$giveAuto'](cards,player);
|
||||
if(event.visibleMove) next.visible=true;
|
||||
}
|
||||
}
|
||||
else target[event.visibleMove?'$give':'$giveAuto'](cards,player);
|
||||
|
@ -13963,55 +14013,9 @@
|
|||
discard:function(){
|
||||
"step 0"
|
||||
game.log(player,'弃置了',cards);
|
||||
player.lose(cards,event.position,'visible');
|
||||
if(event.animate!=false){
|
||||
event.discardid=lib.status.videoId++;
|
||||
game.broadcastAll(function(player,cards,id){
|
||||
player.$throw(cards,null,'nobroadcast');
|
||||
var cardnodes=[];
|
||||
cardnodes._discardtime=get.time();
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(cards[i].clone){
|
||||
cardnodes.push(cards[i].clone);
|
||||
}
|
||||
}
|
||||
ui.todiscard[id]=cardnodes;
|
||||
},player,cards,event.discardid);
|
||||
if(lib.config.sync_speed&&cards[0]&&cards[0].clone){
|
||||
if(event.delay!=false){
|
||||
var waitingForTransition=get.time();
|
||||
event.waitingForTransition=waitingForTransition;
|
||||
cards[0].clone.listenTransition(function(){
|
||||
if(_status.waitingForTransition==waitingForTransition&&_status.paused){
|
||||
game.resume();
|
||||
}
|
||||
delete event.waitingForTransition;
|
||||
});
|
||||
}
|
||||
else if(event.getParent().discardTransition){
|
||||
delete event.getParent().discardTransition;
|
||||
var waitingForTransition=get.time();
|
||||
event.getParent().waitingForTransition=waitingForTransition;
|
||||
cards[0].clone.listenTransition(function(){
|
||||
if(_status.waitingForTransition==waitingForTransition&&_status.paused){
|
||||
game.resume();
|
||||
}
|
||||
delete event.getParent().waitingForTransition;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
event.trigger('discard');
|
||||
player.lose(cards,event.position,'visible').type='discard';
|
||||
"step 1"
|
||||
if(event.delay!=false){
|
||||
if(event.waitingForTransition){
|
||||
_status.waitingForTransition=event.waitingForTransition;
|
||||
game.pause();
|
||||
}
|
||||
else{
|
||||
game.delayx();
|
||||
}
|
||||
}
|
||||
event.trigger('discard');
|
||||
},
|
||||
respond:function(){
|
||||
'step 0'
|
||||
|
@ -14122,45 +14126,19 @@
|
|||
'step 0'
|
||||
event.delayed=false;
|
||||
event.num=0;
|
||||
event.cardlist=[];
|
||||
event.cards=[];
|
||||
'step 1'
|
||||
player.gainPlayerCard(targets[num],event.position,true).set('boolline',false).set('chooseonly',true);
|
||||
player.gainPlayerCard(targets[num],event.position,true).set('boolline',false).set('delay',num==targets.length-1);
|
||||
'step 2'
|
||||
var current=targets[num];
|
||||
var card=null;
|
||||
if(result.bool){
|
||||
card=result.cards[0];
|
||||
event.cards.addArray(result.cards);
|
||||
if(num==targets.length-1) event.delayed=true;
|
||||
}
|
||||
if(card){
|
||||
event.cards.add(card);
|
||||
current.lose(card,ui.special).set('type','gain');
|
||||
}
|
||||
event.cardlist[num]=card||null;
|
||||
event.num++;
|
||||
if(event.num<targets.length){
|
||||
event.goto(1);
|
||||
}
|
||||
else{
|
||||
event.num=0;
|
||||
}
|
||||
'step 3'
|
||||
var current=targets[num];
|
||||
var card=event.cardlist[num];
|
||||
if(card&&event.cards.contains(card)){
|
||||
if(current==game.me||current.isOnline()||(player==game.me&&!event.delayed)){
|
||||
player.gain(card,current,'bySelf');
|
||||
event.delayed=true;
|
||||
}
|
||||
else{
|
||||
player.gain(card,current,'bySelf').set('delay',false);
|
||||
}
|
||||
}
|
||||
event.num++;
|
||||
if(event.num<targets.length){
|
||||
event.redo();
|
||||
}
|
||||
'step 4'
|
||||
if(!event.delayed) game.delay();
|
||||
},
|
||||
gain:function(){
|
||||
|
@ -14169,7 +14147,8 @@
|
|||
var owner=event.source||get.owner(cards[0]);
|
||||
if(owner){
|
||||
var next=owner.lose(cards,ui.special).set('type','gain').set('forceDie',true);
|
||||
if(event.animate=='give') next.visible=true;
|
||||
if(event.animate=='give'||event.visible==true) next.visible=true;
|
||||
event.relatedLose=next;
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -14320,6 +14299,46 @@
|
|||
},
|
||||
lose:function(){
|
||||
"step 0"
|
||||
var evt=event.getParent();
|
||||
if(evt.name!='discard'&&event.type!='discard') return;
|
||||
if(evt.animate!=false){
|
||||
evt.discardid=lib.status.videoId++;
|
||||
game.broadcastAll(function(player,cards,id){
|
||||
player.$throw(cards,null,'nobroadcast');
|
||||
var cardnodes=[];
|
||||
cardnodes._discardtime=get.time();
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(cards[i].clone){
|
||||
cardnodes.push(cards[i].clone);
|
||||
}
|
||||
}
|
||||
ui.todiscard[id]=cardnodes;
|
||||
},player,cards,evt.discardid);
|
||||
if(lib.config.sync_speed&&cards[0]&&cards[0].clone){
|
||||
if(evt.delay!=false){
|
||||
var waitingForTransition=get.time();
|
||||
evt.waitingForTransition=waitingForTransition;
|
||||
cards[0].clone.listenTransition(function(){
|
||||
if(_status.waitingForTransition==waitingForTransition&&_status.paused){
|
||||
game.resume();
|
||||
}
|
||||
delete evt.waitingForTransition;
|
||||
});
|
||||
}
|
||||
else if(evt.getParent().discardTransition){
|
||||
delete evt.getParent().discardTransition;
|
||||
var waitingForTransition=get.time();
|
||||
evt.getParent().waitingForTransition=waitingForTransition;
|
||||
cards[0].clone.listenTransition(function(){
|
||||
if(_status.waitingForTransition==waitingForTransition&&_status.paused){
|
||||
game.resume();
|
||||
}
|
||||
delete evt.getParent().waitingForTransition;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
"step 1"
|
||||
var hs=[],es=[],js=[];
|
||||
var hej=player.getCards('hej');
|
||||
event.stockcards=cards.slice(0);
|
||||
|
@ -14397,14 +14416,17 @@
|
|||
}
|
||||
if(!event.noOrdering) evt.orderingCards.addArray(cards);
|
||||
}
|
||||
"step 1"
|
||||
event.hs=hs;
|
||||
event.es=es;
|
||||
event.js=js;
|
||||
"step 2"
|
||||
if(num<cards.length){
|
||||
if(cards[num].original=='e'){
|
||||
event.loseEquip=true;
|
||||
player.removeEquipTrigger(cards[num]);
|
||||
var info=get.info(cards[num]);
|
||||
if(info.onLose&&(!info.filterLose||info.filterLose(cards[num],player))){
|
||||
event.goto(2);
|
||||
event.goto(3);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -14415,9 +14437,9 @@
|
|||
if(event.loseEquip){
|
||||
player.addEquipTrigger();
|
||||
}
|
||||
event.finish();
|
||||
event.goto(4);
|
||||
}
|
||||
"step 2"
|
||||
"step 3"
|
||||
var info=get.info(cards[num]);
|
||||
if(info.loseDelay!=false&&(player.isAlive()||info.forceDie)){
|
||||
player.popup(cards[num].name);
|
||||
|
@ -14440,7 +14462,19 @@
|
|||
next.card=cards[num];
|
||||
}
|
||||
event.num++;
|
||||
event.goto(1);
|
||||
event.goto(2);
|
||||
"step 4"
|
||||
var evt=event.getParent();
|
||||
if(evt.name!='discard'&&event.type!='discard') return;
|
||||
if(evt.delay!=false){
|
||||
if(evt.waitingForTransition){
|
||||
_status.waitingForTransition=evt.waitingForTransition;
|
||||
game.pause();
|
||||
}
|
||||
else{
|
||||
game.delayx();
|
||||
}
|
||||
}
|
||||
},
|
||||
damage:function(){
|
||||
"step 0"
|
||||
|
@ -19077,6 +19111,8 @@
|
|||
if(get.itemtype(this.storage[name])=='cards'){
|
||||
this.$throw(this.storage[name]);
|
||||
game.cardsDiscard(this.storage[name]);
|
||||
game.log(this.storage[name],'进入了弃牌堆');
|
||||
this.storage[name].length=0;
|
||||
}
|
||||
}
|
||||
else if(typeof info.intro.onunmark=='function'){
|
||||
|
@ -19274,20 +19310,43 @@
|
|||
return player.canUse(card,current,distance,includecard);
|
||||
});
|
||||
},
|
||||
hasValueTarget:function(){
|
||||
return this.getUseValue.apply(this,arguments)>0;
|
||||
},
|
||||
getUseValue:function(card,distance,includecard){
|
||||
if(typeof(card)=='string'){
|
||||
card={name:card};
|
||||
}
|
||||
var player=this;
|
||||
var targets=game.filterPlayer();
|
||||
var value=[];
|
||||
var min=0;
|
||||
var info=get.info(card);
|
||||
if(!info||info.notarget) return 0;
|
||||
var range;
|
||||
var select=get.copy(info.selectTarget);
|
||||
if(select==undefined){
|
||||
if(info.filterTarget==undefined) return true;
|
||||
range=[1,1];
|
||||
}
|
||||
else if(typeof select=='number') range=[select,select];
|
||||
else if(get.itemtype(select)=='select') range=select;
|
||||
else if(typeof select=='function') range=select(card,player);
|
||||
game.checkMod(card,player,range,'selectTarget',player);
|
||||
if(!range) return 0;
|
||||
|
||||
for(var i=0;i<targets.length;i++){
|
||||
if(player.canUse(card,targets[i],distance,includecard)){
|
||||
var eff=get.effect(targets[i],card,player,player);
|
||||
if(eff>min){
|
||||
min=eff;
|
||||
value.push(eff);
|
||||
}
|
||||
}
|
||||
value.sort(function(a,b){
|
||||
return b-a;
|
||||
});
|
||||
for(var i=0;i<value.length;i++){
|
||||
if(i==range[1]||range[1]!=-1&&value[i]<=0) break;
|
||||
min+=value[i];
|
||||
}
|
||||
return min;
|
||||
},
|
||||
|
@ -19794,8 +19853,9 @@
|
|||
},
|
||||
addTempSkill:function(skill,expire,checkConflict){
|
||||
if(this.hasSkill(skill)&&this.tempSkills[skill]==undefined) return;
|
||||
var noremove=this.skills.contains(skill);
|
||||
this.addSkill(skill,checkConflict,true);
|
||||
this.skills.remove(skill);
|
||||
if(!noremove) this.skills.remove(skill);
|
||||
|
||||
if(!expire){
|
||||
expire='phaseAfter';
|
||||
|
@ -22983,7 +23043,12 @@
|
|||
list2:[],
|
||||
};
|
||||
listAdded={};
|
||||
var notemp=player.skills.slice(0);
|
||||
for(var j in player.additionalSkills){
|
||||
if(j.indexOf('hidden:')!=0) notemp.addArray(player.additionalSkills[j]);
|
||||
}
|
||||
for(var j in player.tempSkills){
|
||||
if(notemp.contains(j)) return;
|
||||
var expire=player.tempSkills[j];
|
||||
if(expire===name||
|
||||
(Array.isArray(expire)&&expire.contains(name))||
|
||||
|
@ -23006,8 +23071,9 @@
|
|||
var skills=player.getSkills(true).concat(lib.skill.global);
|
||||
game.expandSkills(skills);
|
||||
for(var i=0;i<skills.length;i++){
|
||||
var trigger=get.info(skills[i]).trigger;
|
||||
if(trigger){
|
||||
var info=get.info(skills[i]);
|
||||
if(info&&info.trigger){
|
||||
var trigger=info.trigger;
|
||||
var add=false;
|
||||
if(player===event.player&&trigger.player){
|
||||
if(typeof trigger.player==='string'){
|
||||
|
@ -23570,6 +23636,7 @@
|
|||
cardEnabled:function(card,player,event){
|
||||
card=get.autoViewAs(card,null,player);
|
||||
if(player==undefined) player=_status.event.player;
|
||||
if(!player) return false;
|
||||
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
|
||||
if(mod2!='unchanged') return mod2;
|
||||
if(event==='forceEnable'){
|
||||
|
@ -25586,6 +25653,17 @@
|
|||
phaseName:['phaseZhunbei','phaseJudge','phaseDraw','phaseUse','phaseDiscard','phaseJieshu'],
|
||||
};
|
||||
var game={
|
||||
getGlobalHistory:function(key,filter){
|
||||
if(!key) return _status.globalHistory[_status.globalHistory.length-1];
|
||||
if(!filter) return _status.globalHistory[_status.globalHistory.length-1][key];
|
||||
else{
|
||||
var history=game.getGlobalHistory(key).slice(0);
|
||||
for(var i=0;i<history.length;i++){
|
||||
if(!filter(history[i])) history.splice(i--,1);
|
||||
}
|
||||
return history;
|
||||
}
|
||||
},
|
||||
cardsDiscard:function(cards){
|
||||
var type=get.itemtype(cards);
|
||||
if(type!='cards'&&type!='card') return;
|
||||
|
@ -26149,7 +26227,7 @@
|
|||
}
|
||||
if(_status.video) break;
|
||||
}
|
||||
if(_status.skillaudio.contains(str)) return;
|
||||
if(!lib.config.repeat_audio&&_status.skillaudio.contains(str)) return;
|
||||
_status.skillaudio.add(str);
|
||||
game.addVideo('playAudio',null,str);
|
||||
setTimeout(function(){
|
||||
|
@ -26239,7 +26317,7 @@
|
|||
},
|
||||
playSkillAudio:function(name,index){
|
||||
if(_status.video&&arguments[1]!='video') return;
|
||||
if(_status.skillaudio.contains(name)) return;
|
||||
if(!lib.config.repeat_audio&&_status.skillaudio.contains(name)) return;
|
||||
game.addVideo('playSkillAudio',null,name);
|
||||
if(name.indexOf('|')<name.lastIndexOf('|')){
|
||||
name=name.slice(name.lastIndexOf('|')+1);
|
||||
|
@ -29950,6 +30028,8 @@
|
|||
var ok=true,auto=true;
|
||||
var player=event.player;
|
||||
var auto_confirm=lib.config.auto_confirm;
|
||||
var players=game.players.slice(0);
|
||||
if(event.deadTarget) players.addArray(game.dead);
|
||||
if(!event.filterButton&&!event.filterCard&&!event.filterTarget&&(!event.skill||!event._backup)){
|
||||
if(event.choosing){
|
||||
_status.imchoosing=true;
|
||||
|
@ -30022,9 +30102,9 @@
|
|||
for(var i=0;i<event._cardChoice.length;i++){
|
||||
if(!lib.card[event._cardChoice[i].name].complexTarget){
|
||||
var targets=[];
|
||||
for(var j=0;j<game.players.length;j++){
|
||||
if(event.filterTarget(event._cardChoice[i],player,game.players[j])){
|
||||
targets.push(game.players[j]);
|
||||
for(var j=0;j<players.length;j++){
|
||||
if(event.filterTarget(event._cardChoice[i],player,players[j])){
|
||||
targets.push(players[j]);
|
||||
}
|
||||
}
|
||||
event._targetChoice.set(event._cardChoice[i],targets);
|
||||
|
@ -30108,63 +30188,63 @@
|
|||
range=get.select(event.selectTarget);
|
||||
var selectableTargets=false;
|
||||
if(range[0]!=range[1]||range[0]>1) auto=false;
|
||||
for(i=0;i<game.players.length;i++){
|
||||
for(i=0;i<players.length;i++){
|
||||
var nochess=true;
|
||||
if(game.chess&&!event.chessForceAll&&player&&get.distance(player,game.players[i],'pure')>7){
|
||||
if(game.chess&&!event.chessForceAll&&player&&get.distance(player,players[i],'pure')>7){
|
||||
nochess=false;
|
||||
}
|
||||
else if(game.players[i].isOut()){
|
||||
else if(players[i].isOut()){
|
||||
nochess=false;
|
||||
}
|
||||
else if(event._targetChoice&&event._targetChoice.has(card)){
|
||||
var targetChoice=event._targetChoice.get(card);
|
||||
if(!Array.isArray(targetChoice)||!targetChoice.contains(game.players[i])){
|
||||
if(!Array.isArray(targetChoice)||!targetChoice.contains(players[i])){
|
||||
nochess=false;
|
||||
}
|
||||
}
|
||||
else if(!event.filterTarget(card,player,game.players[i])){
|
||||
else if(!event.filterTarget(card,player,players[i])){
|
||||
nochess=false;
|
||||
}
|
||||
if(nochess){
|
||||
if(ui.selected.targets.length<range[1]){
|
||||
game.players[i].classList.add('selectable');
|
||||
players[i].classList.add('selectable');
|
||||
if(Array.isArray(event._targetChoice)){
|
||||
event._targetChoice.push(game.players[i]);
|
||||
event._targetChoice.push(players[i]);
|
||||
}
|
||||
}
|
||||
else if(range[1]==-1){
|
||||
game.players[i].classList.add('selected');
|
||||
ui.selected.targets.add(game.players[i]);
|
||||
players[i].classList.add('selected');
|
||||
ui.selected.targets.add(players[i]);
|
||||
}
|
||||
else{
|
||||
game.players[i].classList.remove('selectable');
|
||||
players[i].classList.remove('selectable');
|
||||
}
|
||||
}
|
||||
else{
|
||||
game.players[i].classList.remove('selectable');
|
||||
players[i].classList.remove('selectable');
|
||||
if(range[1]==-1){
|
||||
game.players[i].classList.remove('selected');
|
||||
ui.selected.targets.remove(game.players[i]);
|
||||
players[i].classList.remove('selected');
|
||||
ui.selected.targets.remove(players[i]);
|
||||
}
|
||||
}
|
||||
if(game.players[i].classList.contains('selected')){
|
||||
game.players[i].classList.add('selectable');
|
||||
if(players[i].classList.contains('selected')){
|
||||
players[i].classList.add('selectable');
|
||||
}
|
||||
else if(!selectableTargets&&game.players[i].classList.contains('selectable')){
|
||||
else if(!selectableTargets&&players[i].classList.contains('selectable')){
|
||||
selectableTargets=true;
|
||||
}
|
||||
if(game.players[i].instance){
|
||||
if(game.players[i].classList.contains('selected')){
|
||||
game.players[i].instance.classList.add('selected');
|
||||
if(players[i].instance){
|
||||
if(players[i].classList.contains('selected')){
|
||||
players[i].instance.classList.add('selected');
|
||||
}
|
||||
else{
|
||||
game.players[i].instance.classList.remove('selected');
|
||||
players[i].instance.classList.remove('selected');
|
||||
}
|
||||
if(game.players[i].classList.contains('selectable')){
|
||||
game.players[i].instance.classList.add('selectable');
|
||||
if(players[i].classList.contains('selectable')){
|
||||
players[i].instance.classList.add('selectable');
|
||||
}
|
||||
else{
|
||||
game.players[i].instance.classList.remove('selectable');
|
||||
players[i].instance.classList.remove('selectable');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30291,20 +30371,20 @@
|
|||
}
|
||||
if(event.isMine()){
|
||||
if(game.chess&&game.me&&get.config('show_distance')){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i]==game.me){
|
||||
game.players[i].node.action.hide();
|
||||
for(var i=0;i<players.length;i++){
|
||||
if(players[i]==game.me){
|
||||
players[i].node.action.hide();
|
||||
}
|
||||
else{
|
||||
game.players[i].node.action.show();
|
||||
var dist=get.distance(game.me,game.players[i],'pure');
|
||||
var dist2=get.distance(game.me,game.players[i]);
|
||||
game.players[i].node.action.innerHTML='距离:'+dist2+'/'+dist;
|
||||
players[i].node.action.show();
|
||||
var dist=get.distance(game.me,players[i],'pure');
|
||||
var dist2=get.distance(game.me,players[i]);
|
||||
players[i].node.action.innerHTML='距离:'+dist2+'/'+dist;
|
||||
if(dist>7){
|
||||
game.players[i].node.action.classList.add('thunder');
|
||||
players[i].node.action.classList.add('thunder');
|
||||
}
|
||||
else{
|
||||
game.players[i].node.action.classList.remove('thunder');
|
||||
players[i].node.action.classList.remove('thunder');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30372,13 +30452,15 @@
|
|||
ui.selected.cards.length=0;
|
||||
_status.event.player.node.equips.classList.remove('popequip');
|
||||
}
|
||||
var players=game.players.slice(0);
|
||||
if(_status.event.deadTarget) players.addArray(game.dead);
|
||||
if((args.length==0||args.contains('target'))){
|
||||
for(j=0;j<game.players.length;j++){
|
||||
game.players[j].classList.remove('selected');
|
||||
game.players[j].classList.remove('selectable');
|
||||
if(game.players[j].instance){
|
||||
game.players[j].instance.classList.remove('selected');
|
||||
game.players[j].instance.classList.remove('selectable');
|
||||
for(j=0;j<players.length;j++){
|
||||
players[j].classList.remove('selected');
|
||||
players[j].classList.remove('selectable');
|
||||
if(players[j].instance){
|
||||
players[j].instance.classList.remove('selected');
|
||||
players[j].instance.classList.remove('selectable');
|
||||
}
|
||||
}
|
||||
ui.selected.targets.length=0;
|
||||
|
@ -30404,8 +30486,8 @@
|
|||
}
|
||||
ui.canvas.width=ui.arena.offsetWidth;
|
||||
ui.canvas.height=ui.arena.offsetHeight;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].unprompt();
|
||||
for(var i=0;i<players.length;i++){
|
||||
players[i].unprompt();
|
||||
}
|
||||
for(var i=0;i<_status.dragline.length;i++){
|
||||
if(_status.dragline[i]) _status.dragline[i].remove();
|
||||
|
@ -38467,11 +38549,11 @@
|
|||
var li2=document.createElement('li');
|
||||
var li3=document.createElement('li');
|
||||
var trimurl=function(str){
|
||||
if(str==lib.updateURL){
|
||||
if(str==lib.updateURLS.github){
|
||||
return 'GitHub';
|
||||
}
|
||||
if(str==lib.mirrorURL){
|
||||
return 'GitLab';
|
||||
if(str==lib.updateURLS.coding){
|
||||
return 'Coding';
|
||||
}
|
||||
var index;
|
||||
index=str.indexOf('://');
|
||||
|
@ -39295,7 +39377,7 @@
|
|||
var nodeturnover=ui.create.div('.menubutton','翻面',row1,clickrow1);
|
||||
var noderevive=ui.create.div('.menubutton','复活',row1,clickrow1);
|
||||
var nodereplace=ui.create.div('.menubutton','换人',row1,clickrow1);
|
||||
if(lib.config.mode!='identity'&&lib.config.mode!='guozhan'){
|
||||
if(lib.config.mode!='identity'&&lib.config.mode!='guozhan'&&lib.config.mode!='doudizhu'){
|
||||
nodereplace.classList.add('unselectable');
|
||||
}
|
||||
|
||||
|
@ -41159,6 +41241,7 @@
|
|||
});
|
||||
}
|
||||
}
|
||||
lib.updateURL=lib.updateURLS[lib.config.update_link]||lib.updateURLS.coding;
|
||||
|
||||
lib.init.cssstyles();
|
||||
|
||||
|
@ -46989,6 +47072,7 @@
|
|||
},
|
||||
modetrans:function(config,server){
|
||||
if(config.mode=='doudizhu') return '欢乐斗地主';
|
||||
if(config.mode=='stone') return '炉石传说';
|
||||
if(config.mode=='versus'){
|
||||
switch(config.versus_mode){
|
||||
case '1v1':return '单人对决';
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
window.noname_update={
|
||||
version:'1.9.97.7.1',
|
||||
update:'1.9.97.7',
|
||||
version:'1.9.97.8.1',
|
||||
update:'1.9.97.7.1',
|
||||
changeLog:[
|
||||
'新的Coding镜像下载点',
|
||||
'BUG修复',
|
||||
],
|
||||
files:[
|
||||
'card/extra.js',
|
||||
//'card/huanlekapai.js',
|
||||
//'card/sp.js',
|
||||
//'card/standard.js',
|
||||
'card/standard.js',
|
||||
//'card/swd.js',
|
||||
'card/guozhan.js',
|
||||
//'card/gwent.js',
|
||||
//'character/diy.js',
|
||||
'character/diy.js',
|
||||
'character/extra.js',
|
||||
//'character/hearth.js',
|
||||
//'character/gujian.js',
|
||||
//'character/gwent.js',
|
||||
'character/mobile.js',
|
||||
//'character/mobile.js',
|
||||
//'character/mtg.js',
|
||||
//'character/old.js',
|
||||
'character/refresh.js',
|
||||
|
@ -29,7 +30,7 @@ window.noname_update={
|
|||
//'character/xianjian.js',
|
||||
'character/xinghuoliaoyuan.js',
|
||||
'character/yijiang.js',
|
||||
//'character/yxs.js',
|
||||
'character/yxs.js',
|
||||
//'extension/boss/extension.js',
|
||||
//'layout/default/layout.css',
|
||||
//'mode/identity.js',
|
||||
|
@ -37,8 +38,8 @@ window.noname_update={
|
|||
'mode/guozhan.js',
|
||||
//'mode/single.js',
|
||||
//'mode/stone.js',
|
||||
//'mode/brawl.js',
|
||||
//'mode/versus.js',
|
||||
'mode/brawl.js',
|
||||
'mode/versus.js',
|
||||
//'mode/boss.js',
|
||||
'game/game.js',
|
||||
//'game/NoSleep.js',
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 173 KiB |
212
mode/brawl.js
212
mode/brawl.js
|
@ -1110,6 +1110,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:{
|
||||
cardPile:function(list){
|
||||
lib.config.bannedcards.remove('du');
|
||||
if(game.bannedcards) game.bannedcards.remove('du');
|
||||
var num=Math.ceil(list.length/10);
|
||||
while(num--){
|
||||
list.push([['heart','diamond','club','spade'].randomGet(),Math.ceil(Math.random()*13),'du']);
|
||||
|
@ -1777,23 +1779,199 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
},
|
||||
// baiyudujiang:{
|
||||
// name:'白衣渡江',
|
||||
// mode:'versus',
|
||||
// submode:'2v2',
|
||||
// intro:[
|
||||
// '玩家在选将时可从6-8张的武将牌里选择两张武将牌,一张面向大家可见(加入游戏),另一张是隐藏面孔(暗置)',
|
||||
// '选择的两张武将牌需满足以下至少两个条件:1.性别相同;2.体力上限相同;3.技能数量相同',
|
||||
// '每名玩家在其回合开始或回合结束时,可以选择将自己的武将牌弃置,然后使用暗置的武将牌进行剩余的游戏'
|
||||
// ],
|
||||
// content:{
|
||||
// submode:'two',
|
||||
// chooseCharacterNum:2,
|
||||
// chooseCharacterAfter:function(){
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
baiyidujiang:{
|
||||
name:'白衣渡江',
|
||||
mode:'versus',
|
||||
submode:'2v2',
|
||||
showcase:function(init){
|
||||
var node=this;
|
||||
var player1,player2;
|
||||
if(init){
|
||||
player1=ui.create.player(null,true).init('lvmeng');
|
||||
player2=ui.create.player(null,true).init('guanyu');
|
||||
player1.node.marks.remove();
|
||||
player1.node.hp.remove();
|
||||
player2.node.marks.remove();
|
||||
player2.node.hp.remove();
|
||||
player1.style.left='20px';
|
||||
player1.style.top='20px';
|
||||
player1.style.transform='scale(0.9)';
|
||||
player1.node.count.innerHTML='2';
|
||||
player1.node.count.dataset.condition='mid';
|
||||
player2.style.left='auto';
|
||||
player2.style.right='20px';
|
||||
player2.style.top='20px';
|
||||
player2.style.transform='scale(0.9)';
|
||||
player2.node.count.innerHTML='2';
|
||||
player2.node.count.dataset.condition='mid';
|
||||
this.appendChild(player1);
|
||||
this.appendChild(player2);
|
||||
this.player1=player1;
|
||||
this.player2=player2;
|
||||
}
|
||||
else{
|
||||
player1=this.player1;
|
||||
player2=this.player2;
|
||||
}
|
||||
var rect1=player1.getBoundingClientRect();
|
||||
var rect2=player2.getBoundingClientRect();
|
||||
var left1=rect1.left+rect1.width/2-ui.arena.offsetLeft;
|
||||
var left2=rect2.left+rect2.width/2-ui.arena.offsetLeft;
|
||||
var top1=rect1.top+rect1.height/2-ui.arena.offsetTop;
|
||||
var top2=rect2.top+rect2.height/2-ui.arena.offsetTop;
|
||||
var func=function(){
|
||||
//game.linexy([left1,top1,left2,top2]);
|
||||
setTimeout(function(){
|
||||
player1.reinit(player1.name,'re_lvmeng');
|
||||
player2.reinit(player2.name,'re_guanyu');
|
||||
//game.linexy([left2,top2,left1,top1],'green');
|
||||
},1500);
|
||||
setTimeout(function(){
|
||||
player1.reinit(player1.name,'sp_lvmeng');
|
||||
player2.reinit(player2.name,'jsp_guanyu');
|
||||
//game.linexy([left1,top1,left2,top2],'thunder');
|
||||
},3000);
|
||||
setTimeout(function(){
|
||||
player1.reinit(player1.name,'shen_lvmeng');
|
||||
player2.reinit(player2.name,'shen_guanyu');
|
||||
//game.linexy([left2,top2,left1,top1],'fire');
|
||||
},4500);
|
||||
setTimeout(function(){
|
||||
player1.reinit(player1.name,'lvmeng');
|
||||
player2.reinit(player2.name,'guanyu');
|
||||
},6000);
|
||||
};
|
||||
node.showcaseinterval=setInterval(func,6000);
|
||||
func();
|
||||
},
|
||||
intro:[
|
||||
'玩家在选将时可从8张武将牌里选择两张武将牌,一张面向大家可见(加入游戏),另一张是隐藏面孔(暗置)',
|
||||
'选择的两张武将牌需满足以下至少两个条件:1.性别相同;2.体力上限相同;3.技能数量相同',
|
||||
'每名玩家在其回合开始或回合结束时,可以选择将自己的武将牌弃置,然后使用暗置的武将牌进行剩余的游戏'
|
||||
],
|
||||
content:{
|
||||
submode:'two',
|
||||
chooseCharacterBefore:function(){
|
||||
lib.skill._changeCharacter={
|
||||
trigger:{player:['phaseBefore','phaseAfter']},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return player._backupCharacter!=undefined;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
player.chooseControl('确定','取消').set('dialog',['是否替换自己的武将牌?',[[player._backupCharacter],'character']]).set('ai',function(){
|
||||
return Math.random()<0.15?'确定':'取消';
|
||||
});
|
||||
"step 1"
|
||||
if(result.control=='确定'){
|
||||
game.log(player,'将',player.name,'替换为了',player._backupCharacter);
|
||||
player.reinit(player.name,player._backupCharacter);
|
||||
player.changeGroup(lib.character[player._backupCharacter][1],false);
|
||||
delete player._backupCharacter;
|
||||
}
|
||||
},
|
||||
},
|
||||
game.addGlobalSkill('_changeCharacter');
|
||||
game.chooseCharacterTwo=function(){
|
||||
var next=game.createEvent('chooseCharacter',false);
|
||||
next.setContent(function(){
|
||||
'step 0'
|
||||
ui.arena.classList.add('choose-character');
|
||||
for(var i in lib.skill){
|
||||
if(lib.skill[i].changeSeat){
|
||||
lib.skill[i]={};
|
||||
if(lib.translate[i+'_info']){
|
||||
lib.translate[i+'_info']='此模式下不可用';
|
||||
}
|
||||
}
|
||||
}
|
||||
var bool=Math.random()<0.5;
|
||||
var bool2=Math.random()<0.5;
|
||||
var ref=game.players[0];
|
||||
|
||||
ref.side=bool;
|
||||
ref.next.side=bool2;
|
||||
ref.next.next.side=!bool;
|
||||
ref.previous.side=!bool2;
|
||||
|
||||
var firstChoose=game.players.randomGet();
|
||||
if(firstChoose.next.side==firstChoose.side){
|
||||
firstChoose=firstChoose.next;
|
||||
}
|
||||
_status.firstAct=firstChoose;
|
||||
for(var i=0;i<4;i++){
|
||||
firstChoose.node.name.innerHTML=get.verticalStr(get.cnNumber(i+1,true)+'号位');
|
||||
firstChoose=firstChoose.next;
|
||||
}
|
||||
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side==game.me.side){
|
||||
game.players[i].node.identity.firstChild.innerHTML='友';
|
||||
}
|
||||
else{
|
||||
game.players[i].node.identity.firstChild.innerHTML='敌';
|
||||
}
|
||||
game.players[i].node.identity.dataset.color=game.players[i].side+'zhu';
|
||||
}
|
||||
var list=[];
|
||||
for(i in lib.character){
|
||||
if(!lib.filter.characterDisabled(i)){
|
||||
list.push(i);
|
||||
}
|
||||
}
|
||||
var choose=[];
|
||||
_status.characterlist=list;
|
||||
event.filterChoice=function(name1,name2){
|
||||
var info1=lib.character[name1];
|
||||
var info2=lib.character[name2];
|
||||
if(!info1||!info2) return;
|
||||
return info1[0]==info2[0]||get.infoMaxHp(info1[2])==get.infoMaxHp(info2[2])||info1[3].length==info2[3].length;
|
||||
};
|
||||
var list2=list.randomGets(8);
|
||||
var next=game.me.chooseButton(2,true,['请选择您的武将牌',[list2,'character']]);
|
||||
next.set('onfree',true);
|
||||
next.set('filterButton',function(button){
|
||||
if(!ui.selected.buttons.length){
|
||||
for(var i=0;i<list2.length;i++){
|
||||
if(list2[i]!=button.link&&event.filterChoice(button.link,list2[i])) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return event.filterChoice(button.link,ui.selected.buttons[0].link)
|
||||
});
|
||||
'step 1'
|
||||
game.me.init(result.links[0]);
|
||||
game.me._backupCharacter=result.links[1];
|
||||
_status.characterlist.removeArray(result.links);
|
||||
var list=_status.characterlist;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i]!=game.me){
|
||||
list.randomSort();
|
||||
var bool=false;
|
||||
for(var k=0;k<list.length;k++){
|
||||
for(var j=i+1;j<list.length;j++){
|
||||
if(event.filterChoice(list[k],list[j])){
|
||||
bool=true;
|
||||
game.players[i].init(list[k]);
|
||||
game.players[i]._backupCharacter=list[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(bool) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
scene:{
|
||||
name:'创建场景',
|
||||
content:{
|
||||
|
|
|
@ -2141,7 +2141,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
player:"gainEnd",
|
||||
},
|
||||
filter:function (event,player){
|
||||
return event.source&&event.source!=player&&event.cards.length==player.countCards('h')&&player!=_status.currentPhase;
|
||||
return event.source&&event.source!=player&&!event.bySelf&&event.cards.length==player.countCards('h')&&player!=_status.currentPhase;
|
||||
},
|
||||
content:function (){
|
||||
player.storage.new_kongcheng=player.storage.new_kongcheng.concat(player.getCards('h'));
|
||||
|
@ -3768,13 +3768,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
xuanlve:{
|
||||
trigger:{player:'loseEnd'},
|
||||
trigger:{player:'loseAfter'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='e') return true;
|
||||
}
|
||||
return false;
|
||||
return event.es&&event.es.length>0;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -4151,33 +4148,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
return lib.filter.filterCard(card,player,_status.event.getParent());
|
||||
},
|
||||
check:function(button){
|
||||
if(['chiling','xietianzi','lianjunshengyan'].contains(button.link[2])) return 0;
|
||||
var player=_status.event.player;
|
||||
var players=game.filterPlayer();
|
||||
var shunshou=false;
|
||||
var guohe=false;
|
||||
var juedou=false;
|
||||
var huoshao=false;
|
||||
for(var i=0;i<players.length;i++){
|
||||
if(!players[i].isOut()){
|
||||
if(player.canUse('huoshaolianying',players[i])&&get.attitude(player,players[i])<0&&get.effect(players[i],{name:'huoshaolianying'})>0) huoshao=true;
|
||||
if(players[i].hp==1&&get.damageEffect(players[i],player,player)>0&&!players[i].hasSha()){
|
||||
juedou=true;
|
||||
}
|
||||
if(player.canUse('shunshou',players[i])&&get.attitude(player,players[i])<-1){
|
||||
shunshou=true;
|
||||
}
|
||||
if(players[i].countCards('j')&&get.attitude(player,players[i])>2){
|
||||
guohe=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(huoshao&&button.link[2]=='huoshaolianying') return 3.5;
|
||||
if(juedou&&button.link[2]=='juedou') return 3;
|
||||
if(guohe&&button.link[2]=='guohe') return 2;
|
||||
if(shunshou&&button.link[2]=='shunshou') return 1.5;
|
||||
if(button.link[2]=='wuzhong'||button.link[2]=='yuanjiao') return 1;
|
||||
return 0;
|
||||
if(['chiling','xietianzi','tiesuo','lulitongxin','diaohulishan','jiedao'].contains(button.link[2])) return 0;
|
||||
return _status.event.player.getUseValue(button.link[2]);
|
||||
},
|
||||
backup:function(links,player){
|
||||
return {
|
||||
|
|
|
@ -140,6 +140,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
// game.delay();
|
||||
"step 2"
|
||||
if(!_status.connectMode&&_status.brawl&&_status.brawl.chooseCharacterBefore){
|
||||
_status.brawl.chooseCharacterBefore();
|
||||
}
|
||||
if(_status.connectMode){
|
||||
if(lib.configOL.versus_mode=='1v1'){
|
||||
game.randomMapOL('hidden');
|
||||
|
@ -268,9 +271,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
else{
|
||||
game.chooseCharacter();
|
||||
}
|
||||
if(!_status.connectMode&&_status.brawl&&_status.brawl.chooseCharacterBefore){
|
||||
_status.brawl.chooseCharacterBefore();
|
||||
}
|
||||
"step 3"
|
||||
var players=get.players(lib.sort.position);
|
||||
var info=[];
|
||||
|
|
Loading…
Reference in New Issue