This commit is contained in:
libccy 2017-02-09 18:51:08 +08:00
parent c301b28b50
commit 6709fd635d
6 changed files with 105 additions and 84 deletions

View File

@ -413,58 +413,45 @@ card.hearth={
tanshezhiren:{
fullskin:true,
type:'trick',
enable:function(card,player){
if(game.players.length<3) return false;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&game.players[i].num('h')) return true;
}
return false;
},
enable:true,
chongzhu:true,
filterTarget:function(card,player,target){
return target.num('h')>0&&target!=player;
return target==player;
},
selectTarget:-1,
multitarget:true,
multiline:true,
modTarget:true,
content:function(){
'step 0'
for(var i=0;i<targets.length;i++){
if(!targets[i].num('h')) targets.splice(i--,1);
event.current=target;
event.num=game.players.length;
if(event.num%2==0){
event.num--;
}
if(targets.contains(player)){
event.current=player;
}
else{
event.current=targets.randomGet();
}
if(!targets.length) event.finish();
event.num=0;
'step 1'
var current;
if(targets.length>1){
current=targets.randomGet(event.current);
event.current.line(current);
if(event.num){
var enemies=event.current.getEnemies();
for(var i=0;i<enemies.length;i++){
if(!enemies[i].num('h')){
enemies.splice(i--,1);
}
else{
current=targets[0];
}
var hs=current.get('h');
if(hs.length){
current.discard(hs.randomGet());
}
if(hs.length>1){
event.current=current;
event.num++;
if(event.num<10){
if(enemies.length){
var enemy=enemies.randomGet();
event.current.line(enemy);
enemy.discard(enemy.get('h').randomGet());
event.current=enemy;
event.num--;
event.redo();
}
}
},
ai:{
order:8,
order:1.5,
wuxie:function(){
return 0;
},
result:{
target:-1
player:1
},
tag:{
multineg:1,
@ -689,7 +676,7 @@ card.hearth={
xingjiegoutong:'星界沟通',
xingjiegoutong_info:'增加一点体力上限并回复一点体力,弃置你的所有手牌',
tanshezhiren:'弹射之刃',
tanshezhiren_info:'限场存活角色不小于3时使用弃置一名随机角色不含你的手牌重复此过程直到有一名角色失去最后一张手牌最多重复10次',
tanshezhiren_info:'出牌阶段对自己使用第一次结算时随机弃置一名使用者的敌人的一张手牌从第二次结算开始每次随机弃置一名上一次被弃牌角色的敌人的一张手牌共结算X次X为存活角色数若X为偶数改为X-1',
chuansongmen:'传送门',
chuansongmen_info:'摸一张牌并展示若发生在出牌阶段你可以立即使用摸到的牌若如此做你将传送门收回手牌每阶段最多收回2张传送门',
dunpaigedang:'盾牌格挡',

View File

@ -75,6 +75,7 @@ card.sp={
chongzhu:function(){
return game.players.length<=2;
},
singleCard:true,
type:'trick',
selectTarget:2,
multitarget:true,
@ -88,8 +89,8 @@ card.sp={
event.finish();
}
else{
event.target1=targets[0];
event.target2=targets[1];
event.target1=target;
event.target2=event.addedTarget;
player.chooseCard('h','将一张手牌交给'+get.translation(event.target1),true);
}
'step 1'
@ -598,7 +599,7 @@ card.sp={
du:'毒',
du_info:'当你因使用、打出或弃置而失去此牌时,你失去一点体力',
shengdong:'声东击西',
shengdong_info:'出牌阶段,对一名其他角色使用。你交给目标角色一张手牌,若如此做,其将两张牌交给另一名由你选择的其他角色(存活角色不超过2时可重铸',
shengdong_info:'出牌阶段,对一名其他角色使用。你交给目标角色一张手牌,若如此做,其将两张牌交给另一名由你选择的其他角色(不足则全给,存活角色不超过2时可重铸',
zengbin:'增兵减灶',
zengbin_info:'出牌阶段对一名角色使用。目标角色摸三张牌然后选择一项1.弃置一张非基本牌2.弃置两张牌',
caomu:'草木皆兵',

View File

@ -1029,6 +1029,7 @@ card.standard={
type:'trick',
enable:true,
selectTarget:2,
singleCard:true,
multitarget:true,
targetprompt:['被借刀','出杀目标'],
filterTarget:function(card,player,target){
@ -1041,12 +1042,12 @@ card.standard={
},
content:function(){
"step 0"
if(!targets[0].hasSha()){
if(!target.hasSha()){
event.directfalse=true;
}
else{
targets[0].chooseToUse('对'+get.translation(targets[1])+'使用一张杀,或令'+get.translation(player)+'获得你的武器牌',
{name:'sha'},targets[1],-1).set('targetRequired',true);
target.chooseToUse('对'+get.translation(event.addedTarget)+'使用一张杀,或令'+get.translation(player)+'获得你的武器牌',
{name:'sha'},event.addedTarget,-1).set('targetRequired',true);
}
"step 1"
if(event.directfalse||result.bool==false){

View File

@ -263,27 +263,25 @@ card.yunchou={
},
multitarget:true,
multiline:true,
singleCard:true,
content:function(){
'step 0'
targets[0].chooseToCompare(targets[1]);
target.chooseToCompare(event.addedTarget);
'step 1'
if(!result.tie){
if(result.bool){
targets[0].gainPlayerCard(targets[1],true);
targets[0].line(targets[1]);
target.gainPlayerCard(event.addedTarget,true);
target.line(targets[1]);
}
else{
targets[1].gainPlayerCard(targets[0],true);
targets[1].line(targets[0]);
event.addedTarget.gainPlayerCard(target,true);
event.addedTarget.line(target);
}
event.finish();
}
'step 2'
targets[0].discardPlayerCard(player);
targets[0].line(player);
'step 3'
targets[1].discardPlayerCard(player);
targets[1].line(player);
target.discardPlayerCard(player);
target.line(player);
},
selectTarget:2,
ai:{
@ -560,6 +558,7 @@ card.yunchou={
fullskin:true,
type:'trick',
enable:true,
singleCard:true,
filterTarget:function(card,player,target){
if(target.isMin()) return false;
if(ui.selected.targets.length){
@ -572,9 +571,9 @@ card.yunchou={
selectTarget:2,
multitarget:true,
content:function(){
if(targets[0].get('e','5')){
targets[0].$give(targets[0].get('e','5'),targets[1]);
targets[1].equip(targets[0].get('e','5'));
if(target.get('e','5')){
target.$give(target.get('e','5'),event.addedTarget);
event.addedTarget.equip(target.get('e','5'));
game.delay();
}
},
@ -671,33 +670,35 @@ card.yunchou={
},
selectTarget:2,
multitarget:true,
singleCard:true,
targetprompt:['被拿牌','得牌'],
content:function(){
"step 0"
targets[0].addTempSkill('toulianghuanzhu2','phaseAfter');
var hs=targets[0].get('h');
target.addTempSkill('toulianghuanzhu2','phaseAfter');
var hs=target.get('h');
event.num=Math.min(2,hs.length);
if(event.num){
targets[1].gain(hs.randomGets(event.num),targets[0]);
targets[0].$give(event.num,targets[1]);
var gived=hs.randomGets(event.num);
event.addedTarget.gain(gived,target);
target.$giveAuto(gived,event.addedTarget);
game.delay();
}
else{
event.finish();
}
"step 1"
if(targets[1].num('h')){
if(_status.auto&&targets[1]==game.me){
if(event.addedTarget.num('h')){
if(_status.auto&&event.addedTarget==game.me){
game.delay();
}
targets[1].chooseCard(true,event.num,'选择'+get.cnNumber(event.num)+'张手牌还给'+get.translation(targets[0])).ai=ai.get.disvalue;
event.addedTarget.chooseCard(true,event.num,'选择'+get.cnNumber(event.num)+'张手牌还给'+get.translation(target)).ai=ai.get.disvalue;
}
else{
event.finish();
}
"step 2"
targets[0].gain(result.cards,targets[1]);
targets[1].$give(event.num,targets[0]);
target.gain(result.cards,event.addedTarget);
event.addedTarget.$give(event.num,target);
},
ai:{
order:6.5,
@ -1220,12 +1221,12 @@ card.yunchou={
suolianjia_info:'锁定技,你防止即将受到的属性伤害,当装备时进入连环状态,当卸下时解除连环状态',
suolianjia_bg:'链',
geanguanhuo:'隔岸观火',
geanguanhuo_info:'出牌阶段对两名其他角色使用,令目标拼点,赢的角色获得另一方的一张牌;若点数相同,两名目标可分别弃置你一张牌',
geanguanhuo_info:'出牌阶段对一名其他角色使用,令目标与一名你指定的另一名角色拼点,赢的角色获得对方的一张牌;若点数相同,目标可弃置你一张牌',
toulianghuanzhu:'偷梁换柱',
toulianghuanzhu_info:'令一名角色获得另一名角色的两张手牌,然后还回两张手牌',
toulianghuanzhu_info:'出牌阶段对一名有手牌的角色使用,选择另一名角色获得目标两张手牌(不足则全拿),然后还给其等量手牌',
toulianghuanzhu_bg:'柱',
yihuajiemu:'移花接木',
yihuajiemu_info:'将一名角色的宝物牌转移至另一名角色',
yihuajiemu_info:'对一名装备区内有宝物的角色使用,将其宝物牌转移至另一名角色',
fudichouxin:'釜底抽薪',
fudichouxin_info:'与一名角色进行拼点,若成功则获得双方拼点牌',
shuiyanqijun:'水攻',

View File

@ -4578,7 +4578,7 @@ character.yijiang={
position:'he',
filterCard:true,
selectCard:2,
prompt:'弃置任意张牌并摸等量的牌',
prompt:'弃置两张牌并摸一张牌',
check:function(card){return 4-ai.get.useful(card)},
content:function(){
player.draw();
@ -6002,9 +6002,8 @@ character.yijiang={
}
}
if(cards.length){
player.gain(cards);
player.gain(cards,'log');
player.$gain2(cards);
game.log(player,'发动','【落英】',',获得了',cards);
}
},
},
@ -6021,7 +6020,7 @@ character.yijiang={
return (get.suit(event.result.card)=='club');
},
content:function(){
player.gain(trigger.result.card);
player.gain(trigger.result.card,'log');
player.$gain2(trigger.result.card);
}
},

View File

@ -5802,7 +5802,7 @@
game.reload();
},
uj:function(){
cheat.ge('qilin');
cheat.e('qilin');
game.me.next.useCard({name:'jiedao'},[game.me,game.me.previous]);
},
u:function(){
@ -8297,7 +8297,10 @@
(card.classList&&card.classList.contains('thunder'))){
config.color='thunder';
}
if(get.info(card).multitarget&&targets.length>1&&!get.info(card).multiline){
if(event.addedTarget){
player.line2(targets.concat(event.addedTargets),config);
}
else if(get.info(card).multitarget&&targets.length>1&&!get.info(card).multiline){
player.line2(targets,config);
}
else{
@ -8337,11 +8340,21 @@
}
str+='使用了';
if(cards.length&&(cards.length>1||cards[0]!=card)){
if(event.addedTarget){
game.log(player,str,card,'',cards,',指向',event.addedTargets,'');
}
else{
game.log(player,str,card,'',cards,'');
}
}
else{
if(event.addedTarget){
game.log(player,str,card,'(指向',event.addedTargets,'');
}
else{
game.log(player,str,card);
}
}
if(card.name=='wuxie'){
game.logv(player,[card,cards],[event.getTrigger().card]);
}
@ -8409,6 +8422,10 @@
next.skill=event.skill;
next.multitarget=info.multitarget;
next.preResult=event.preResult;
if(event.addedTargets){
next.addedTargets=event.addedTargets;
next.addedTarget=event.addedTarget;
}
if(info.targetDelay===false){
event.targetDelay=false;
}
@ -11226,8 +11243,20 @@
if(!next.targets){
next.targets=[];
}
if(next.card&&get.info(next.card)&&get.info(next.card).changeTarget){
get.info(next.card).changeTarget(next.player,next.targets);
if(next.card){
var info=get.info(next.card);
if(info){
if(info.changeTarget){
info.changeTarget(next.player,next.targets);
}
if(info.singleCard){
next.target=next.targets[0];
next.addedTargets=next.targets.splice(1);
if(next.addedTargets.length){
next.addedTarget=next.addedTargets[0];
}
}
}
}
for(var i=0;i<next.targets.length;i++){
if(ai.get.attitude(this,next.targets[i])>=-1&&ai.get.attitude(this,next.targets[i])<0){
@ -15437,11 +15466,14 @@
},
targetEnabled:function(card,player,target){
if(card==undefined) return false;
var filter=get.info(card).filterTarget;
var info=get.info(card);
var filter=info.filterTarget;
var mod=game.checkMod(card,player,target,'unchanged','playerEnabled',player.get('s'));
if(mod==false) return false;
if(!info.singleCard||ui.selected.targets.length==0){
var mod=game.checkMod(card,player,target,'unchanged','targetEnabled',target.get('s'));
if(mod!='unchanged') return mod;
}
if(typeof filter=='boolean') return filter;
if(typeof filter=='function') return filter(card,player,target);
},