This commit is contained in:
libccy 2017-11-10 14:00:38 +08:00
parent 2ee07bcedc
commit cd779f2d80
4 changed files with 181 additions and 174 deletions

View File

@ -330,7 +330,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
content:function(){
target.$gain2(cards);
target.storage.yuanbaorou=card;
target.storage.yuanbaorou_markcount=3;
target.storage.yuanbaorou_markcount=4;
target.addSkill('yuanbaorou');
},
ai:{
@ -393,15 +393,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
unique:true,
skills:['yuheng_skill'],
ai:{
equipValue:function(card,player){
if(player.hp>=4) return 5;
if(player.hp>=3) return 4;
if(player.hp>=2) return 2;
return 1;
},
basic:{
equipValue:4
}
equipValue:6
}
},
yuheng_plus:{
@ -415,15 +407,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
cardimage:'yuheng',
skills:['yuheng_plus_skill'],
ai:{
equipValue:function(card,player){
if(player.hp>=4) return 7;
if(player.hp>=3) return 6;
if(player.hp>=2) return 2.5;
return 1;
},
basic:{
equipValue:5
}
equipValue:7
}
},
yuheng_pro:{
@ -437,16 +421,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
cardimage:'yuheng',
skills:['yuheng_pro_skill'],
ai:{
equipValue:function(card,player){
if(player.hp>=4) return 7.5;
if(player.hp>=3) return 6;
if(player.hp>=2) return 2.5;
return 1;
},
basic:{
equipValue:7
}
equipValue:8
}
},
shujinsan:{
@ -1335,26 +1310,32 @@ game.import('card',function(lib,game,ui,get,ai,_status){
yuheng_skill:{
enable:'phaseUse',
usable:1,
filterTarget:function(card,player,target){
return target!=player&&target.countCards('h')>0;
},
filterCard:{suit:'spade'},
check:function(card){
return 8-get.value(card);
},
filter:function(event,player){
var enemies=player.getEnemies();
for(var i=0;i<enemies.length;i++){
if(enemies[i].countCards('h',{suit:'spade'})) return true;
}
return false;
},
content:function(){
'step 0'
player.loseHp();
var enemies=player.getEnemies();
var list=[];
for(var i=0;i<enemies.length;i++){
var hs=enemies[i].getCards('h',{suit:'spade'});
if(hs.length){
list.push([enemies[i],hs]);
}
}
if(list.length){
var current=list.randomGet();
player.line(current[0]);
current[0].give(current[1].randomGet(),player,true);
}
'step 1'
var hs=target.getCards('h');
if(hs.length){
var card=hs.randomGet();
player.gain(card,target);
target.$give(card,player);
if(get.suit(card)=='spade'){
event.bool=true;
}
}
'step 2'
if(event.bool){
target.loseHp();
}
var card=player.getEquip('yuheng');
if(card){
if(typeof card.storage.yuheng!='number'){
@ -1370,48 +1351,44 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
},
ai:{
order:6,
order:9,
result:{
target:function(player,target){
if(get.attitude(player,target)>=0) return 0;
var nh=target.countCards('h');
var num=-1/Math.sqrt(1+nh);
if(player.hp>=4) return num;
if(player.hp>=3&&nh<=2) return num;
if(player.hp>=2&&target.hp==1&&nh<=2) return num;
return 0;
}
player:1
}
}
},
yuheng_plus_temp:{},
yuheng_plus_skill:{
enable:'phaseUse',
enable:'phaseUse',
usable:1,
filterCard:{color:'black'},
check:function(card){
return 8-get.value(card);
},
filter:function(event,player){
return !player.hasSkill('yuheng_plus_temp');
},
filterTarget:function(card,player,target){
return target!=player&&target.countCards('h')>0;
// if(player.hasSkill('yuheng_plus_temp')) return false;
var enemies=player.getEnemies();
for(var i=0;i<enemies.length;i++){
if(enemies[i].countCards('h',{suit:'spade'})) return true;
}
return false;
},
content:function(){
'step 0'
player.loseHp();
var enemies=player.getEnemies();
var list=[];
for(var i=0;i<enemies.length;i++){
var hs=enemies[i].getCards('h',{suit:'spade'});
if(hs.length){
list.push([enemies[i],hs]);
}
}
if(list.length){
var current=list.randomGet();
player.line(current[0]);
current[0].give(current[1].randomGet(),player,true);
}
'step 1'
var hs=target.getCards('h');
if(hs.length){
var card=hs.randomGet();
player.gain(card,target);
target.$give(card,player);
if(get.color(card)=='black'){
event.bool=true;
}
}
'step 2'
if(event.bool){
target.loseHp();
}
var card=player.getEquip('yuheng_plus');
var card=player.getEquip('yuheng_plus');
if(card){
if(typeof card.storage.yuheng!='number'){
card.storage.yuheng=1;
@ -1425,55 +1402,58 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
},
ai:{
order:6,
order:9,
result:{
target:function(player,target){
if(get.attitude(player,target)>=0) return 0;
var nh=target.countCards('h');
var num=-1/Math.sqrt(1+nh);
if(player.hp>=4) return num;
if(player.hp>=3&&nh<=2) return num;
if(player.hp>=2&&target.hp==1&&nh<=2) return num;
return 0;
}
player:1
}
}
},
yuheng_pro_skill:{
enable:'phaseUse',
filterTarget:function(card,player,target){
return target!=player&&target.countCards('h')>0;
},
enable:'phaseUse',
filterCard:{color:'black'},
check:function(card){
return 8-get.value(card);
},
filter:function(event,player){
var enemies=player.getEnemies();
for(var i=0;i<enemies.length;i++){
if(enemies[i].countCards('h',{suit:'spade'})) return true;
}
return false;
},
content:function(){
'step 0'
player.loseHp();
var enemies=player.getEnemies();
var list=[];
for(var i=0;i<enemies.length;i++){
var hs=enemies[i].getCards('h',{suit:'spade'});
if(hs.length){
list.push([enemies[i],hs]);
}
}
if(list.length){
var current=list.randomGet();
player.line(current[0]);
current[0].give(current[1].randomGet(),player,true);
}
'step 1'
var hs=target.getCards('h');
if(hs.length){
var card=hs.randomGet();
player.gain(card,target);
target.$give(card,player);
if(get.color(card)=='black'){
event.bool=true;
var card=player.getEquip('yuheng');
if(card){
if(typeof card.storage.yuheng!='number'){
card.storage.yuheng=1;
}
else{
card.storage.yuheng++;
}
if(card.storage.yuheng>=3){
card.init([card.suit,card.number,'yuheng_plus',card.nature]);
player.addTempSkill('yuheng_plus_temp');
}
}
'step 2'
if(event.bool){
target.loseHp();
}
},
ai:{
order:6,
order:9,
result:{
target:function(player,target){
if(get.attitude(player,target)>=0) return 0;
var nh=target.countCards('h');
var num=-1/Math.sqrt(1+nh);
if(player.hp>=4) return num;
if(player.hp>=3&&nh<=2) return num;
if(player.hp>=2&&target.hp==1&&nh<=2) return num;
return 0;
}
player:1
}
}
},
@ -1562,12 +1542,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){
yuheng_skill:'玉衡',
yuheng_plus_skill:'玉衡',
yuheng_pro_skill:'玉衡',
yuheng_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的一张手牌并展示,若为黑桃牌,该角色也失去一点体力(此牌在本局游戏中第三次和第七次发动效果后,分别自动获得一次强化)',
yuheng_plus_info:'由普通玉衡强化得到,将玉衡技能描述中的“黑桃牌”改为“黑色牌”',
yuheng_pro_info:'由普通玉衡二次强化得到,将玉横技能描述中的“黑桃牌”改为“黑色牌”,并去掉使用次数限制',
yuheng_skill_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑桃牌,该角色也失去一点体力',
yuheng_plus_skill_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力',
yuheng_pro_skill_info:'出牌阶段,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力',
yuheng_info:'出牌阶段限一次,若敌方角色有黑桃手牌,你可以弃置一张黑桃手牌,然后获得一名随机敌方角色的一张随机黑桃手牌(此牌在本局游戏中第三次和第七次发动效果后,分别自动获得一次强化)',
yuheng_plus_info:'由普通玉衡强化得到,将玉衡技能描述中的“弃置一张黑桃牌”改为“弃置一张黑色牌”',
yuheng_pro_info:'由普通玉衡二次强化得到,将玉横技能描述中的“弃置一张黑桃牌”改为“弃置一张黑色牌”,并去掉使用次数限制',
yuheng_skill_info:'出牌阶段限一次,若敌方角色有黑桃手牌,你可以弃置一张黑桃手牌,然后获得一名随机敌方角色的一张随机黑桃手牌',
yuheng_plus_skill_info:'出牌阶段限一次,若敌方角色有黑桃手牌,你可以弃置一张黑色手牌,然后获得一名随机敌方角色的一张随机黑桃手牌',
yuheng_pro_skill_info:'出牌阶段限,若敌方角色有黑桃手牌,你可以弃置一张黑色手牌,然后获得一名随机敌方角色的一张随机黑桃手牌',
shujinsan:'舒筋散',
shujinsan_info:'出牌阶段对任意角色使用,目标可弃置任意张牌,并摸等量的牌',
mutoumianju:'木头面具',
@ -1597,7 +1577,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
luyugeng:'鲈鱼羹',
luyugeng_info:'准备阶段,你对一名体力值全场最高的随机敌人造成一点雷属性伤害,持续两回合',
yuanbaorou:'元宝肉',
yuanbaorou_info:'你在出牌阶段可以额外使用一张杀,持续回合',
yuanbaorou_info:'你在出牌阶段可以额外使用一张杀,持续回合',
molicha:'茉莉茶',
molicha_info:'你不能成为其他角色的黑色牌的目标,持续四回合',
mapodoufu:'麻婆豆腐',

View File

@ -254,20 +254,34 @@ game.import('card',function(lib,game,ui,get,ai,_status){
fullskin:true,
type:'trick',
nodelay:true,
chongzhu:true,
// chongzhu:true,
global:'g_shencaojie',
content:function(){
event.getParent('g_shencaojie')._trigger.num++;
var evt=event.getParent('g_shencaojie')._trigger;
if(evt){
if(evt.player==player){
evt.num--;
}
else{
evt.num++;
}
}
},
ai:{
order:1,
useful:1,
value:5,
useful:5,
value:6,
result:{
target:function(player,target){
if(get.attitude(player,target)>0) return 0;
if(get.damageEffect(target,player,target)>=0) return 0;
return -1;
if(target==player){
if(get.damageEffect(target,player,target)>=0) return 0;
return 1;
}
else{
if(get.attitude(player,target)>0) return 0;
if(get.damageEffect(target,player,target)>=0) return 0;
return -1;
}
}
},
}
@ -2308,7 +2322,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
},
g_shencaojie:{
trigger:{source:'damageBegin'},
trigger:{source:'damageBegin',player:'damageBegin'},
direct:true,
filter:function(event,player){
if(get.type(event.card)!='trick') return false;
@ -4855,7 +4869,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
// pantao:'蟠桃',
// pantao_info:'出牌阶段对自己使用,或对濒死角色使用,目标回复两点体力并获得一点护甲',
shencaojie:'神草结',
shencaojie_info:'你的锦囊牌即将造成伤害时对目标使用,令此伤害+1',
shencaojie_info:'你的锦囊牌即将造成伤害时对目标使用,令此伤害+1;你即将受到锦囊牌伤害时对自己使用,令此伤害-1',
yuruyi:'玉如意',
yuruyi_ab:'如意',
yuruyi_info:'你有更高的机率摸到好牌',

View File

@ -607,61 +607,72 @@ game.import('card',function(lib,game,ui,get,ai,_status){
filterTarget:function(card,player,target){
return target.countCards('h')>0;
},
selectTarget:2,
multitarget:true,
singleCard:true,
targetprompt:['被拿牌','得牌'],
content:function(){
"step 0"
target.addTempSkill('toulianghuanzhu2');
var hs=target.getCards('h');
event.num=Math.min(2,hs.length);
if(event.num){
var gived=hs.randomGets(event.num);
event.addedTarget.gain(gived,target);
target.$giveAuto(gived,event.addedTarget);
game.delay();
}
else{
event.finish();
}
"step 1"
if(event.addedTarget.countCards('h')){
if(_status.auto&&event.addedTarget==game.me){
game.delay();
'step 0'
var hs=player.getCards('h');
if(hs.length){
var minval=get.value(hs[0]);
var colors=[get.color(hs[0])];
for(var i=1;i<hs.length;i++){
var val=get.value(hs[i]);
if(val<minval){
minval=val;
colors=[get.color(hs[i])];
}
else if(val==minval){
colors.add(get.color(hs[i]));
}
}
event.addedTarget.chooseCard(true,event.num,'选择'+get.cnNumber(event.num)+'张手牌还给'+get.translation(target)).ai=get.disvalue;
player.chooseCardButton('偷梁换柱',target.getCards('h')).ai=function(button){
var val=get.value(button.link)-minval;
if(val>=0){
if(colors.contains(get.color(button.link))){
val+=3;
}
}
return val;
}
}
else{
player.viewHandcards(target);
event.finish();
}
'step 1'
if(result.bool){
event.card=result.links[[0]];
player.chooseCard('h',true,'用一张手牌替换'+get.translation(event.card)).ai=function(card){
return -get.value(card);
};
}
else{
event.finish();
}
"step 2"
target.gain(result.cards,event.addedTarget);
event.addedTarget.$give(event.num,target);
'step 2'
if(result.bool){
player.gain(event.card,target);
target.gain(result.cards,player);
player.$giveAuto(result.cards,target);
target.$giveAuto(event.card,player);
game.log(player,'与',target,'交换了一张手牌');
if(get.color(event.card)==get.color(result.cards[0])){
player.draw();
}
}
},
ai:{
order:6.5,
order:8,
tag:{
loseCard:1,
multitarget:1,
multineg:1,
norepeat:1,
},
result:{
target:function(player,target){
if(ui.selected.targets.length){
if(target==player&&target.countCards('h')<=1) return 0;
return 0.5;
}
if(target.hasSkill('toulianghuanzhu2')) return 0;
return -0.5;
if(player.countCards('h')<=1) return 0;
return -1;
}
},
wuxie:function(){
return 0;
},
useful:[3,1],
value:[4,1]
useful:[4,1],
value:[6,1]
}
},
hufu:{
@ -942,7 +953,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
geanguanhuo:'隔岸观火',
geanguanhuo_info:'出牌阶段对一名其他角色使用令目标与一名你指定的另一名角色拼点赢的角色获得对方的一张牌若点数相同目标可弃置你一张牌存活角色不超过2时可重铸',
toulianghuanzhu:'偷梁换柱',
toulianghuanzhu_info:'出牌阶段对一名有手牌的角色使用,选择另一名有手牌的角色获得目标两张手牌(不足则全拿),然后还给其等量手牌',
toulianghuanzhu_info:'出牌阶段对一名其他角色使用,你观看其手牌,然后可以用一张手牌替牌其中的一张;若两张牌颜色相同,你摸一张牌',
toulianghuanzhu_bg:'柱',
fudichouxin:'釜底抽薪',
fudichouxin_info:'与一名角色进行拼点,若成功则获得双方拼点牌',

View File

@ -1,6 +1,6 @@
window.noname_update={
version:'1.9.41',
// update:'1.9.38.1',
version:'1.9.41.1',
update:'1.9.41',
changeLog:[
'bug修复'
],
@ -12,7 +12,9 @@ window.noname_update={
// 'game/pressure.js',
// 'game/asset.js',
// 'card/*',
// 'card/standard.js',
'card/swd.js',
'card/gujian.js',
'card/yunchou.js',
// 'card/gwent.js',
// 'card/guozhan.js',
// 'character/*',