彭羕(no AI); fix get.number
This commit is contained in:
parent
2da3a809d7
commit
ce07a4af48
172
character/sp.js
172
character/sp.js
|
@ -27,6 +27,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
character:{
|
||||
ol_pengyang:['male','shu',3,['olqifan','oltuishi','nzry_cunmu']],
|
||||
ol_qianzhao:['male','wei',4,['olweifu','olkuansai']],
|
||||
niujin:['male','wei',4,['olcuorui','liewei']],
|
||||
hejin:['male','qun',4,['olmouzhu','olyanhuo']],
|
||||
|
@ -692,6 +693,171 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
skill:{
|
||||
//OL彭羕
|
||||
olqifan:{
|
||||
audio:2,
|
||||
enable:'chooseToUse',
|
||||
hiddenCard:function(player,name){
|
||||
if(name!='wuxie'&&lib.inpile.contains(name)) return true;
|
||||
},
|
||||
filter:function(event,player){
|
||||
if(event.responded||event.type=='wuxie'||event.olqifan) return false;
|
||||
for(var i of lib.inpile){
|
||||
if(i!='wuxie'&&get.type(i)=='basic'&&event.filterCard({name:i},player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
delay:false,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var evt=event.getParent(2);
|
||||
evt.set('olqifan',true);
|
||||
var cards=get.bottomCards(1+player.getStorage('olqifan').length,true);
|
||||
var aozhan=player.hasSkill('aozhan');
|
||||
player.chooseButton(['器翻:选择要使用的牌',cards]).set('filterButton',function(button){
|
||||
return _status.event.cards.contains(button.link);
|
||||
}).set('cards',cards.filter(function(card){
|
||||
if(aozhan&&card.name=='tao'){
|
||||
return evt.filterCard({
|
||||
name:'sha',isCard:true,cards:[card],
|
||||
},evt.player,evt)||evt.filterCard({
|
||||
name:'shan',isCard:true,cards:[card],
|
||||
},evt.player,evt);
|
||||
}
|
||||
return evt.filterCard(card,evt.player,evt);
|
||||
})).set('ai',function(button){
|
||||
var evt=_status.event.getParent(3);
|
||||
if(evt&&evt.ai){
|
||||
var tmp=_status.event;
|
||||
_status.event=evt;
|
||||
var result=(evt.ai||event.ai1)(button.link,_status.event.player,evt);
|
||||
_status.event=tmp;
|
||||
return result;
|
||||
}
|
||||
return 1;
|
||||
});
|
||||
'step 1'
|
||||
var evt=event.getParent(2);
|
||||
if(result.bool&&result.links&&result.links.length){
|
||||
var name=result.links[0].name,aozhan=(player.hasSkill('aozhan')&&name=='tao');
|
||||
if(aozhan){
|
||||
name=evt.filterCard({
|
||||
name:'sha',isCard:true,cards:[card],
|
||||
},evt.player,evt)?'sha':'shan';
|
||||
}
|
||||
game.broadcastAll(function(result,name){
|
||||
lib.skill.olqifan_backup.viewAs={name:name,cards:[result],isCard:true};
|
||||
lib.skill.olqifan_backup.prompt=('请选择'+get.translation(result)+'的目标');
|
||||
},result.links[0],name);
|
||||
evt.set('_backupevent','olqifan_backup');
|
||||
evt.backup('olqifan_backup');
|
||||
}
|
||||
evt.goto(0);
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target,effect){
|
||||
if(get.tag(card,'respondShan')) return 0.7;
|
||||
if(get.tag(card,'respondSha')) return 0.7;
|
||||
}
|
||||
},
|
||||
order:11,
|
||||
respondShan:true,
|
||||
respondSha:true,
|
||||
result:{
|
||||
player:function(player){
|
||||
if(_status.event.dying) return get.attitude(player,_status.event.dying);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
onremove:true,
|
||||
intro:{
|
||||
content:'已使用过$牌',
|
||||
},
|
||||
subSkill:{
|
||||
discard:{
|
||||
trigger:{player:'chooseToUseAfter'},
|
||||
forced:true,
|
||||
charlotte:true,
|
||||
filter:function(event,player){
|
||||
if(!event.olqifan_discard) return false;
|
||||
var num=player.getStorage('olqifan').length,pos=('jeh').slice(0,num);
|
||||
return num>0&&player.countCards(pos)>0;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.num=Math.min(3,player.getStorage('olqifan').length);
|
||||
'step 1'
|
||||
event.num--;
|
||||
var pos=('jeh')[event.num],hs=player.countCards('h');
|
||||
if(hs>0) player.chooseToDiscard(hs,pos,true);
|
||||
if(event.num>0) event.redo();
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
olqifan_backup:{
|
||||
sourceSkill:'olqifan',
|
||||
precontent:function(){
|
||||
delete event.result.skill;
|
||||
var name=event.result.card.name;
|
||||
event.result.cards=event.result.card.cards.slice(0);
|
||||
event.result.card=get.autoViewAs({name:name},event.result.cards);
|
||||
player.markAuto('olqifan',[get.type2(event.result.card,false)]);
|
||||
event.getParent().set('olqifan_discard',true);
|
||||
player.addTempSkill('olqifan_discard');
|
||||
},
|
||||
filterCard:function(){return false},
|
||||
selectCard:-1,
|
||||
},
|
||||
oltuishi:{
|
||||
audio:2,
|
||||
mod:{
|
||||
wuxieJudgeEnabled:()=>false,
|
||||
wuxieEnabled:()=>false,
|
||||
cardEnabled:(card)=>{
|
||||
if(card.name=='wuxie') return false;
|
||||
},
|
||||
targetInRange:(card)=>{
|
||||
if(card.storage&&card.storage.oltuishi) return true;
|
||||
}
|
||||
},
|
||||
trigger:{player:'useCardAfter'},
|
||||
forced:true,
|
||||
filter:function(event){
|
||||
const num=get.number(event.card);
|
||||
return [1,11,12,13].includes(num);
|
||||
},
|
||||
content:function(){
|
||||
player.draw(2);
|
||||
player.addSkill('oltuishi_unlimit');
|
||||
},
|
||||
subSkill:{
|
||||
unlimit:{
|
||||
charlotte:true,
|
||||
mod:{
|
||||
cardUsable:()=>Infinity,
|
||||
targetInRange:()=>true,
|
||||
},
|
||||
trigger:{player:'useCard1'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
silent:true,
|
||||
firstDo:true,
|
||||
content:function(){
|
||||
player.removeSkill('oltuishi_unlimit')
|
||||
var card=trigger.card;
|
||||
if(!card.storage) card.storage={};
|
||||
card.storage.oltuishi=true;
|
||||
if(trigger.addCount!==false){
|
||||
trigger.addCount=false;
|
||||
player.getStat('card')[card.name]--;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
//OL牵招
|
||||
olweifu:{
|
||||
audio:2,
|
||||
|
@ -23476,6 +23642,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
wenqin:['wenqin','pe_wenqin'],
|
||||
zhouqun:['ol_zhouqun','zhouqun'],
|
||||
qianzhao:['ol_qianzhao','qianzhao'],
|
||||
ol_pengyang:['ol_pengyang','sp_pengyang'],
|
||||
},
|
||||
translate:{
|
||||
"xinfu_lingren":"凌人",
|
||||
|
@ -24598,6 +24765,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
olweifu_info:'出牌阶段,你可以弃置一张牌并判定。你本回合下次使用与结果类型相同的牌无距离限制,且可以额外指定一个目标。若你弃置的牌与判定牌类型相同,你摸一张牌。',
|
||||
olkuansai:'款塞',
|
||||
olkuansai_info:'当一张牌指定第一个目标后,若目标数大于你的体力值,你可以令其中一个目标选择一项:1.交给你一张牌;2.令你回复1点体力。',
|
||||
ol_pengyang:'OL彭羕',
|
||||
olqifan:'器翻',
|
||||
olqifan_info:'当你需要使用不为【无懈可击】的牌时,你可以观看牌堆底的X+1张牌并使用其中的一张。此牌结算结束时,你依次弃置以下前X个区域中的所有牌:⒈判定区、⒉装备区、⒊手牌区(X为你因此技能使用过的牌中包含的类型数)。',
|
||||
oltuishi:'侻失',
|
||||
oltuishi_info:'锁定技。①你不能使用【无懈可击】。②当你使用点数为字母的牌后,你摸两张牌,且你使用的下一张牌无距离和次数限制。',
|
||||
|
||||
sp_tianji:'天极·皇室宗亲',
|
||||
sp_sibi:'四弼·辅国文曲',
|
||||
|
|
11
game/game.js
11
game/game.js
|
@ -54681,8 +54681,8 @@
|
|||
_card.cards=cards.slice(0);
|
||||
if(!lib.suits.includes(_card.suit)) _card.suit=get.suit(_card);
|
||||
if(!Object.keys(lib.color).includes(_card.color)) _card.color=get.color(_card);
|
||||
if(!_card.hasOwnProperty('number')) _card.number=get.number(card);
|
||||
if(!_card.hasOwnProperty('nature')) _card.nature=get.nature(card);
|
||||
if(!_card.hasOwnProperty('number')) _card.number=get.number(_card);
|
||||
if(!_card.hasOwnProperty('nature')) _card.nature=(get.nature(_card)||false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56016,14 +56016,13 @@
|
|||
},
|
||||
number:function(card,player){
|
||||
//狗卡你是真敢出啊
|
||||
var number;
|
||||
var number=null;
|
||||
if(card.hasOwnProperty('number')){
|
||||
number=card.number;
|
||||
if(typeof number!='number') return null;
|
||||
if(typeof number!='number') number=null;
|
||||
}
|
||||
else{
|
||||
if(card.cards&&card.cards.length==1) return get.number(card.cards[0]);
|
||||
return null;
|
||||
if(card.cards&&card.cards.length==1) number=get.number(card.cards[0],false);
|
||||
}
|
||||
if(player!==false){
|
||||
var owner=player||get.owner(card);
|
||||
|
|
Loading…
Reference in New Issue