This commit is contained in:
parent
2872724ee5
commit
fd5a810b7b
|
@ -8,6 +8,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
audio:true,
|
audio:true,
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
type:"basic",
|
type:"basic",
|
||||||
|
toself:true,
|
||||||
enable:function(event,player){
|
enable:function(event,player){
|
||||||
return !player.hasSkill('jiu');
|
return !player.hasSkill('jiu');
|
||||||
},
|
},
|
||||||
|
|
|
@ -361,6 +361,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
|
toself:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target==player;
|
return target==player;
|
||||||
},
|
},
|
||||||
|
|
|
@ -299,6 +299,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
order:6,
|
order:6,
|
||||||
result:{
|
result:{
|
||||||
target:-1
|
target:-1
|
||||||
|
},
|
||||||
|
tag:{
|
||||||
|
multitarget:1,
|
||||||
|
multineg:1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -857,6 +861,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.hasSkill('xietianzi');
|
return player.hasSkill('xietianzi');
|
||||||
},
|
},
|
||||||
|
toself:true,
|
||||||
forced:true,
|
forced:true,
|
||||||
popup:false,
|
popup:false,
|
||||||
priority:-50,
|
priority:-50,
|
||||||
|
|
|
@ -43,6 +43,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
|
toself:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return player==target;
|
return player==target;
|
||||||
},
|
},
|
||||||
|
@ -340,6 +341,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
enable:true,
|
enable:true,
|
||||||
type:'trick',
|
type:'trick',
|
||||||
|
toself:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return player==target;
|
return player==target;
|
||||||
},
|
},
|
||||||
|
@ -363,6 +365,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
discard:false,
|
discard:false,
|
||||||
|
toself:true,
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target==player;
|
return target==player;
|
||||||
|
@ -475,6 +478,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
enable:true,
|
enable:true,
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
modTarget:true,
|
modTarget:true,
|
||||||
|
toself:true,
|
||||||
filterTarget:function(card,player,target){return player==target},
|
filterTarget:function(card,player,target){return player==target},
|
||||||
content:function(){
|
content:function(){
|
||||||
target.gainMaxHp();
|
target.gainMaxHp();
|
||||||
|
|
|
@ -272,6 +272,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
du:{
|
du:{
|
||||||
type:'basic',
|
type:'basic',
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
|
toself:true,
|
||||||
ai:{
|
ai:{
|
||||||
value:-5,
|
value:-5,
|
||||||
useful:6,
|
useful:6,
|
||||||
|
|
|
@ -202,6 +202,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
type:'basic',
|
type:'basic',
|
||||||
cardcolor:'red',
|
cardcolor:'red',
|
||||||
|
toself:true,
|
||||||
enable:function(card,player){
|
enable:function(card,player){
|
||||||
return player.hp<player.maxHp;
|
return player.hp<player.maxHp;
|
||||||
},
|
},
|
||||||
|
@ -774,6 +775,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
enable:true,
|
enable:true,
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
cardcolor:'red',
|
cardcolor:'red',
|
||||||
|
toself:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target==player;
|
return target==player;
|
||||||
},
|
},
|
||||||
|
|
|
@ -89,6 +89,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
|
toself:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target==player;
|
return target==player;
|
||||||
},
|
},
|
||||||
|
@ -1591,6 +1592,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
tianxianjiu:{
|
tianxianjiu:{
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
type:'basic',
|
type:'basic',
|
||||||
|
toself:true,
|
||||||
enable:function(event,player){
|
enable:function(event,player){
|
||||||
return !player.hasSkill('tianxianjiu');
|
return !player.hasSkill('tianxianjiu');
|
||||||
},
|
},
|
||||||
|
|
|
@ -310,6 +310,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
|
toself:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target==player;
|
return target==player;
|
||||||
},
|
},
|
||||||
|
|
|
@ -74,9 +74,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
zhangrang:['male','qun',3,['taoluan']],
|
zhangrang:['male','qun',3,['taoluan']],
|
||||||
sunziliufang:['male','wei',3,['guizao','jiyu']],
|
sunziliufang:['male','wei',3,['guizao','jiyu']],
|
||||||
|
|
||||||
xinxianying:['male','wei',3,[]],
|
xinxianying:['male','wei',3,['zhongjian','caishi']],
|
||||||
wuxian:['male','wei',3,[]],
|
wuxian:['male','shu',3,[]],
|
||||||
xushi:['male','wei',3,[]],
|
xushi:['male','wu',3,[]],
|
||||||
caojie:['male','wei',3,[]],
|
caojie:['male','wei',3,[]],
|
||||||
},
|
},
|
||||||
characterIntro:{
|
characterIntro:{
|
||||||
|
@ -165,6 +165,150 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
liuchen:['liushan'],
|
liuchen:['liushan'],
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
|
zhongjian:{
|
||||||
|
enable:'phaseUse',
|
||||||
|
usable:2,
|
||||||
|
filter:function(event,player){
|
||||||
|
if(!player.countCards('h')) return false;
|
||||||
|
if(player.getStat('skill').zhongjian&&!player.hasSkill('zhongjian2')) return false;
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
filterCard:true,
|
||||||
|
check:function(){
|
||||||
|
return Math.random();
|
||||||
|
},
|
||||||
|
discard:false,
|
||||||
|
lose:false,
|
||||||
|
filterTarget:function(card,player,target){
|
||||||
|
return target.countCards('h')>target.hp;
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
player.showCards(cards);
|
||||||
|
'step 1'
|
||||||
|
var num=target.countCards('h')-target.hp;
|
||||||
|
if(num<=0){
|
||||||
|
event.finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var hs=target.getCards('h').randomGets(num);
|
||||||
|
target.showCards(hs);
|
||||||
|
var colors=[];
|
||||||
|
var numbers=[];
|
||||||
|
for(var i=0;i<cards.length;i++){
|
||||||
|
colors.add(get.color(cards[i]));
|
||||||
|
numbers.add(get.number(cards[i]));
|
||||||
|
}
|
||||||
|
event.bool1=false;
|
||||||
|
event.bool2=false;
|
||||||
|
for(var i=0;i<hs.length;i++){
|
||||||
|
if(!event.bool1&&colors.contains(get.color(hs[i]))) event.bool1=true;
|
||||||
|
if(!event.bool2&&numbers.contains(get.number(hs[i]))) event.bool2=true;
|
||||||
|
}
|
||||||
|
'step 2'
|
||||||
|
if(event.bool1){
|
||||||
|
player.chooseControl(function(event,player){
|
||||||
|
return _status.event.bool?0:1;
|
||||||
|
}).set('bool',(get.attitude(player,target)>=0||player.countCards('h')<target.countCards('h'))).set('choiceList',['摸一张牌','弃置'+get.translation(target)+'一张牌']);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.goto(4);
|
||||||
|
}
|
||||||
|
'step 3'
|
||||||
|
if(result&&typeof result.index=='number'){
|
||||||
|
if(result.index==0) player.draw();
|
||||||
|
else player.discardPlayerCard(target,'he',true);
|
||||||
|
}
|
||||||
|
'step 4'
|
||||||
|
if(event.bool2){
|
||||||
|
player.addTempSkill('zhongjian2');
|
||||||
|
}
|
||||||
|
if(!event.bool1&&!event.bool2){
|
||||||
|
player.addTempSkill('zhongjian3');
|
||||||
|
player.popup('杯具');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
order:8,
|
||||||
|
result:{
|
||||||
|
player:function(player,target){
|
||||||
|
var num=target.countCards('h')-target.hp;
|
||||||
|
if(get.attitude(player,target)<0) return 1.5*num;
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
zhongjian2:{},
|
||||||
|
zhongjian3:{
|
||||||
|
mod:{
|
||||||
|
maxHandcard:function(player,num){
|
||||||
|
return num-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
caishi:{
|
||||||
|
trigger:{player:'phaseDrawBegin'},
|
||||||
|
direct:true,
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
if(player.isHealthy()){
|
||||||
|
event.type=0;
|
||||||
|
player.chooseBool(get.prompt('caishi'),'手牌上限+1,然后本回合你的牌不能对其他角色使用',function(){
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.type=1;
|
||||||
|
player.chooseControl('cancel2',function(){
|
||||||
|
return 1;
|
||||||
|
}).set('prompt',get.prompt('caishi')).set('choiceList',['手牌上限+1,然后本回合你的牌不能对其他角色使用','回复1点体力,然后本回合你的牌不能对自己使用']);
|
||||||
|
}
|
||||||
|
'step 1'
|
||||||
|
if(event.type){
|
||||||
|
if(result.control!='cancel2'){
|
||||||
|
player.logSkill('caishi');
|
||||||
|
if(result.index==0){
|
||||||
|
player.addTempSkill('caishi2');
|
||||||
|
}
|
||||||
|
else if(result.index==1){
|
||||||
|
player.recover();
|
||||||
|
player.addTempSkill('caishi3');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(result.bool){
|
||||||
|
player.logSkill('caishi');
|
||||||
|
player.addTempSkill('caishi2');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
caishi2:{
|
||||||
|
mod:{
|
||||||
|
maxHandcard:function(player,num){
|
||||||
|
return num+1;
|
||||||
|
},
|
||||||
|
playerEnabled:function(card,player,target){
|
||||||
|
if(player!=target) return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
caishi3:{
|
||||||
|
mod:{
|
||||||
|
playerEnabled:function(card,player,target){
|
||||||
|
if(player==target) return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ttt:{
|
||||||
|
mod:{
|
||||||
|
targetEnabled:function(card){
|
||||||
|
if(card.name=='tao') return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
jyzongshi:{
|
jyzongshi:{
|
||||||
audio:2,
|
audio:2,
|
||||||
trigger:{player:['chooseToCompareAfter','compareMultipleAfter'],target:['chooseToCompareAfter','compareMultipleAfter']},
|
trigger:{player:['chooseToCompareAfter','compareMultipleAfter'],target:['chooseToCompareAfter','compareMultipleAfter']},
|
||||||
|
@ -7453,6 +7597,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
xushi:'徐氏',
|
xushi:'徐氏',
|
||||||
caojie:'曹节',
|
caojie:'曹节',
|
||||||
|
|
||||||
|
zhongjian:'忠鉴',
|
||||||
|
zhongjian_info:'出牌阶段限一次,你可以展示一张手牌,然后展示手牌数大于体力值的一名其他角色X张手牌(X为其手牌数和体力值之差)。若以此法展示的牌与你展示的牌:有颜色相同的,你摸一张牌或弃置其一张牌;有点数相同的,本回合此技能改为“出牌阶段限两次”;均不同,你的手牌上限-1',
|
||||||
|
caishi:'才识',
|
||||||
|
caishi_info:'摸牌阶段开始时,你可以选择一项:1.手牌上限+1,然后本回合你的牌不能对其他角色使用;2.回复1点体力,然后本回合你的牌不能对自己使用',
|
||||||
guizao:'瑰藻',
|
guizao:'瑰藻',
|
||||||
guizao_info:'弃牌阶段结束时,若你于此阶段弃置牌的数量不小于2且它们的花色各不相同,你可以回复1点体力或摸一张牌',
|
guizao_info:'弃牌阶段结束时,若你于此阶段弃置牌的数量不小于2且它们的花色各不相同,你可以回复1点体力或摸一张牌',
|
||||||
jiyu:'讥谀',
|
jiyu:'讥谀',
|
||||||
|
|
|
@ -14306,7 +14306,8 @@
|
||||||
next.ai=arguments[i];
|
next.ai=arguments[i];
|
||||||
}
|
}
|
||||||
else if(typeof arguments[i]=='string'){
|
else if(typeof arguments[i]=='string'){
|
||||||
next.prompt=arguments[i];
|
if(next.prompt) next.prompt2=arguments[i];
|
||||||
|
else next.prompt=arguments[i];
|
||||||
}
|
}
|
||||||
else if(get.itemtype(arguments[i])=='dialog'){
|
else if(get.itemtype(arguments[i])=='dialog'){
|
||||||
next.dialog=arguments[i];
|
next.dialog=arguments[i];
|
||||||
|
@ -19394,6 +19395,7 @@
|
||||||
return (_status.event._aiexclude.contains(card)==false);
|
return (_status.event._aiexclude.contains(card)==false);
|
||||||
},
|
},
|
||||||
filterCard:function(card,player,event){
|
filterCard:function(card,player,event){
|
||||||
|
if(get.info(card).toself&&!lib.filter.targetEnabled(card,player,player)) return false;
|
||||||
return (lib.filter.cardEnabled(card,player,event)&&
|
return (lib.filter.cardEnabled(card,player,event)&&
|
||||||
lib.filter.cardUsable(card,player,event));
|
lib.filter.cardUsable(card,player,event));
|
||||||
},
|
},
|
||||||
|
@ -26467,6 +26469,7 @@
|
||||||
};
|
};
|
||||||
if(card.modTarget==undefined) card.modTarget=true;
|
if(card.modTarget==undefined) card.modTarget=true;
|
||||||
if(card.content==undefined) card.content=lib.element.content.equipCard;
|
if(card.content==undefined) card.content=lib.element.content.equipCard;
|
||||||
|
if(card.toself==undefined) card.toself=true;
|
||||||
if(card.ai==undefined) card.ai={basic:{}};
|
if(card.ai==undefined) card.ai={basic:{}};
|
||||||
if(card.ai.basic==undefined) card.ai.basic={};
|
if(card.ai.basic==undefined) card.ai.basic={};
|
||||||
if(card.ai.result==undefined) card.ai.result={target:1.5};
|
if(card.ai.result==undefined) card.ai.result={target:1.5};
|
||||||
|
|
Loading…
Reference in New Issue