v1.9.91.5(Part 2)

This commit is contained in:
Spmario233 2019-08-13 12:42:32 +08:00 committed by GitHub
parent 7859ccb81a
commit 7ccef777db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 330 additions and 74 deletions

View File

@ -2035,9 +2035,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
forced:true,
content:function(){
player.storage.nzry_junlve+=trigger.num;
if(player==trigger.source){
player.storage.nzry_junlve+=trigger.num;
game.log(player,'获得了',trigger.num,'个“军略”标记');
}
if(player==trigger.player){
player.storage.nzry_junlve+=trigger.num;
game.log(player,'获得了',trigger.num,'个“军略”标记');
}
player.syncStorage('nzry_junlve');
game.log(player,'获得',trigger.num,'个“军略”标记');
},
},
"nzry_cuike":{

View File

@ -3,6 +3,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return {
name:'old',
character:{
yuji:['male','qun',3,['old_guhuo'],['forbidai']],
zhangjiao:['male','qun',3,['leiji','guidao','huangtian'],['zhu']],
masu:['male','shu',3,['xinzhan','huilei']],
xushu:['male','shu',3,['wuyan','jujian']],
@ -37,22 +38,246 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
skill:{
"old_guhuo":{
group:["old_guhuo_guess","old_guhuo_respond","old_guhuo_wuxie"],
enable:"chooseToUse",
filter:function (event,player){
if(!player.countCards('h')) return false;
var list=['sha','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman'];
if(get.mode()=='guozhan'){
list=list.concat(['xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying']);
}
for(var i=0;i<list.length;i++){
if(event.filterCard({name:list[i]},player)) return true;
}
return false;
},
chooseButton:{
dialog:function (){
var list=['sha','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman'];
if(get.mode()=='guozhan'){
list=list.concat(['xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying']);
}
for(var i=0;i<list.length;i++){
if(i<3){
list[i]=['基本','',list[i]];
}
else{
list[i]=['锦囊','',list[i]];
}
}
list.push(['基本','','sha','fire']);
list.push(['基本','','sha','thunder']);
return ui.create.dialog('蛊惑',[list,'vcard']);
},
filter:function (button,player){
var evt=_status.event.getParent();
if(evt&&evt.filterCard){
return evt.filterCard({name:button.link[2]},player,evt);
}
return true;
},
backup:function (links,player){
return {
filterCard:true,
selectCard:1,
viewAs:{name:links[0][2],nature:links[0][3]},
}
},
prompt:function (links,player){
return '将一张手牌当'+get.translation(links[0][2])+'使用';
},
},
ai:{save:true},
},
"old_guhuo_guess":{
audio:'guhuo_guess',
trigger:{
player:"useCardBefore",
},
filter:function (event,player){
return event.skill=="old_guhuo_backup"||event.skill=="old_guhuo_wuxie";
},
forced:true,
direct:true,
priority:15,
content:function (){
'step 0'
player.logSkill('old_guhuo_guess');
player.popup(trigger.card.name,'metal');
player.line(trigger.targets,trigger.card.nature);
trigger.line=false;
event.prompt=get.translation(player)+'声明了'+get.translation(trigger.card.name)+',是否质疑?';
event.guessers=game.filterPlayer(function(current){
return current!=player;
});
event.guessers.sort(lib.sort.seat);
event.ally=[];
event.betray=[];
'step 1'
if(event.guessers.length==0) event.goto(3);
else{
event.guessers[0].chooseControl('质疑','不质疑').set('prompt',event.prompt).set('ai',function(){
if(get.attitude(event.guessers[0],player)>0) return '不质疑';
return Math.random()<0.5?'不质疑':'质疑';
});
}
'step 2'
if(!result.control) result.control='不质疑';
event.guessers[0].chat(result.control);
game.delay();
if(result.control=='不质疑'){
game.log(event.guessers[0],'#g不质疑');
event.ally.push(event.guessers[0]);
}else{
game.log(event.guessers[0],'#y质疑');
event.betray.push(event.guessers[0]);
}
event.guessers.remove(event.guessers[0]);
event.goto(1);
'step 3'
player.showCards(trigger.cards);
if(event.betray.length){
if(trigger.card.name==trigger.cards[0].name){
if(get.suit(trigger.cards[0])!='heart'){
game.log(player,'使用的','#y'+get.translation(trigger.card.name),'作废了');
player.discard(trigger.cards);
trigger.cancel();
}
for(var i=0;i<event.betray.length;i++){
event.betray[i].loseHp();
}
}
else{
game.log(player,'使用的','#y'+get.translation(trigger.card.name),'作废了');
player.discard(trigger.cards);
trigger.cancel();
game.asyncDraw(event.betray);
game.delay();
}
}
},
},
"old_guhuo_respond":{
trigger:{
player:"chooseToRespondBegin",
},
filter:function (event,player){
if(event.responded) return false;
if(!event.filterCard({name:'shan'})&&!event.filterCard({name:'sha'})) return false;
if(!player.countCards('h')) return false;
return true;
},
direct:true,
content:function (){
'step 0'
if(trigger.filterCard({name:'shan'})&&lib.filter.cardRespondable({name:'shan'},player,trigger)) event.name='shan';
else event.name='sha';
player.chooseCard('是否发动【蛊惑】,将一张手牌当做'+get.translation(event.name)+'打出?');
'step 1'
if(result.bool){
player.logSkill('old_guhuo_guess');
player.popup(event.name,'metal');
event.card=result.cards[0];
event.prompt=get.translation(player)+'声明了'+get.translation(event.name)+',是否质疑?';
event.guessers=game.filterPlayer(function(current){
return current!=player;
});
event.guessers.sort(lib.sort.seat);
event.ally=[];
event.betray=[];
}
else event.finish();
'step 2'
if(event.guessers.length==0) event.goto(3);
else{
event.guessers[0].chooseControl('质疑','不质疑').set('prompt',event.prompt).set('ai',function(){
if(get.attitude(event.guessers[0],player)>0) return '不质疑';
return Math.random()<0.5?'不质疑':'质疑';
});
}
'step 3'
if(!result.control) result.control='不质疑';
event.guessers[0].chat(result.control);
game.delay();
if(result.control=='不质疑'){
game.log(event.guessers[0],'#g不质疑');
event.ally.push(event.guessers[0]);
}else{
game.log(event.guessers[0],'#y质疑');
event.betray.push(event.guessers[0]);
}
event.guessers.remove(event.guessers[0]);
event.goto(2);
'step 4'
var bool=true;
player.showCards(event.card);
if(event.betray.length){
if(event.name==event.card.name){
if(get.suit(event.card)!='heart'){
game.log(player,'使用的','#y'+get.translation(event.name),'作废了');
player.discard(event.card);
bool=false;
}
for(var i=0;i<event.betray.length;i++){
event.betray[i].loseHp();
}
}
else{
game.log(player,'使用的','#y'+get.translation(event.name),'作废了');
player.discard(event.card);
bool=false;
game.asyncDraw(event.betray);
game.delay();
}
}
if(!bool) event.finish();
'step 5'
trigger.untrigger();
trigger.responded=true;
trigger.result={bool:true,card:{name:event.name},cards:[event.card]};
},
ai:{
order:4,
useful:-1,
value:-1,
},
},
"old_guhuo_wuxie":{
log:false,
silent:true,
popup:false,
enable:"chooseToUse",
filterCard:true,
viewAsFilter:function (player){
return player.countCards('h')>0;
},
viewAs:{
name:"wuxie",
},
check:function(card){
if(card.name=='wuxie') return 1000;
return 0;
},
prompt:"将一张手牌当无懈可击使用",
threaten:1.2,
},
old_zuilun:{
audio:'xinfu_zuilun',
subSkill:{
e:{},
h:{},
},
enable:"phaseUse",
usable:2,
filterTarget:function (card,player,target){
audio:'xinfu_zuilun',
subSkill:{
e:{},
h:{},
},
enable:"phaseUse",
usable:2,
filterTarget:function (card,player,target){
if(player==target) return false;
var pos='he';
if(player.hasSkill('old_zuilun_h')) pos='e';
if(player.hasSkill('old_zuilun_e')) pos='h';
return target.countGainableCards(player,pos)>0;
},
content:function (){
content:function (){
'step 0'
var pos='he';
if(player.hasSkill('old_zuilun_h')) pos='e';
@ -65,13 +290,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(pos=='h'||pos=='e') player.addTempSkill('old_zuilun_'+pos,'phaseUseAfter');
}
},
ai:{
order:7,
result:{
target:-1,
},
},
},
ai:{
order:7,
result:{
target:-1,
},
},
},
old_fuyin:{
mod:{
targetEnabled:function(card,player,target){
@ -80,44 +305,44 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
"old_jijun":{
marktext:"方",
audio:"xinfu_jijun",
intro:{
content:"cards",
},
enable:"phaseUse",
filterCard:true,
selectCard:[1,Infinity],
filter:function (event,player){
marktext:"方",
audio:"xinfu_jijun",
intro:{
content:"cards",
},
enable:"phaseUse",
filterCard:true,
selectCard:[1,Infinity],
filter:function (event,player){
return player.countCards('h')>0;
},
check:function (card){
check:function (card){
var player=_status.event.player;
if(player.storage.old_jijun&&(36-player.storage.old_jijun.length)<=player.countCards('h')) return 1;
return 5-get.value(card);
},
discard:false,
lose:false,
content:function (){
discard:false,
lose:false,
content:function (){
player.lose(cards,ui.special,'toStorage');
player.$give(cards,player);
if(!player.storage.old_jijun) player.storage.old_jijun=[];
player.storage.old_jijun.addArray(cards);
player.markSkill('old_jijun');
},
ai:{order:1,result:{player:1}},
},
"old_fangtong":{
trigger:{
player:"phaseEnd",
},
audio:"xinfu_fangtong",
forced:true,
skillAnimation:true,
filter:function (event,player){
ai:{order:1,result:{player:1}},
},
"old_fangtong":{
trigger:{
player:"phaseEnd",
},
audio:"xinfu_fangtong",
forced:true,
skillAnimation:true,
filter:function (event,player){
return (player.storage.old_jijun&&player.storage.old_jijun.length>35);
},
content:function (){
content:function (){
var bool=false;
if(player==game.me) bool=true;
else switch(get.mode()){
@ -151,7 +376,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
game.over(bool);
},
},
},
oldanxu:{
enable:'phaseUse',
@ -578,13 +803,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
old_machao:'☆SP马超',
old_zhugezhan:"旧诸葛瞻",
zhangliang:'SP张梁',
yuji:'旧于吉',
"old_guhuo":"蛊惑",
"old_guhuo_info":"你可以说出任何一种基本牌或普通锦囊牌并正面朝下使用或打出一张手牌。体力值不为0的其他角色依次选择是否质疑。若无角色质疑则该牌按你所述之牌结算。若有角色质疑则亮出验明若为真质疑者各失去1点体力若为假质疑者各摸一张牌。无论真假弃置被质疑的牌。仅当被质疑的牌为红桃花色且为真时该牌仍然可以进行结算。",
"old_guhuo_guess":"蛊惑",
"old_guhuo_wuxie":"蛊惑",
"old_jijun":"集军",
"old_jijun_info":"出牌阶段,你可以将任意张手牌置于你的武将牌上。(均称为“方”)",
"old_fangtong":"方统",
"old_fangtong_info":"锁定技结束阶段若你的“方”的数目大于等于36则你所在的游戏阵营直接取得游戏胜利。",
"old_jijun_info":"出牌阶段,你可以将任意张手牌置于你的武将牌上。(均称为“方”)",
"old_fangtong":"方统",
"old_fangtong_info":"锁定技结束阶段若你的“方”的数目大于等于36则你所在的游戏阵营直接取得游戏胜利。",
old_zuilun:"罪论",
old_zuilun_info:"出牌阶段,你可以获得一名其他角色的一张牌(手牌、装备区各一次),然后该角色摸一张牌。",
old_zuilun_info:"出牌阶段,你可以获得一名其他角色的一张牌(手牌、装备区各一次),然后该角色摸一张牌。",
old_fuyin:"父荫",
old_fuyin_info:"锁定技,若你的装备区内没有防具牌,手牌数大于或等于你的其他角色不能使用【杀】、【决斗】或【火攻】指定你为目标",
oldanxu:'安恤',

View File

@ -1924,7 +1924,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
'step 4'
if(event.toequip){
player.equip(event.toequip);
player.useCard(event.toequip,player).nopopup=true;
}
},
ai:{
@ -2477,7 +2477,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'phaseUse',
usable:1,
filterTarget:function(card,player,target){
return target.canUse({name:'sha'},player)&&target.countCards('he');
return lib.filter.targetInRange({name:'sha'},target,player)&&target.countCards('he');
},
content:function(){
"step 0"
@ -6039,9 +6039,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
buqu:{
audio:2,
trigger:{player:'dieBefore'},
trigger:{player:'chooseToUseBefore'},
forced:true,
filter:function(event,player){return player.maxHp>0&&player.hp<=0},
filter:function(event,player){return event.type=='dying'&&player.isDying()&&event.dying==player},
content:function(){
"step 0"
event.card=get.cards()[0];
@ -6053,19 +6053,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.markSkill('buqu');
"step 1"
for(var i=0;i<player.storage.buqu.length-1;i++){
if(get.number(event.card)&&get.number(event.card)==get.number(player.storage.buqu[i])) return;
if(get.number(event.card)&&get.number(event.card)==get.number(player.storage.buqu[i])){
player.storage.buqu.remove(event.card);
player.syncStorage('buqu');
player.markSkill('buqu');
game.cardsDiscard(event.card);
return;
};
}
trigger.cancel();
trigger.result={bool:true};
if(player.hp<=0){
player.hp=1;
player.update();
player.recover(1-player.hp);
}
},
mod:{
maxHandcard:function(player,num){
if(player.storage.buqu&&player.storage.buqu.length) return num-player.hp+player.storage.buqu.length;
}
},
},
ai:{save:true},
intro:{
content:'cards',
onunmark:function(storage,player){
@ -6689,7 +6696,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
kuanggu_info:'锁定技每当你造成一点伤害若受伤害角色与你的距离不大于1你回复一点体力',
tianxiang_info:'当你即将受到伤害时你可以弃置一张红桃牌将伤害转移给任意一名其他角色然后该角色摸x张牌x为其已损失体力值',
hongyan_info:'锁定技,你的黑桃牌均视为红桃',
buqu_info:'锁定技,在你死亡前若你的体力值不大于0亮出牌堆顶的一张牌并置于你的武将牌上若此牌的点数与你武将牌上已有的牌点数均不同则你回复至1体力。只要你的武将牌上有牌你的手牌上限便与这些牌数量相等',
buqu_info:'锁定技,当你处于濒死状态时你亮出牌堆顶的一张牌并置于你的武将牌上称之为“创”。若此牌的点数与你武将牌上已有的“创”点数均不同则你回复至1体力。若点数相同则将此牌置入弃牌堆。只要你的武将牌上有“创”你的手牌上限便与“创”的数量相等',
leiji_info:'每当你使用或打出一张【闪】,可令任意一名角色进行一次判定,若结果为黑桃,其受到两点雷电伤害',
guidao_info:'任意一名角色的判定生效前,你可以打出一张黑色牌替换之',
huangtian_info:'主公技,群雄角色可在他们各自的回合里给你一张【闪】或【闪电】。',

View File

@ -3415,7 +3415,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return;
}
target.$draw(equip1);
target.equip(equip1);
target.useCard(equip1,target).set('animate',false).nopopup=true;
game.delay();
'step 2'
var card=cards[0];
@ -8246,8 +8246,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var nh=player.countCards('h');
if(nh){
player.chooseCard('h',[1,nh],'将任意张手牌置于你的武将牌上').set('ai',function(card){
if(ui.selected.cards.length>=3) return -get.value(card);
return 6-get.value(card);
var player=_status.event.player;
var count=game.countPlayer(function(current){
return get.attitude(player,current)>2&&current.hp-current.countCards('h')>1;
});
if(ui.selected.cards.length>=count) return -get.value(card);
return 5-get.value(card);
});
}
else{
@ -10057,7 +10061,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
"step 3"
if(result.bool){
trigger.target.equip(event.card);
trigger.target.useCard(event.card).nopopup=true;
}
},
ai:{
@ -11041,7 +11045,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 1"
if(player.isDamaged()){
if(get.mode()=='guozhan'){
if(player.isMinor()){
if(player.isMinor(true)){
player.recover();
}
}

View File

@ -212,7 +212,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(event.num>0) event.goto(1);
"step 3"
for (var i=0;i<event.toequip.length;i++){
target.equip(event.toequip[i]);
target.useCard(event.toequip[i],target).set('animate',false).set('nopopup',true);
}
},
ai:{
@ -4035,6 +4035,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
chooseButton:{
dialog:function (){
var list=['sha','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman'];
if(get.mode()=='guozhan'){
list=list.concat(['xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying']);
}
for(var i=0;i<list.length;i++){
if(i<3){
list[i]=['基本','',list[i]];
@ -4045,7 +4048,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
list.push(['基本','','sha','fire']);
list.push(['基本','','sha','thunder']);
return ui.create.dialog([list,'vcard']);
return ui.create.dialog('蛊惑',[list,'vcard']);
},
filter:function (button,player){
var evt=_status.event.getParent();
@ -4065,6 +4068,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return '将一张手牌当'+get.translation(links[0][2])+'使用';
},
},
ai:{save:true},
},
"guhuo_guess":{
audio:2,
@ -4081,7 +4085,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 0'
player.logSkill('guhuo_guess');
player.addTempSkill('guhuo_phase');
player.popup(trigger.card.name);
player.popup(trigger.card.name,'metal');
player.line(trigger.targets,trigger.card.nature);
trigger.line=false;
event.prompt=get.translation(player)+'声明了'+get.translation(trigger.card.name)+',是否质疑?';
event.guessers=game.filterPlayer(function(current){
return current!=player&&!current.hasSkill('chanyuan');
@ -4188,20 +4194,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.hasSkill('guhuo_phase'))return false;
if(event.responded) return false;
if(!event.filterCard({name:'shan'})&&!event.filterCard({name:'sha'})) return false;
if(!lib.filter.cardRespondable({name:'shan'},player,event)&&!lib.filter.cardRespondable({name:'sha'},player,event)) return false;
if(!player.countCards('h')) return false;
return true;
},
direct:true,
content:function (){
"step 0"
if(trigger.filterCard({name:'shan'})) event.name='shan';
if(trigger.filterCard({name:'shan'})&&lib.filter.cardRespondable({name:'shan'},player,trigger)) event.name='shan';
else event.name='sha';
player.chooseCard('是否发动【蛊惑】,将一张手牌当做'+get.translation(event.name)+'打出?');
"step 1"
if(result.bool){
player.addTempSkill('guhuo_phase');
player.logSkill('guhuo_guess');
player.popup(event.name);
player.popup(event.name,'metal');
event.card=result.cards[0];
event.prompt=get.translation(player)+'声明了'+get.translation(event.name)+',是否质疑?';
event.guessers=game.filterPlayer(function(current){

View File

@ -593,7 +593,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.type(card)=='equip'&&!target.isDisabled(get.subtype(card));
});
if(target.isMinEquip()){
target.equip(event.equip||game.createCard(get.inpilefull('equip').randomGet()),true);
target.useCard(event.equip||game.createCard(get.inpilefull('equip').randomGet()),target).set('animate',false).set('nopopup',true);
event.e=true;
}
'step 1'
@ -604,7 +604,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.recover();
}
if(!event.e&&player.isMinEquip()){
player.equip(event.equip||game.createCard(get.inpilefull('equip').randomGet()),true);
player.useCard(event.equip||game.createCard(get.inpilefull('equip').randomGet()),player).set('animate',false).set('nopopup',true);
}
},
ai:{
@ -1086,7 +1086,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.type(card)=='equip'&&!target.isDisabled(get.subtype(card));
});
if(event.card){
target.equip(event.card,true).set('delay',true);
target.useCard(event.card,target).set('delay',true).set('animate',false).set('nopopup',true);
event.goto(3);
}
else{
@ -1164,7 +1164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.type(card)=='equip';
});
if(card){
trigger.source.equip(card,true).set('delay',true);
trigger.source.useCard(card,trigger.source).set('delay',true).set('animate',false).set('nopopup',true);
}
},
ai:{
@ -1196,7 +1196,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.type(card)=='equip';
});
if(card){
target.equip(card,true).set('delay',true);
target.useCard(card,target).set('delay',true).set('animate',false).set('nopopup',true);
}
}
}
@ -3593,7 +3593,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 2'
target.chooseToDiscard(true).prompt='请弃置一张锦囊牌,或依次弃置两张非锦囊牌。';
'step 3'
if((!result.cards||get.type(result.cards[0],'trick')!='trick')&&target.countCards('he',{type:['trick','delay']})){
if((!result.cards||get.type(result.cards[0],'trick')!='trick')&&target.countCards('he',function(card){
return get.type(card,'trick')!='trick';
})){
target.chooseToDiscard(true,function(card){
return get.type(card,'trick')!='trick';
}).prompt='请弃置第二张非锦囊牌';
@ -5372,7 +5374,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
if(event.responded) return false;
if(!event.filterCard({name:'shan'})) return false;
if(!lib.filter.cardRespondable({name:'sha'},player,event)) return false;
if(!lib.filter.cardRespondable({name:'shan'},player,event)) return false;
if(player.storage.huomo&&player.storage.huomo.shan) return false;
if(event.parent.name!='sha') return false;
var hs=player.getCards('he',{color:'black'});
@ -7757,7 +7759,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var card=result[0];
if(get.type(card)=='equip'){
if(!event.target.isDisabled(get.subtype(card))){
event.target.equip(card);
event.target.useCard(card,event.target).set('animate',false).set('nopopup',true);
game.delay();
}
event.bool=true;