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:'将两张手牌当杀使用或打出', prompt:'将两张手牌当杀使用或打出',
check:function(card){ check:function(card){
if(card.name=='sha') return 0; if(card.name=='sha') return 0;
return 6-get.useful(card) return 5-get.value(card)
}, },
ai:{ ai:{
respondSha:true, respondSha:true,

View File

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

View File

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

View File

@ -4594,8 +4594,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:6, audio:6,
content:function(){ content:function(){
'step 0' 'step 0'
player.chooseTarget('选择【先辅】的目标',lib.translate.xianfu_info,true,function(card,player,target){ player.chooseTarget('选择【先辅】的目标',lib.translate.xianfu_info,true,function(card,player,target){
return target!=player&&!target.hasSkill('xianfu2'); return target!=player&&(!player.storage.xianfu2||!player.storage.xianfu2.contains(target));
}).set('ai',function(target){ }).set('ai',function(target){
var att=get.attitude(_status.event.player,target); var att=get.attitude(_status.event.player,target);
if(att>0) return att+1; if(att>0) return att+1;
@ -4605,52 +4605,63 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 1' 'step 1'
if(result.bool){ if(result.bool){
var target=result.targets[0]; var target=result.targets[0];
//player.line(target,'green'); if(!player.storage.xianfu2) player.storage.xianfu2=[];
//game.log(target,'成为了','【先辅】','的目标'); player.storage.xianfu2.push(target);
target.storage.xianfu2=player; player.addSkill('xianfu2');
target.addSkill('xianfu2');
} }
} }
}, },
xianfu2:{ xianfu_mark:{
//mark:'character',
marktext:'辅', marktext:'辅',
intro:{ intro:{
name:'先辅',
content:'当你受到伤害后,$受到等量的伤害,当你回复体力后,$回复等量的体力' content:'当你受到伤害后,$受到等量的伤害,当你回复体力后,$回复等量的体力'
}, },
nopop:true,
charlotte:true,
trigger:{player:['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.name=='damage') return true;
return player.storage.xianfu2.isDamaged();
}, },
xianfu2:{
audio:'xianfu',
charlotte:true,
trigger:{global:['damageEnd','recoverEnd']},
forced:true,
filter:function(event,player){
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.isDamaged();
},
logTarget:'player',
content:function(){ content:function(){
'step 0' '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(); game.delayx();
'step 1' 'step 1'
player.markSkill('xianfu2'); player[trigger.name](trigger.num,'nosource');
var target=player.storage.xianfu2; },
player.line(target,'green'); onremove:function(player){
target.logSkill('xianfu'); if(!player.storage.xianfu2) return;
target[trigger.name](trigger.num,'nosource'); game.countPlayer(function(current){
game.delay(); 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', group:'xianfu3',
onremove:true,
}, },
xianfu3:{ xianfu3:{
trigger:{global:'dieAfter'}, trigger:{global:'dieBegin'},
silent:true, silent:true,
filter:function(event,player){ filter:function(event,player){
return event.player==player.storage.xianfu2; return event.player==player||player.storage.xianfu2&&player.storage.xianfu2.contains(player);
}, },
content:function(){ content:function(){
player.removeSkill('xianfu2'); if(player==event.player) lib.skill.xianfu2.onremove(player);
else player.storage.xianfu2.remove(event.player);
} }
}, },
chouce:{ chouce:{
@ -4679,16 +4690,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
else{ else{
var next=player.chooseTarget('令一名角色摸一张牌'); var next=player.chooseTarget('令一名角色摸一张牌');
var xianfu=game.findPlayer(function(current){ if(player.storage.xianfu2&&player.storage.xianfu2.length){
return current.hasSkill('xianfu2')&&current.storage.xianfu2==player; next.set('prompt2','(若目标为'+get.translation(player.storage.xianfu2)+'则改为摸两张牌)');
});
if(xianfu){
next.set('prompt2','(若目标为'+get.translation(xianfu)+'则改为摸两张牌)');
} }
next.set('ai',function(target){ next.set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
var att=get.attitude(player,target)/Math.sqrt(1+target.countCards('h')); 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; return att;
}) })
} }
@ -4700,8 +4708,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.discardPlayerCard(target,'hej',true); player.discardPlayerCard(target,'hej',true);
} }
else{ else{
if(target.hasSkill('xianfu2')&&target.storage.xianfu2==player){ if(player.storage.xianfu2&&player.storage.xianfu2.contains(target)){
target.markSkill('xianfu2'); if(!target.storage.xianfu_mark) target.storage.xianfu_mark=[];
target.storage.xianfu_mark.add(player);
target.storage.xianfu_mark.sortBySeat();
target.draw(2); target.draw(2);
} }
else{ else{
@ -10284,6 +10294,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
fenyin:{ 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, audio:2,
trigger:{player:'useCard'}, trigger:{player:'useCard'},
frequent:true, frequent:true,
@ -10299,6 +10320,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){ content:function(){
player.draw(); player.draw();
}, },
ai:{
threaten:3,
},
}, },
dujin:{ dujin:{
audio:2, audio:2,
@ -10678,13 +10702,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
filter:function(event,player){ filter:function(event,player){
if(!['sha','juedou'].contains(event.card.name)) return false; if(!['sha','juedou'].contains(event.card.name)) return false;
if(player.hasSkill('fengpo3')) return false; var evt2=event.getParent('phaseUse');
return player.isPhaseUsing()&&event.target&&event.targets&&event.targets.length==1; 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, direct:true,
content:function(){ content:function(){
'step 0' 'step 0'
player.addTempSkill('fengpo3');
player.chooseControl('draw_card','加伤害','cancel2').set('prompt',get.prompt2('fengpo')); player.chooseControl('draw_card','加伤害','cancel2').set('prompt',get.prompt2('fengpo'));
'step 1' 'step 1'
if(result.control&&result.control!='cancel2'){ 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'}, trigger:{global:'judge'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
return player.countCards('h')>0; return player.countCards(get.mode()=='guozhan'?'he':'h')>0;
}, },
content:function(){ content:function(){
"step 0" "step 0"
player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ 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 player=_status.event.player;
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
if(mod2!='unchanged') return mod2; if(mod2!='unchanged') return mod2;
@ -2468,6 +2468,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fankui_info:'当你受到伤害后,你可以获得伤害来源的一张牌。', fankui_info:'当你受到伤害后,你可以获得伤害来源的一张牌。',
guicai:'鬼才', guicai:'鬼才',
guicai_info:'一名角色的判定牌生效前,你可以打出一张手牌代替之。', guicai_info:'一名角色的判定牌生效前,你可以打出一张手牌代替之。',
guicai_info_guozhan:'一名角色的判定牌生效前,你可以打出一张牌代替之。',
xiahoudun:'夏侯惇', xiahoudun:'夏侯惇',
zhangliao:'张辽', zhangliao:'张辽',

View File

@ -1120,7 +1120,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
gaizao:{ gaizao:{
trigger:{player:'useCardToBegin'}, trigger:{player:'useCardToBegin'},
filter:function(event,player){ 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; return lib.skill.gaizao.filterx(event.card,player)&&event.target==player;
}, },
direct:true, 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]=lib.translate[trigger.card.name];
lib.translate[name+'_info']=lib.translate[trigger.card.name+'_info']; 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:{ ai:{

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
window.noname_update={ window.noname_update={
version:'1.9.98.2.3', version:'1.9.98.2.4',
update:'1.9.98.2.2', update:'1.9.98.2.3',
changeLog:[ changeLog:[
'bug修复', 'bug修复',
], ],
@ -16,39 +16,40 @@ window.noname_update={
//'card/zhulu.js', //'card/zhulu.js',
//'character/diy.js', //'character/diy.js',
'character/extra.js', 'character/extra.js',
'character/hearth.js', //'character/hearth.js',
//'character/gujian.js', //'character/gujian.js',
'character/gwent.js', //'character/gwent.js',
//'character/mobile.js', //'character/mobile.js',
//'character/mtg.js', //'character/mtg.js',
//'character/old.js', //'character/old.js',
//'character/refresh.js', 'character/refresh.js',
'character/shenhua.js', 'character/shenhua.js',
'character/sp.js', 'character/sp.js',
//'character/tw.js', //'character/tw.js',
//'character/standard.js', 'character/standard.js',
//'character/swd.js', 'character/swd.js',
//'character/xianjian.js', //'character/xianjian.js',
//'character/xinghuoliaoyuan.js', 'character/xinghuoliaoyuan.js',
'character/yijiang.js', //'character/yijiang.js',
//'character/yxs.js', //'character/yxs.js',
//'extension/boss/extension.js', //'extension/boss/extension.js',
//'layout/default/layout.css', //'layout/default/layout.css',
'layout/nova/layout.css',
//'mode/identity.js', //'mode/identity.js',
//'mode/doudizhu.js', //'mode/doudizhu.js',
//'mode/guozhan.js', 'mode/guozhan.js',
//'mode/chess.js', //'mode/chess.js',
//'mode/tafang.js', //'mode/tafang.js',
//'mode/single.js', //'mode/single.js',
//'mode/stone.js', //'mode/stone.js',
//'mode/brawl.js', //'mode/brawl.js',
//'mode/versus.js', //'mode/versus.js',
//'mode/boss.js', 'mode/boss.js',
'game/game.js', 'game/game.js',
//'game/NoSleep.js', //'game/NoSleep.js',
//'game/config.js', //'game/config.js',
'game/package.js', //'game/package.js',
//'game/asset.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.cards=equiplist;
next.setContent(function(){ next.setContent(function(){
'step 0' 'step 0'
if(!cards.length){
event.finish();return;
}
player.logSkill('boss_jingjia'); player.logSkill('boss_jingjia');
event.num=1.5; event.num=1.5;
'step 1' '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_shibing2qun:['female','qun',0,[],['unseen']],
gz_caocao:['male','wei',4,['jianxiong']], gz_caocao:['male','wei',4,['jianxiong']],
gz_simayi:['male','wei',3,['fankui','reguicai']], gz_simayi:['male','wei',3,['fankui','guicai']],
gz_xiahoudun:['male','wei',4,['ganglie']], gz_xiahoudun:['male','wei',4,['reganglie']],
gz_zhangliao:['male','wei',4,['new_retuxi']], gz_zhangliao:['male','wei',4,['new_retuxi']],
gz_xuzhu:['male','wei',4,['luoyi']], gz_xuzhu:['male','wei',4,['luoyi']],
gz_guojia:['male','wei',3,['tiandu','new_yiji'],['gzskin']], 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){ init:function (player){
if(player.storage.new_kongcheng==undefined) player.storage.new_kongcheng=[]; 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"], group:["new_kongcheng_gain","new_kongcheng_got"],
subSkill:{ subSkill:{
gain:{ gain:{
audio:"kongcheng", audio:"kongcheng",
trigger:{ trigger:{
player:"gainEnd", player:"gainBegin",
}, },
filter:function (event,player){ 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 (){ content:function (){
player.storage.new_kongcheng=player.storage.new_kongcheng.concat(player.getCards('h')); trigger.setContent(lib.skill.new_kongcheng.fixedGain);
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');
}, },
sub:true, sub:true,
forced:true, forced:true,
@ -3985,7 +4038,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
//event.trigger('addCardToStorage'); //event.trigger('addCardToStorage');
}, },
ai:{ ai:{
order:1, order:10,
result:{ result:{
player:1 player:1
} }