This commit is contained in:
libccy 2017-05-19 13:56:04 +08:00
parent 4bb24cffcd
commit 0703d1ba80
12 changed files with 137 additions and 48 deletions

View File

@ -853,7 +853,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target.gain(list,'gain2');
},
ai:{
order:1,
order:4.5,
value:[5,1],
tag:{
gain:1
},
result:{
target:function(player,target){
if(target==player){

View File

@ -401,6 +401,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return !current.isUnseen();
},'list').randomSort(),function(current){
var att=get.attitude(player,current);
if(att<0&&current.isDamaged()&&current.hp<=3){
return -10;
}
var rank=get.rank(current,true);
if(current.maxHp>=3){
if(current.hp<=1){
@ -542,15 +545,14 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(max!=min&&max!=null&&min!=null){
for(var i=0;i<targets.length;i++){
if(targets[i].hp==max){
targets[i].hp=min;
targets[i].$damagepop(min-max);
targets[i].hp--;
targets[i].maxHp--;
targets[i].$damagepop(-1);
}
else if(targets[i].hp==min){
targets[i].hp=max;
targets[i].$damagepop(max-min,'wood');
if(targets[i].maxHp<targets[i].hp){
targets[i].maxHp=targets[i].hp;
}
targets[i].hp++;
targets[i].maxHp++;
targets[i].$damagepop(1,'wood');
}
targets[i].update();
}
@ -1277,10 +1279,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
intro:{
content:function(storage,player){
if(storage>=2){
return '在每个准备阶段令牌数为全场最多的所有其他角色各随机弃置一张牌(重复'+storage+'次)';
return '锁定技,准备阶段,你令手牌数为全场最多的所有其他角色各随机弃置一张若目标不包含敌方角色将一名随机敌方角色追加为额外目标结算X次(重复'+storage+'次)';
}
else{
return '在每个准备阶段令牌数为全场最多的所有其他角色各随机弃置一张牌';
return '锁定技,准备阶段,你令手牌数为全场最多的所有其他角色各随机弃置一张若目标不包含敌方角色将一名随机敌方角色追加为额外目标结算X次';
}
}
},
@ -1290,7 +1292,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
var list=game.filterPlayer();
for(var i=0;i<list.length;i++){
if(list[i]!=player&&list[i].isMaxCard()) return true;
if(list[i]!=player&&list[i].isMaxHandcard()) return true;
}
return false;
},
@ -1307,8 +1309,17 @@ game.import('card',function(lib,game,ui,get,ai,_status){
var max=0;
var maxp=null;
var list=game.filterPlayer(function(current){
return current.isMaxCard();
return current.isMaxHandcard();
}).sortBySeat();
var enemies=player.getEnemies();
for(var i=0;i<enemies.length;i++){
if(list.contains(enemies[i])){
break;
}
}
if(i==enemies.length){
list.push(enemies.randomGet());
}
list.remove(player);
if(!list.length){
event.finish();
@ -1316,7 +1327,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
player.line(list,'green');
for(var i=0;i<list.length;i++){
list[i].randomDiscard(false);
list[i].randomDiscard('h',false);
}
}
else{
@ -1416,7 +1427,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
gw_yigeniyin:'伊格尼印',
gw_yigeniyin_info:'对敌方角色中体力值最大的一名随机角色造成一点火焰伤害,然后对场上体力值最大的所有角色各造成一点火焰伤害,然后结束出牌阶段',
gw_leizhoushu:'雷咒术',
gw_leizhoushu_info:'获得技能雷咒术(在每个准备阶段令全场牌数最多的所有其他角色各随机弃置一张牌,重复获得时效果叠加),然后结束出牌阶段',
gw_leizhoushu_info:'获得技能雷咒术(在每个准备阶段令全场牌数最多的所有其他角色各随机弃置一张牌,若目标不包含敌方角色将一名随机敌方角色追加为额外目标结算X次X为本局获得此技能的次数),然后结束出牌阶段',
gw_aerdeyin:'阿尔德印',
gw_aerdeyin_info:'对相邻的角色造成一点伤害,目标摸一张牌并移出游戏一轮,然后结束出牌阶段',
gw_xinsheng:'新生',
@ -1428,7 +1439,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
gw_zhihuanjun:'致幻菌',
gw_zhihuanjun_info:'出牌阶段对一名已受伤角色使用,令其减少一点体力上限',
gw_niuquzhijing:'纽曲之镜',
gw_niuquzhijing_info:'交换全场体力值最大和最小角色的体力值(不触发技能),然后结束出牌阶段',
gw_niuquzhijing_info:'令全场体力最多的角色减少一点体力和体力上限,体力最少的角色增加一点体力和体力上限(不触发技能),然后结束出牌阶段',
gw_ansha:'暗杀',
gw_ansha_info:'令一名体力为1的随机敌方角立即死亡然后结束出牌阶段',
gw_shizizhaohuan:'十字召唤',

View File

@ -163,8 +163,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
'step 2'
game.delay(0.5);
'step 3'
if(target.countCards('h')){
target.chooseToDiscard('h',true);
if(target.countCards('he')){
target.chooseToDiscard('he',true);
}
},
ai:{
@ -173,7 +173,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
useful:2,
result:{
target:function(player,target){
return Math.max(0,2-target.countCards('e'))+(target.countCards('h')?0:0.5);
return Math.max(0,2-target.countCards('e'));
},
},
tag:{
@ -692,7 +692,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
shandianjian:'闪电箭',
shandianjian_info:'目标角色展示一张手牌然后若你能弃掉一张与所展示牌相同花色的手牌则对该角色造成1点雷电伤害。',
shijieshu:'视界术',
shijieshu_info:'目标随机装备两张装备牌,然后弃置一张牌',
shijieshu_info:'目标随机装备两张装备牌,然后弃置一张牌',
zhaomingdan:'照明弹',
zhaomingdan_info:'观看一名其他角色的手牌,并弃置其区域内的一张牌,然后其与你各摸一张牌',
jihuocard:'激活',

View File

@ -936,7 +936,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
ai:{
order:10,
value:6,
value:7,
useful:1,
tag:{
draw:2

View File

@ -253,10 +253,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
player:function(card,player){
if(_status.currentPhase!=player) return;
if(get.type(card)=='basic'||get.type(card,'trick')=='trick') return;
if(get.type(card)=='basic') return;
if(get.tag(card,'gain')) return;
if(get.value(card,player,'raw')>=7) return;
if(player.hp<=2) return;
if(!player.hasSkill('jilue')||player.storage.renjie==0){
return [0,0,0,0];
return 'zeroplayertarget';
}
}
}

View File

@ -1430,7 +1430,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
effect:{
player:function(card,player,target){
if(get.tag(card,'damage')&&get.attitude(player,target)>0){
if(target.hp==target.maxHp) return [0,0,0,0];
if(target.hp==target.maxHp||get.recoverEffect(target,player,player)<=0) return 'zeroplayertarget';
return [0,0,0,1];
}
}

View File

@ -9178,7 +9178,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
for(var i=0;i<players.length;i++){
if(get.attitude(player,players[i])<0){
num++;
if(num>1) return [0,0,0,0];
if(num>1) return 'zeroplayertarget';
}
}
}

View File

@ -43,7 +43,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
pal_yuejinzhao:['male','wei',4,['ywuhun','yingfeng']],
pal_yueqi:['female','wei',3,['tianwu','liguang','shiying']],
pal_mingxiu:['female','shu',3,['linghuo','guijin','chengxin']],
pal_xianqing:['male','qun',4,['zisha','xtanxi']],
pal_xianqing:['male','qun',4,['xtanxi','xiaoyue']],
pal_luozhaoyan:['female','shu',4,['fenglue','tanhua']],
pal_jushifang:['male','shu',3,['yujia','xiepan','yanshi']],
},
@ -85,13 +85,70 @@ game.import('character',function(lib,game,ui,get,ai,_status){
pal_jiangcheng:'折剑山庄庄主欧阳英的得意门生,但因其蚩尤后人魔族的身份,令他无法被容于人界;再加上人界半魔同族饱受人类迫害,故最终成为净天教教主魔君“姜世离”,毅然肩负起保护同族的重任。',
},
skill:{
xiaoyue:{
trigger:{global:'roundStart'},
forced:true,
filter:function(event,player){
return player.countCards('h','sha');
},
content:function(){
'step 0'
event.num=0;
'step 1'
var card=player.get('h','sha').randomGet();
var target=player.getEnemies().randomGet();
if(card&&target){
event.num++;
target.addExpose(0.1);
player.useCard(card,target);
event.redo();
}
'step 2'
if(event.num){
player.draw(event.num);
}
},
ai:{
effect:{
player:function(card,player){
if(_status.currentPhase!=player) return;
if(card.name=='sha'&&get.itemtype(card)=='card'&&!player.needsToDiscard()){
return 'zeroplayertarget';
}
}
},
}
},
xiaoyue2:{
mod:{
cardRespondable:function(card,player){
if(_status.event.getParent(4).name=='xiaoyue'&&get.suit(card)!='heart') return false;
}
}
},
huanlei:{
trigger:{player:'damageEnd'},
check:function(event,player){
return get.damageEffect(event.source,player,player,'thunder')>0;
},
filter:function(event,player){
return event.source&&event.source.isIn()&&event.source.hp>player.hp;
},
logTarget:'source',
content:function(){
'step 0'
trigger.source.damage('thunder');
'step 1'
trigger.source.draw();
}
},
zisha:{
trigger:{source:'damageEnd'},
check:function(event,player){
return get.attitude(player,event.player)<0&&!event.player.hasSkill('zisha2');
return get.attitude(player,event.player)<0;
},
filter:function(event,player){
return event.player!=player&&event.player.isIn();
return event.player!=player&&event.player.isIn()&&!event.player.hasSkill('zisha2');
},
logTarget:'player',
content:function(){
@ -102,7 +159,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
mod:{
cardEnabled:function(card,player){
if(_status.currentPhase!=player) return;
if(get.cardCount(true,player)>=2) return false;
if(get.cardCount(true,player)>=player.storage.zisha2) return false;
},
maxHandcard:function(player,num){
return num-1;
@ -110,10 +167,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
mark:true,
intro:{
content:'手牌上限-1且每回合最多使用张牌(剩余$回合)'
content:'手牌上限-1且每回合最多使用$张牌(剩余$回合)'
},
init:function(player){
player.storage.zisha2=2;
player.storage.zisha2=3;
},
trigger:{player:'phaseAfter'},
forced:true,
@ -156,13 +213,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 0;
},
content:function(){
var targets=player.getEnemies().sortBySeat();
var list=[];
player.addExpose(0.1);
var targets=player.getEnemies();
for(var i=0;i<targets.length;i++){
list[i]=targets[i].getCards('h',cards[0].name).randomGet()||null;
if(!targets[i].countCards('h',cards[0].name)){
targets.splice(i--,1);
}
}
if(targets.length){
var target=targets.randomGet();
player.line(target,'green');
target.addExpose(0.1);
player.gainPlayerCard(target,'h','visible');
}
player.gainMultiple(targets,list,'give');
player.line(targets,'green');
},
ai:{
order:4,
@ -2762,7 +2825,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(lib.filter.targetEnabled({name:'sha'},player,players[i])&&
get.attitude(player,players[i])<0){
num++;
if(num>1) return [0,0,0,0];
if(num>1) return 'zeroplayertarget';
}
}
}
@ -2934,7 +2997,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
types.add(get.type(player.storage.shuiyun[i],'trick'));
}
if(!types.contains(get.type(card,'trick'))){
return [0,0,0,0];
return 'zeroplayertarget';
}
}
}
@ -3997,11 +4060,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
pal_mingxiu:'明绣',
pal_jushifang:'居十方',
xiaoyue:'啸月',
xiaoyue_info:'锁定技,每轮开始时,若你手牌中有杀,你将手牌中的杀依次对随机敌方角色使用,然后摸等量的牌',
leiyin:'雷印',
leiyin_info:'出牌阶段限一次你可以弃置两张手牌并对一名体力值不小于你的随机敌方角色造成一点雷属性伤害然后距离目标1以内的所有其他角色随机弃置一张手牌',
xhuanlei:'唤雷',
xhuanlei_info:'每当你受到一次伤害,若伤害来源体力值大于你,你可以对其造成一点雷属性伤害,然后其摸一张牌',
zisha:'紫煞',
zisha2:'紫煞',
zisha_info:'每当你对其他角色造成一次伤害,你可以令目标获得一枚紫煞标记;拥有紫煞标记的角色手牌上限-1且每回合最多使用两张牌效果持续两回合',
zisha_info:'每当你对其他角色造成一次伤害,你可以令目标获得三枚紫煞标记;拥有紫煞标记的角色手牌上限-1每回合最多使用X张牌X为紫煞标记数每个结束阶段失去一枚紫煞标记',
xtanxi:'探息',
xtanxi_info:'出牌阶段限一次,你可以弃置一张手牌,然后从每名敌方角色的手牌中获得随机一张与之同名的牌(如果有的话)',
xtanxi_info:'出牌阶段限一次,你可以弃置一张手牌,然后随机选择一名手牌中有与之同名的牌的敌方角色,观看其手牌并获得任意一张',
linghuo:'灵火',
linghuo_info:'每两轮限一次,在一名其他角色的结束阶段,若其本回合内造成过伤害,你可以对其造成一点火属性伤害',
guijin:'归烬',

View File

@ -1861,8 +1861,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
effect:{
player:function(card,player){
if(_status.currentPhase!=player) return;
if(card.name=='sha'&&player.countCards('h')<=player.hp&&!player.storage.chunlao.length){
return [0,0,0,0];
if(card.name=='sha'&&!player.needsToDiscard()&&!player.storage.chunlao.length){
return 'zeroplayertarget';
}
}
},
@ -5436,7 +5436,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
effect:{
target:function(card,player,target,current){
if(get.type(card)=='trick'||card.name=='sha') return [0,0,0,0];
if(get.type(card)=='trick'||card.name=='sha') return 'zeroplayertarget';
}
}
}

View File

@ -1260,7 +1260,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
effect:{
target:function(card,player,target,current){
if(get.type(card)=='trick'||card.name=='sha') return [0,0,0,0];
if(get.type(card)=='trick'||card.name=='sha') return 'zeroplayertarget';
}
}
}

View File

@ -14449,9 +14449,11 @@
}
}
if(result.card||!result.skill){
result.used=result.card||result.cards[0];
this.useCard(result.card,result.cards,result.targets,result.skill).oncard=event.oncard;
}
else if(result.skill){
result.used=result.skill;
this.useSkill(result.skill,result.cards,result.targets);
}
},
@ -14770,7 +14772,7 @@
next.player=this;
next.targets=targets;
next.animation=animation;
if(get.itemtype(position)=='cards'){
if(Array.isArray(position)){
next.cards=position;
}
else{
@ -16096,12 +16098,13 @@
if(this.hasSkill(skill)&&this.tempSkills[skill]==undefined) return;
this.addSkill(skill,checkConflict,true);
this.skills.remove(skill);
this.tempSkills[skill]=expire;
if(!expire){
expire='phaseAfter';
}
else if(typeof expire=='string'){
this.tempSkills[skill]=expire;
if(typeof expire=='string'){
lib.hookmap[expire]=true;
}
else if(Array.isArray(expire)){

View File

@ -4699,7 +4699,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(card.name=='shunshou') return;
if(card.name=='yuanjiao') return;
if(card.name=='yiyi') return;
if(!player.hasSkill('cangming2')) return [0,0,0,0];
if(!player.hasSkill('cangming2')) return 'zeroplayertarget';
}
}
},
@ -4874,7 +4874,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(lib.filter.targetEnabled({name:'sha'},player,game.players[i])&&
get.attitude(player,game.players[i])<0){
num++;
if(num>1) return [0,0,0,0];
if(num>1) return 'zeroplayertarget';
}
}
}