noname/card/guozhan.js

265 lines
6.7 KiB
JavaScript
Raw Normal View History

2015-05-14 09:23:45 +00:00
'use strict';
2015-04-29 03:25:17 +00:00
card.guozhan={
2016-04-19 08:57:06 +00:00
connect:true,
2015-04-29 03:25:17 +00:00
card:{
yuanjiao:{
2015-11-01 07:54:42 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
fullskin:true,
type:'trick',
enable:true,
filterTarget:function(card,player,target){
2016-04-19 08:57:06 +00:00
if(get.mode()!='guozhan') return player!=target;
2015-04-29 03:25:17 +00:00
if(target.identity=='unknown'||player.identity=='unknown') return false;
if(player==target) return false;
if(player.identity=='ye') return true;
return player.identity!=target.identity;
},
2016-05-11 15:50:00 +00:00
multitarget:true,
2015-04-29 03:25:17 +00:00
content:function(){
2016-04-19 08:57:06 +00:00
game.asyncDraw([target,player],[1,get.mode()=='guozhan'?3:1]);
2015-04-29 03:25:17 +00:00
},
ai:{
basic:{
useful:4,
value:8,
order:9
},
result:{
target:1,
player:3,
},
},
},
zhibi:{
2015-11-01 07:54:42 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
fullskin:true,
type:'trick',
enable:true,
chongzhu:true,
filterTarget:function(card,player,target){
if(player==target) return false;
return (target.get('h').length||
target.classList.contains('unseen')||
target.classList.contains('unseen2'))
},
content:function(){
"step 0"
if(!player.storage.zhibi){
player.storage.zhibi=[];
}
2016-04-19 08:57:06 +00:00
player.storage.zhibi.add(target);
2015-04-29 03:25:17 +00:00
var controls=[];
if(target.get('h').length) controls.push('手牌');
if(target.classList.contains('unseen')) controls.push('主将');
if(target.classList.contains('unseen2')) controls.push('副将');
if(controls.length>1){
player.chooseControl(controls);
}
if(controls.length==0) event.finish();
"step 1"
var content;
2016-04-19 08:57:06 +00:00
var str=get.translation(target)+'的';
2015-04-29 03:25:17 +00:00
if(result.control){
2016-04-19 08:57:06 +00:00
if(result.control=='手牌') content=[str+'手牌',target.get('h')];
else if(result.control=='主将') content=[str+'主将',[[target.name1],'character']];
else content=[str+'副将',[[target.name2],'character']];
2015-04-29 03:25:17 +00:00
}
else if(target.get('h').length){
2016-04-19 08:57:06 +00:00
content=[str+'手牌',target.get('h')];
2015-04-29 03:25:17 +00:00
}
else if(target.classList.contains('unseen')){
2016-04-19 08:57:06 +00:00
content=[str+'主将',[[target.name1],'character']];
2015-04-29 03:25:17 +00:00
}
else{
2016-04-19 08:57:06 +00:00
content=[str+'副将',[[target.name2],'character']];
2015-04-29 03:25:17 +00:00
}
2016-04-19 08:57:06 +00:00
player.chooseControl('ok').set('dialog',content);
2015-04-29 03:25:17 +00:00
},
mode:['guozhan'],
ai:{
order:9.5,
2016-04-19 08:57:06 +00:00
wuxie:function(){
return 0;
},
2015-04-29 03:25:17 +00:00
result:{
player:function(player,target){
if(player.num('h')<=player.hp) return 0;
if(player.storage.zhibi&&player.storage.zhibi.contains(target)) return 0;
return target.isUnseen()?1:0;
}
}
}
},
yiyi:{
2015-11-01 07:54:42 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
fullskin:true,
type:'trick',
enable:true,
filterTarget:function(card,player,target){
2016-04-19 08:57:06 +00:00
if(get.mode()=='guozhan'){
2016-03-21 09:05:16 +00:00
if(player.identity=='unknown'||player.identity=='ye') return player==target;
return player.identity==target.identity;
}
else{
return true;
}
},
selectTarget:function(){
2016-04-19 08:57:06 +00:00
if(get.mode()=='guozhan') return -1;
2016-03-21 09:05:16 +00:00
return [1,3];
2015-04-29 03:25:17 +00:00
},
content:function(){
2016-03-21 09:05:16 +00:00
target.draw(2);
2015-04-29 03:25:17 +00:00
target.chooseToDiscard(2,'he',true).ai=ai.get.disvalue;
},
ai:{
2015-05-14 09:23:45 +00:00
wuxie:function(){
2016-03-22 06:45:57 +00:00
return 0;
},
2015-04-29 03:25:17 +00:00
basic:{
2016-03-21 09:05:16 +00:00
useful:3,
value:3,
order:5
2015-04-29 03:25:17 +00:00
},
result:{
target:function(player,target){
if(target.num('h')<=1){
2016-03-21 09:05:16 +00:00
if(target==player){
return 0;
}
return 0.3;
2015-04-29 03:25:17 +00:00
}
return 1;
},
},
},
// mode:['guozhan'],
},
wuliu:{
fullskin:true,
type:'equip',
subtype:'equip1',
distance:{attackFrom:-1},
ai:{
basic:{
equipValue:function(card,player){
if(player.identity=='unknown'||player.identity=='ye') return 2.5;
var num=2;
for(var i=0;i<game.players.length;i++){
if(game.players[i].identity==player.identity) num+=0.5;
}
return num;
}
}
},
skills:['wuliu_skill'],
mode:['guozhan'],
},
sanjian:{
fullskin:true,
type:'equip',
subtype:'equip1',
distance:{attackFrom:-2},
ai:{
basic:{
equipValue:4
}
},
skills:['sanjian_skill']
},
jingfanma:{
fullskin:true,
type:'equip',
subtype:'equip4',
distance:{globalFrom:-1},
},
},
skill:{
2016-02-18 06:22:24 +00:00
wuliu_skill:{},
_wuliu_skill2:{
2015-04-29 03:25:17 +00:00
mod:{
attackFrom:function(from,to,distance){
for(var i=0;i<game.players.length;i++){
if(game.players[i]==from) continue;
if(game.players[i].identity=='unknown'||game.players[i].identity=='ye') continue;
if(game.players[i].identity!=from.identity) continue;
2016-04-19 08:57:06 +00:00
if(game.players[i].num('e','wuliu')) distance--;
2015-04-29 03:25:17 +00:00
}
return distance;
}
}
},
sanjian_skill:{
2015-05-14 09:23:45 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
trigger:{source:'damageAfter'},
direct:true,
filter:function(event,player){
if(player.num('h')==0) return false;
if(!event.card) return false;
if(event.card.name!='sha') return false;
var num=0;
for(var i=0;i<game.players.length;i++){
2016-04-19 08:57:06 +00:00
if(game.players[i]!=event.player&&get.distance(event.player,game.players[i])<=1) num++;
2015-04-29 03:25:17 +00:00
}
2016-04-19 08:57:06 +00:00
return num>0;
2015-04-29 03:25:17 +00:00
},
content:function(){
"step 0"
var damaged=trigger.player;
player.chooseCardTarget({
filterTarget:function(card,player,target){
2016-04-19 08:57:06 +00:00
var damaged=_status.event.damaged;
2015-04-29 03:25:17 +00:00
return get.distance(damaged,target)<=1&&target!=damaged;
},
ai1:function(card){
return 9-ai.get.value(card);
},
ai2:function(target){
2016-04-19 08:57:06 +00:00
var player=_status.event.player;
2015-04-29 03:25:17 +00:00
return ai.get.damageEffect(target,player,player);
},
2016-06-08 07:45:01 +00:00
prompt:'是否发动【三尖两刃刀】?'
2016-04-19 08:57:06 +00:00
}).set('damaged',damaged);
2015-04-29 03:25:17 +00:00
"step 1"
if(result.bool){
2015-12-31 07:03:13 +00:00
player.logSkill('sanjian_skill',result.targets);
2015-04-29 03:25:17 +00:00
player.discard(result.cards);
result.targets[0].damage();
}
}
},
},
translate:{
yuanjiao:'远交近攻',
yuanjiao_info:'对一名不同势力的角色使用对方摸一张牌然后你摸3张牌非国战模式中改为摸1张',
yuanjiao_bg:'交',
zhibi:'知己知彼',
zhibi_info:'出牌阶段对一名其他角色使用,观看其手牌或装备牌',
yiyi:'以逸待劳',
2016-03-21 09:05:16 +00:00
yiyi_info:'对与自己势力相同的所有角色使用,摸两张牌然后弃置两张牌(非国战模式改为任意指定三名角色)',
2015-04-29 03:25:17 +00:00
yiyi_bg:'逸',
wuliu:'吴六剑',
2016-02-18 06:22:24 +00:00
wuliu_info:'其他与装备者势力相同的角色攻击范围+1',
2015-04-29 03:25:17 +00:00
sanjian:'三尖两刃刀',
sanjian_info:'当你使用杀造成伤害后可以弃置1张手牌对一名距离受伤害角色1以内的其他角色造成1点伤害',
wuliu_skill:'吴六剑',
sanjian_skill:'三尖两刃刀',
jingfanma_bg:'-马',
jingfanma:'惊帆',
2016-02-04 06:55:02 +00:00
jingfanma_info:'其他角色与你的距离-1',
2015-04-29 03:25:17 +00:00
},
list:[
['heart',9,'yuanjiao'],
['club',3,'zhibi'],
['club',4,'zhibi'],
['diamond',4,'yiyi'],
['heart',11,'yiyi'],
['diamond',6,'wuliu'],
['diamond',12,'sanjian'],
['heart',3,'jingfanma'],
2015-09-16 07:31:41 +00:00
["spade",4,'shunshou'],
["spade",12,'guohe'],
["spade",11,'wuxie'],
2015-04-29 03:25:17 +00:00
],
}