Add files via upload

This commit is contained in:
Spmario233 2020-03-09 21:12:08 +08:00 committed by GitHub
parent 5406140639
commit 7248fd8f6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 245 additions and 160 deletions

View File

@ -1688,7 +1688,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
prompt:'将两张手牌当杀使用或打出',
check:function(card){
if(card.name=='sha') return 0;
return 6-get.useful(card)
return 5-get.value(card)
},
ai:{
respondSha:true,

View File

@ -847,10 +847,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
wushen:{
mod:{
cardname:function(card,player,name){
if(get.suit(card)=='heart') return 'sha';
if(get.position(card)=='h'&&get.suit(card)=='heart') return 'sha';
},
cardnature:function(card,player,name){
if(get.suit(card)=='heart') return null;
cardnature:function(card,player){
if(get.position(card)=='h'&&get.suit(card)=='heart') return false;
},
targetInRange:function(card){
if(get.suit(card)=='heart') return true;

View File

@ -1827,15 +1827,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
}
event.cards=cardsx;
player.chooseBool("是否放弃摸牌"+(cardsx.length?(",改为获得"+get.translation(cardsx)):"")+"").ai=function(event,player){
var num=3
for(var i=0;i<event.cards.length;i++){
if(get.type(event.cards[i])!='basic'&&event.cards[i].name!='juedou'&&
(get.type(event.cards[i])!='equip'||get.subtype(event.cards[i])!='equip1')){
num--;
}
}
return num>=trigger.num;
player.chooseBool("是否放弃摸牌"+(cardsx.length?(",改为获得"+get.translation(cardsx)):"")+"").ai=function(){
var num=3;
return cardsx.length>=trigger.num;
};
"step 1"
if(result.bool){
@ -2573,7 +2567,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return true;
},
discard:false,
delay:0,
delay:false,
lose:false,
content:function(){
'step 0'
@ -2682,7 +2676,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filterCard:lib.filter.cardDiscardable,
discard:false,
lose:false,
delay:0,
delay:false,
selectCard:[1,Infinity],
check:function(card){
var player=_status.event.player;
@ -2819,7 +2813,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
selectCard:[1,Infinity],
discard:false,
lose:false,
delay:0,
delay:false,
filterTarget:function(card,player,target){
if(player.storage.rerende2&&player.storage.rerende2.contains(target)) return false;
return player!=target;
@ -4085,7 +4079,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
enable:'phaseUse',
usable:1,
delay:0,
delay:false,
filter:function(event,player){
return game.hasPlayer(function(current){
return current.sex=='male';

View File

@ -5909,7 +5909,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.finish();
}
"step 2"
trigger.trigger('damageBefore');
trigger.trigger('damageBegin3');
},
ai:{
maixie_defend:true,

View File

@ -4594,8 +4594,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:6,
content:function(){
'step 0'
player.chooseTarget('选择【先辅】的目标',lib.translate.xianfu_info,true,function(card,player,target){
return target!=player&&!target.hasSkill('xianfu2');
player.chooseTarget('选择【先辅】的目标',lib.translate.xianfu_info,true,function(card,player,target){
return target!=player&&(!player.storage.xianfu2||!player.storage.xianfu2.contains(target));
}).set('ai',function(target){
var att=get.attitude(_status.event.player,target);
if(att>0) return att+1;
@ -4605,52 +4605,63 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 1'
if(result.bool){
var target=result.targets[0];
//player.line(target,'green');
//game.log(target,'成为了','【先辅】','的目标');
target.storage.xianfu2=player;
target.addSkill('xianfu2');
if(!player.storage.xianfu2) player.storage.xianfu2=[];
player.storage.xianfu2.push(target);
player.addSkill('xianfu2');
}
}
},
xianfu2:{
//mark:'character',
xianfu_mark:{
marktext:'辅',
intro:{
name:'先辅',
content:'当你受到伤害后,$受到等量的伤害,当你回复体力后,$回复等量的体力'
},
nopop:true,
},
xianfu2:{
audio:'xianfu',
charlotte:true,
trigger:{player:['damageEnd','recoverEnd']},
trigger:{global:['damageEnd','recoverEnd']},
forced:true,
popup:false,
//priority:15,
filter:function(event,player){
if(!(player.storage.xianfu2&&player.storage.xianfu2.isIn()&&event.num>0)) return false;
if(event.player.isDead()||!player.storage.xianfu2||!player.storage.xianfu2.contains(event.player)||event.num<=0) return false;
if(event.name=='damage') return true;
return player.storage.xianfu2.isDamaged();
return player.isDamaged();
},
logTarget:'player',
content:function(){
'step 0'
var target=trigger.player;
if(!target.storage.xianfu_mark) target.storage.xianfu_mark=[];
target.storage.xianfu_mark.add(player);
target.storage.xianfu_mark.sortBySeat();
target.markSkill('xianfu_mark');
game.delayx();
'step 1'
player.markSkill('xianfu2');
var target=player.storage.xianfu2;
player.line(target,'green');
target.logSkill('xianfu');
target[trigger.name](trigger.num,'nosource');
game.delay();
player[trigger.name](trigger.num,'nosource');
},
onremove:function(player){
if(!player.storage.xianfu2) return;
game.countPlayer(function(current){
if(player.storage.xianfu2.contains(current)&&current.storage.xianfu_mark){
current.storage.xianfu_mark.remove(player);
if(!current.storage.xianfu_mark.length) current.unmarkSkill('xianfu_mark');
else current.markSkill('xianfu_mark');
}
});
delete player.storage.xianfu2;
},
group:'xianfu3',
onremove:true,
},
xianfu3:{
trigger:{global:'dieAfter'},
trigger:{global:'dieBegin'},
silent:true,
filter:function(event,player){
return event.player==player.storage.xianfu2;
return event.player==player||player.storage.xianfu2&&player.storage.xianfu2.contains(player);
},
content:function(){
player.removeSkill('xianfu2');
if(player==event.player) lib.skill.xianfu2.onremove(player);
else player.storage.xianfu2.remove(event.player);
}
},
chouce:{
@ -4679,16 +4690,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
else{
var next=player.chooseTarget('令一名角色摸一张牌');
var xianfu=game.findPlayer(function(current){
return current.hasSkill('xianfu2')&&current.storage.xianfu2==player;
});
if(xianfu){
next.set('prompt2','(若目标为'+get.translation(xianfu)+'则改为摸两张牌)');
if(player.storage.xianfu2&&player.storage.xianfu2.length){
next.set('prompt2','(若目标为'+get.translation(player.storage.xianfu2)+'则改为摸两张牌)');
}
next.set('ai',function(target){
var player=_status.event.player;
var att=get.attitude(player,target)/Math.sqrt(1+target.countCards('h'));
if(target.storage.xianfu2==player) return att*2;
if(player.storage.xianfu2&&player.storage.xianfu2.contains(target)) return att*2;
return att;
})
}
@ -4700,8 +4708,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.discardPlayerCard(target,'hej',true);
}
else{
if(target.hasSkill('xianfu2')&&target.storage.xianfu2==player){
target.markSkill('xianfu2');
if(player.storage.xianfu2&&player.storage.xianfu2.contains(target)){
if(!target.storage.xianfu_mark) target.storage.xianfu_mark=[];
target.storage.xianfu_mark.add(player);
target.storage.xianfu_mark.sortBySeat();
target.draw(2);
}
else{
@ -10284,6 +10294,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
fenyin:{
locked:false,
mod:{
aiOrder:function(player,card,num){
if(typeof card=='object'&&player==_status.currentPhase){
var evt=player.getLastUsed();
if(evt&&evt.card&&get.color(evt.card)!='none'&&get.color(card)!='none'&&get.color(evt.card)!=get.color(card)){
return num+10;
}
}
},
},
audio:2,
trigger:{player:'useCard'},
frequent:true,
@ -10299,6 +10320,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
player.draw();
},
ai:{
threaten:3,
},
},
dujin:{
audio:2,
@ -10678,13 +10702,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
filter:function(event,player){
if(!['sha','juedou'].contains(event.card.name)) return false;
if(player.hasSkill('fengpo3')) return false;
return player.isPhaseUsing()&&event.target&&event.targets&&event.targets.length==1;
var evt2=event.getParent('phaseUse');
if(evt2.player!=player) return false;
return player.getHistory('useCard',function(evt){
return ['sha','juedou'].contains(evt.card.name)&&evt.getParent('phaseUse')==2;
}).indexOf(event)==0;
},
direct:true,
content:function(){
'step 0'
player.addTempSkill('fengpo3');
player.chooseControl('draw_card','加伤害','cancel2').set('prompt',get.prompt2('fengpo'));
'step 1'
if(result.control&&result.control!='cancel2'){

View File

@ -205,12 +205,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{global:'judge'},
direct:true,
filter:function(event,player){
return player.countCards('h')>0;
return player.countCards(get.mode()=='guozhan'?'he':'h')>0;
},
content:function(){
"step 0"
player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+
get.translation(trigger.player.judging[0])+''+get.prompt('guicai'),'h',function(card){
get.translation(trigger.player.judging[0])+''+get.prompt('guicai'),get.mode()=='guozhan'?'he':'h',function(card){
var player=_status.event.player;
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
if(mod2!='unchanged') return mod2;
@ -2468,6 +2468,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fankui_info:'当你受到伤害后,你可以获得伤害来源的一张牌。',
guicai:'鬼才',
guicai_info:'一名角色的判定牌生效前,你可以打出一张手牌代替之。',
guicai_info_guozhan:'一名角色的判定牌生效前,你可以打出一张牌代替之。',
xiahoudun:'夏侯惇',
zhangliao:'张辽',

View File

@ -1120,7 +1120,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
gaizao:{
trigger:{player:'useCardToBegin'},
filter:function(event,player){
if(player.countCards('e')==5) return false;
if(player!=event.target&&player.countCards('e')==5) return false;
return lib.skill.gaizao.filterx(event.card,player)&&event.target==player;
},
direct:true,
@ -1159,7 +1159,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lib.translate[name]=lib.translate[trigger.card.name];
lib.translate[name+'_info']=lib.translate[trigger.card.name+'_info'];
}
trigger.card.init([trigger.card.suit,trigger.card.number,name,trigger.card.nature]);
trigger.card.name=name;
trigger.cards[0].init([trigger.card.suit,trigger.card.number,name,trigger.card.nature]);
}
},
ai:{

View File

@ -538,7 +538,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
check:function (){
return -1;
},
delay:0,
delay:false,
content:function (){
'step 0'
player.$throw(cards.length);
@ -3317,7 +3317,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
check:function (card){
return 6-get.value(card)
},
delay:0,
delay:false,
content:function (){
player.draw(cards.length);
player.storage.xinfu_duanfa+=cards.length;
@ -3656,6 +3656,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return Infinity;
}
},
aiValue:function(player,card,num){
if(card.name=='zhangba') return 15;
if(player.getEquip('zhangba')&&player.countCards('h')>1&&['shan','tao'].contains(card.name)) return 0;
},
},
locked:false,
audio:2,
@ -3675,19 +3679,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filterTarget:function (card,player,target){
return player==target;
},
check:function (card){
check:function(card){
var player=_status.event.player;
if(player.countCards('h','sha')<2){
if(player.countCards('h',function(cardx){
return cardx.name=='shan'&&get.suit(cardx)=='heart';
})>0) return 0;
if(player.countCards('h',function(cardx){
return cardx.name=='shan'&&get.suit(cardx)=='diamond';
})>0) return 0;
var damaged=player.maxHp-player.hp-1;
if(player.countCards('h',function(cardx){
return cardx.name=='tao'&&get.suit(cardx)=='diamond';
})>damaged) return 0;
if(!player.getEquip('zhangba')&&player.countCards('h','sha')<2){
if(player.countCards('h',function(cardx){
return cardx!=card&&cardx.name=='shan';
})>0) return 0;
var damaged=player.maxHp-player.hp-1;
var ts=player.countCards('h',function(cardx){
return cardx!=card&&cardx.name=='tao';
});
if(ts>0&&ts>damaged) return 0;
}
if(card.name=='shan') return 15;
if(card.name=='tao') return 10;
@ -3702,7 +3704,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
result:{
target:1,
},
order:9,
order:12,
},
},
"xinfu_guhuo":{
@ -4862,7 +4864,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
discard:false,
//lose:false,
delay:0,
delay:false,
content:function (){
'step 0'
//player.lose(cards,ui.special,'toStorage')
@ -5449,8 +5451,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"xinfu_shangjian_info":"一名角色的结束阶段开始时若你于此回合内失去了X张或更少的牌则你可以摸等量的牌。X为你的体力值",
"rw_bagua_skill":"先天八卦阵",
"rw_bagua_skill_info":"当你需要使用或打出一张【闪】时,你可以进行判定,若判定结果不为黑桃,视为你使用或打出了一张【闪】。",
"rw_baiyin_skill":"照狮子盔",
"rw_baiyin_skill_info":"锁定技当你受到大于1的伤害时你将伤害值改为1当你失去装备区里的【照狮子盔】时你回复1点体力并摸两张牌。",
"rw_baiyin_skill":"狮子盔",
"rw_baiyin_skill_info":"锁定技当你受到大于1的伤害时你将伤害值改为1当你失去装备区里的【狮子盔】时你回复1点体力并摸两张牌。",
"rw_lanyinjia":"精银甲",
"rw_lanyinjia_info":"你可以将一张手牌当做【闪】使用或打出。锁定技,【精银甲】不会无效。",
"rw_minguangkai_cancel":"耀光铠",
@ -5459,24 +5461,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"rw_minguangkai_link_info":"锁定技,当你成为【火烧连营】、【火攻】或火【杀】的目标时,或即将被横置时,取消之。",
"rw_renwang_skill":"仁王金刚盾",
"rw_renwang_skill_info":"黑色【杀】和红桃【杀】对你无效。",
"rw_tengjia1":"桐油百甲",
"rw_tengjia1":"桐油百甲",
"rw_tengjia1_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时取消之。",
"rw_tengjia2":"桐油百甲",
"rw_tengjia2":"桐油百甲",
"rw_tengjia2_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时取消之。",
"rw_tengjia3":"桐油百甲",
"rw_tengjia3":"桐油百甲",
"rw_tengjia3_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时取消之。",
"rw_tengjia4":"桐油百甲",
"rw_tengjia4":"桐油百甲",
"rewrite_bagua":"先天八卦阵",
"rewrite_bagua_info":"当你需要使用或打出一张【闪】时,你可以进行判定,若判定结果不为黑桃,视为你使用或打出了一张【闪】。",
"rewrite_baiyin":"照狮子盔",
"rewrite_baiyin_info":"锁定技当你受到大于1的伤害时你将伤害值改为1当你失去装备区里的【照狮子盔】时你回复1点体力并摸两张牌。",
"rewrite_baiyin":"狮子盔",
"rewrite_baiyin_info":"锁定技当你受到大于1的伤害时你将伤害值改为1当你失去装备区里的【狮子盔】时你回复1点体力并摸两张牌。",
"rewrite_lanyinjia":"精银甲",
"rewrite_lanyinjia_info":"你可以将一张手牌当做【闪】使用或打出。锁定技,【精银甲】不会无效。",
"rewrite_minguangkai":"耀光铠",
"rewrite_minguangkai_info":"锁定技,当你成为【火烧连营】、【火攻】或火【杀】的目标时,或即将被横置时,取消之。",
"rewrite_renwang":"仁王金刚盾",
"rewrite_renwang_info":"黑色【杀】和红桃【杀】对你无效。",
"rewrite_tengjia":"桐油百甲",
"rewrite_tengjia":"桐油百甲",
"rewrite_tengjia_info":"锁定技,【南蛮入侵】、【万箭齐发】和普【杀】对你无效。当你受到火焰伤害时,此伤害+1。当你即将被横置时取消之。",
"rewrite_zhuge":"元戎精械弩",
"rewrite_zhuge_info":"你于出牌阶段内使用【杀】无次数限制。",

View File

@ -14357,7 +14357,7 @@
else{
var givemap={hs:[],ots:[]};
for(var i=0;i<cards.length;i++){
givemap[cards[i].original=='h'?'hs':'ots'].push(cards[i]);
givemap[event.relatedLose&&event.relatedLose.hs&&event.relatedLose.hs.contains(cards[i])?'hs':'ots'].push(cards[i]);
}
if(givemap.hs.length) event.source.$giveAuto(givemap.hs,player);
if(givemap.ots.length) event.source.$give(givemap.ots,player);
@ -23100,16 +23100,16 @@
if(filter(info.trigger[i])){bool=true;break}
}
if(!bool) return;
var priority=0;
var priority=0;
if(info.priority){
priority=info.priority*100;
}
if(info.silent){
priority++;
}
if(info.equipSkill) num-=25;
if(info.cardSkill) num-=50;
if(info.ruleSkill) num-=75;
if(info.equipSkill) priority-=25;
if(info.cardSkill) priority-=50;
if(info.ruleSkill) priority-=75;
var toadd=[skillx,player,priority];
if(map.list2){
for(var i=0;i<map.list2.length;i++){
@ -46828,7 +46828,7 @@
name:info.autoViewAs,
suit:card.suit,
number:card.number,
nature:card.nature
nature:card.nature,
};
}
}
@ -46841,6 +46841,7 @@
nature:get.nature(card),
isCard:true,
cardid:card.cardid,
wunature:card.wunature,
};
if(get.itemtype(cards)=='cards'&&!card.cards) next.cards=cards.slice(0);
else next.cards=[card];
@ -47280,7 +47281,7 @@
case 'dianjiang':return '点将单挑';
}
}
else if(config.mode=='identity'){
else if(config.mode=='identity'&&config.identity_mode!='normal'){
switch(config.identity_mode){
case 'purple':return '三对三对二';
case 'zhong':return '忠胆英杰';
@ -49997,6 +49998,7 @@
return 10-get.useful(card);
},
value:function(card,player,method){
var result=0;
var value;
if(Array.isArray(card)){
value=0;
@ -50011,7 +50013,6 @@
var aii=get.info(card).ai;
if(aii&&aii.value) value=aii.value;
else if(aii&&aii.basic) value=aii.basic.value;
if(value==undefined) return 0;
if(player==undefined||get.itemtype(player)!='player') player=_status.event.player;
var geti=function(){
var num=0,i;
@ -50022,16 +50023,17 @@
return cards.length;
};
if(typeof value=='function'){
return value(card,player,geti(),method);
result=value(card,player,geti(),method);
}
if(typeof value=='number') return value;
if(typeof value=='number') result=value;
if(Array.isArray(value)){
if(method=='raw') return value[0];
if(method=='raw') result=value[0];
var num=geti();
if(num<value.length) return value[num];
return value[value.length-1];
if(num<value.length) result=value[num];
else result=value[value.length-1];
}
return 0;
result=game.checkMod(player,card,result,'aiValue',player);
return result;
},
equipResult:function(player,target,name){
var card=get.card();
@ -50135,7 +50137,7 @@
if(event.skill&&skillinfo.viewAs==undefined) card=_status.event.skill;
else{
card=get.card();
if(skillinfo&&card===skillinfo.viewAs){
if(skillinfo&&skillinfo.viewAs&&card.name===skillinfo.viewAs.name){
eventskill=event.skill;
}
}

View File

@ -11,6 +11,7 @@ window.noname_source_list=[
'card/swd.js',
'card/yunchou.js',
'card/zhenfa.js',
'card/zhulu.js',
'character/diy.js',
'character/extra.js',
'character/gujian.js',
@ -60,6 +61,7 @@ window.noname_source_list=[
'layout/newlayout/equip.css',
'layout/newlayout/global.css',
'layout/newlayout/layout.css',
'layout/nova/layout.css',
'mode/boss.js',
'mode/chess.js',
'mode/doudizhu.js',

View File

@ -1,6 +1,6 @@
window.noname_update={
version:'1.9.98.2.3',
update:'1.9.98.2.2',
version:'1.9.98.2.4',
update:'1.9.98.2.3',
changeLog:[
'bug修复',
],
@ -16,39 +16,40 @@ window.noname_update={
//'card/zhulu.js',
//'character/diy.js',
'character/extra.js',
'character/hearth.js',
//'character/hearth.js',
//'character/gujian.js',
'character/gwent.js',
//'character/gwent.js',
//'character/mobile.js',
//'character/mtg.js',
//'character/old.js',
//'character/refresh.js',
'character/refresh.js',
'character/shenhua.js',
'character/sp.js',
//'character/tw.js',
//'character/standard.js',
//'character/swd.js',
'character/standard.js',
'character/swd.js',
//'character/xianjian.js',
//'character/xinghuoliaoyuan.js',
'character/yijiang.js',
'character/xinghuoliaoyuan.js',
//'character/yijiang.js',
//'character/yxs.js',
//'extension/boss/extension.js',
//'layout/default/layout.css',
'layout/nova/layout.css',
//'mode/identity.js',
//'mode/doudizhu.js',
//'mode/guozhan.js',
'mode/guozhan.js',
//'mode/chess.js',
//'mode/tafang.js',
//'mode/single.js',
//'mode/stone.js',
//'mode/brawl.js',
//'mode/versus.js',
//'mode/boss.js',
'mode/boss.js',
'game/game.js',
//'game/NoSleep.js',
//'game/config.js',
'game/package.js',
//'game/package.js',
//'game/asset.js',
//'game/source.js',
'game/source.js',
]
};

View File

@ -1945,6 +1945,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
next.cards=equiplist;
next.setContent(function(){
'step 0'
if(!cards.length){
event.finish();return;
}
player.logSkill('boss_jingjia');
event.num=1.5;
'step 1'

View File

@ -313,8 +313,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_shibing2qun:['female','qun',0,[],['unseen']],
gz_caocao:['male','wei',4,['jianxiong']],
gz_simayi:['male','wei',3,['fankui','reguicai']],
gz_xiahoudun:['male','wei',4,['ganglie']],
gz_simayi:['male','wei',3,['fankui','guicai']],
gz_xiahoudun:['male','wei',4,['reganglie']],
gz_zhangliao:['male','wei',4,['new_retuxi']],
gz_xuzhu:['male','wei',4,['luoyi']],
gz_guojia:['male','wei',3,['tiandu','new_yiji'],['gzskin']],
@ -2134,21 +2134,74 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
init:function (player){
if(player.storage.new_kongcheng==undefined) player.storage.new_kongcheng=[];
},
fixedGain:function(){
'step 0'
if(cards){
var owner=event.source||get.owner(cards[0]);
if(owner){
var next=owner.lose(cards,ui.special,'toStorage').set('type','gain').set('forceDie',true);
if(event.animate=='give'||event.visible==true) next.visible=true;
event.relatedLose=next;
}
player.storage.new_kongcheng.addArray(cards);
player.markSkill('new_kongcheng');
}
else{
event.finish();
}
'step 1'
if(event.animate=='draw'){
player.$draw(cards.length);
game.pause();
setTimeout(function(){
game.resume();
},get.delayx(500,500));
}
else if(event.animate=='gain'){
player.$gain(cards);
game.pause();
setTimeout(function(){
game.resume();
},get.delayx(700,700));
}
else if(event.animate=='gain2'||event.animate=='draw2'){
var gain2t=300;
if(player.$gain2(cards)&&player==game.me){
gain2t=500;
}
game.pause();
setTimeout(function(){
game.resume();
},get.delayx(gain2t,gain2t));
}
else if(event.source&&(event.animate=='give'||event.animate=='giveAuto')){
if(event.animate=='give') event.source['$'+event.animate](cards,player);
else{
var givemap={hs:[],ots:[]};
for(var i=0;i<cards.length;i++){
givemap[cards[i].original=='h'?'hs':'ots'].push(cards[i]);
}
if(givemap.hs.length) event.source.$giveAuto(givemap.hs,player);
if(givemap.ots.length) event.source.$give(givemap.ots,player);
}
game.pause();
setTimeout(function(){
game.resume();
},get.delayx(500,500));
}
},
group:["new_kongcheng_gain","new_kongcheng_got"],
subSkill:{
gain:{
audio:"kongcheng",
trigger:{
player:"gainEnd",
player:"gainBegin",
},
filter:function (event,player){
return event.source&&event.source!=player&&!event.bySelf&&event.cards.length==player.countCards('h')&&player!=_status.currentPhase;
return event.source&&event.source!=player&&player!=_status.currentPhase&&!event.bySelf&&player.countCards('h')==0;
},
content:function (){
player.storage.new_kongcheng=player.storage.new_kongcheng.concat(player.getCards('h'));
player.markSkill('new_kongcheng');
game.addVideo('storage',player,['new_kongcheng',get.cardsInfo(player.storage.new_kongcheng),'cards']);
player.lose(player.getCards('h'),ui.special,'toStorage');
trigger.setContent(lib.skill.new_kongcheng.fixedGain);
},
sub:true,
forced:true,
@ -3985,7 +4038,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
//event.trigger('addCardToStorage');
},
ai:{
order:1,
order:10,
result:{
player:1
}