This commit is contained in:
libccy 2017-05-12 16:05:59 +08:00
parent 132025fcb3
commit 3da8829a27
17 changed files with 208 additions and 44 deletions

View File

@ -127,8 +127,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
value:4, value:4,
result:{ result:{
target:function(player,target){ target:function(player,target){
if(player==target&&target.isLowestHp()) return 2; if(player==target&&target.isMinHp()) return 2;
if(target.isLowestHp()) return 1.5; if(target.isMinHp()) return 1.5;
return 1/Math.max(1,target.hp); return 1/Math.max(1,target.hp);
} }
} }
@ -291,7 +291,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
result:{ result:{
target:function(player,target){ target:function(player,target){
if(target.isHealthy()) return player.needsToDiscard()?0.1:0; if(target.isHealthy()) return player.needsToDiscard()?0.1:0;
if(target.isLowestHp()) return 1.5; if(target.isMinHp()) return 1.5;
return 1/Math.max(1,target.hp); return 1/Math.max(1,target.hp);
} }
} }
@ -917,7 +917,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
content:function(){ content:function(){
var list=player.getEnemies(); var list=player.getEnemies();
for(var i=0;i<list.length;i++){ for(var i=0;i<list.length;i++){
if(!list[i].isHighestHp()){ if(!list[i].isMaxHp()){
list.splice(i--,1); list.splice(i--,1);
} }
} }
@ -1148,7 +1148,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
content:function(){ content:function(){
if(player.isLowestHp()){ if(player.isMinHp()){
player.logSkill('liyutang'); player.logSkill('liyutang');
player.changeHujia(); player.changeHujia();
} }
@ -1175,7 +1175,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
content:function(){ content:function(){
if(player.isDamaged()&&player.isLowestHp()){ if(player.isDamaged()&&player.isMinHp()){
player.logSkill('yougeng'); player.logSkill('yougeng');
player.recover(); player.recover();
} }

View File

@ -164,10 +164,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
notarget:true, notarget:true,
contentBefore:function(){ contentBefore:function(){
var list1=game.filterPlayer(function(current){ var list1=game.filterPlayer(function(current){
return current.isHighestHp(); return current.isMaxHp();
}); });
var list2=game.filterPlayer(function(current){ var list2=game.filterPlayer(function(current){
return current.isLowestHp(); return current.isMinHp();
}); });
player.line(list1); player.line(list1);
for(var i=0;i<list1.length;i++){ for(var i=0;i<list1.length;i++){
@ -194,12 +194,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){
content:function(){ content:function(){
var max=null,min=null; var max=null,min=null;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].isHighestHp()){ if(game.players[i].isMaxHp()){
max=game.players[i].hp;break; max=game.players[i].hp;break;
} }
} }
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].isLowestHp()){ if(game.players[i].isMinHp()){
min=game.players[i].hp;break; min=game.players[i].hp;break;
} }
} }
@ -233,10 +233,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
result:{ result:{
player:function(player,target){ player:function(player,target){
return game.countPlayer(function(current){ return game.countPlayer(function(current){
if(current.isHighestHp()){ if(current.isMaxHp()){
return -get.sgn(get.attitude(player,current)); return -get.sgn(get.attitude(player,current));
} }
if(current.isLowestHp()){ if(current.isMinHp()){
return get.sgn(get.attitude(player,current)); return get.sgn(get.attitude(player,current));
} }
}); });
@ -296,6 +296,137 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
gw_youer:{
fullborder:'silver',
type:'spell',
subtype:'spell_silver',
vanish:true,
enable:true,
filterTarget:function(card,player,target){
return target!=player&&target.countCards('e')>0;
},
content:function(){
var cards=target.getCards('e');
target.gain(cards,'draw2');
target.draw(cards.length);
},
ai:{
basic:{
order:6,
value:7,
useful:[3,1],
},
result:{
target:function(player,target){
var num=target.countCards('e');
if(target.hasSkillTag('noe')){
num*=1.5;
}
if(target==_status.currentPhase){
num*=1.2;
}
return num/1.5;
},
},
}
},
gw_tongdi:{
fullborder:'silver',
type:'spell',
subtype:'spell_silver',
vanish:true,
enable:true,
filterTarget:true,
content:function(){
'step 0'
if(!player.countCards('h')){
event.finish();
}
else{
player.chooseCard('h','将一张手牌交给'+get.translation(target),true);
}
'step 1'
player.$giveAuto(result.cards,target);
target.gain(result.cards,player);
'step 2'
player.gainPlayerCard(target,'h',true,2,'visible');
},
ai:{
basic:{
order:8,
value:9.5,
useful:[5,1],
},
result:{
target:function(player,target){
if(player.countCards('h','gw_tongdi')==player.countCards('h')) return 0;
if(!target.countCards('h')) return 0;
return -1;
},
player:function(player,target){
if(player.countCards('h','gw_tongdi')==player.countCards('h')) return 0;
if(!target.countCards('h')) return 0;
return 0.5;
},
},
}
},
gw_fuyuan:{
fullborder:'silver',
type:'spell',
subtype:'spell_silver',
vanish:true,
savable:true,
selectTarget:-1,
content:function(){
target.recover();
target.changeHujia();
},
ai:{
basic:{
order:6,
useful:10,
value:[8,6.5,5,4],
},
result:{
target:2
},
tag:{
recover:1,
save:1,
}
}
},
gw_zhuoshao:{
fullborder:'silver',
type:'spell',
subtype:'spell_silver',
vanish:true,
enable:true,
filterTarget:function(card,player,target){
return target.isMaxHp();
},
cardnature:'fire',
selectTarget:[1,Infinity],
content:function(){
target.damage('fire');
},
ai:{
basic:{
order:8.5,
value:7.5,
useful:[4,1],
},
result:{
target:-1
},
tag:{
damage:1,
fireDamage:1,
natureDamage:1,
}
}
},
gw_butianshu:{ gw_butianshu:{
fullborder:'silver', fullborder:'silver',
type:'spell', type:'spell',
@ -381,10 +512,17 @@ game.import('card',function(lib,game,ui,get,ai,_status){
// }, // },
content:function(){ content:function(){
var list=[]; var list=[];
list.push(get.cardPile('sha','cardPile')); list.push(get.cardPile('juedou','cardPile'));
list.push(get.cardPile('shan','cardPile')); list.push(get.cardPile('huogong','cardPile'));
list.push(get.cardPile('tao','cardPile')); list.push(get.cardPile('nanman','cardPile'));
// list.push(get.cardPile('jiu','cardPile')); list.push(get.cardPile('huoshaolianying','cardPile'));
list=[list.randomGet()];
var sha=get.cardPile('sha','cardPile');
if(sha){
sha.remove();
list.push(sha);
list.push(get.cardPile('sha','cardPile'));
}
if(list.length){ if(list.length){
player.gain(list,'gain2'); player.gain(list,'gain2');
} }
@ -702,19 +840,41 @@ game.import('card',function(lib,game,ui,get,ai,_status){
gw_ansha:'暗杀', gw_ansha:'暗杀',
gw_ansha_info:'令一名体力为1的随机敌方角立即死亡不触发技能然后结束出牌阶段', gw_ansha_info:'令一名体力为1的随机敌方角立即死亡不触发技能然后结束出牌阶段',
gw_shizizhaohuan:'十字召唤', gw_shizizhaohuan:'十字召唤',
gw_shizizhaohuan_info:'从牌堆中获得一张杀、一张闪和一张桃', gw_shizizhaohuan_info:'从牌堆中获得两张杀以及决斗、火攻、火烧连营、南蛮入侵中的随机一张',
gw_zuihouyuanwang:'最后愿望', gw_zuihouyuanwang:'最后愿望',
gw_zuihouyuanwang_info:'摸X张牌并弃置X张牌X为存活角色数', gw_zuihouyuanwang_info:'摸X张牌并弃置X张牌X为存活角色数',
gw_zirankuizeng:'自然馈赠', gw_zirankuizeng:'自然馈赠',
gw_zirankuizeng_info:'重新结算一你上一张使用的非转化普通锦囊牌,然后摸一张牌', gw_zirankuizeng_info:'重新结算一你上一张使用的非转化普通锦囊牌,然后摸一张牌',
gw_poxiao:'破晓', gw_poxiao:'破晓',
gw_poxiao_info:'选择一项:弃置一名角色判定区内的所有牌,或随机获得一张铜卡法术(破晓除外)并展示之', gw_poxiao_info:'选择一项:弃置一名角色判定区内的所有牌,或随机获得一张铜卡法术(破晓除外)并展示之',
gw_baoxueyaoshui:'暴雪药水',
gw_baoxueyaoshui_info:'令一名角色摸两张牌并翻面',
gw_zumoshoukao:'阻魔手铐', gw_zumoshoukao:'阻魔手铐',
gw_zumoshoukao_info:'令一名角色失去所有护甲且非锁定技失效直到下一回合结束', gw_zumoshoukao_info:'令一名角色失去所有护甲且非锁定技失效直到下一回合结束',
gw_aozuzhilei:'奥祖之雷', gw_aozuzhilei:'奥祖之雷',
gw_aozuzhilei_info:'对一名体力值不小于你的角色造成一点雷属性伤害,然后该角色摸一张牌', gw_aozuzhilei_info:'对一名体力值不小于你的角色造成一点雷属性伤害,然后该角色摸一张牌',
gw_zhuoshao:'灼烧',
gw_zhuoshao_info:'对任意名体力值为全场最高的角色使用,造成一点火属性伤害',
gw_fuyuan:'复原',
gw_fuyuan_info:'对一名濒死状态角色使用,目标回复一点体力并获得一点护甲',
gw_youer:'诱饵',
gw_youer_info:'令一名装备区内有牌的其他角色将装备区内的牌收回手牌,然后摸等量的牌',
gw_tongdi:'通敌',
gw_tongdi_info:'交给一名角色一张手牌,然后观看其手牌并获得其中两张',
gw_baoxueyaoshui:'暴雪药水',
gw_baoxueyaoshui_info:'令一名角色弃置两张手牌并摸一张牌',
gw_birinongwu:'蔽日浓雾',
gw_birinongwu_info:'所有角色不能使用杀直到下一回合结束',
gw_qinpendayu:'倾盆大雨',
gw_qinpendayu_info:'所有角色进入横置状态',
gw_cigubingshuang:'刺骨寒霜',
gw_cigubingshuang_info:'所有角色下个摸牌阶段摸牌数-1',
gw_wenyi:'瘟疫',
gw_wenyi_info:'令所有体力值为全场最少的角色随机弃置一张牌',
gw_yanziyaoshui:'燕子药水',
gw_yanziyaoshui_info:'令一名角色摸一张牌,若其手牌数为全场最少,改为摸三张',
gw_guaiwuchaoxue:'怪物巢穴',
gw_guaiwuchaoxue_info:'选择手牌中的一张杀、闪或酒,获得两张该牌的复制',
gw_shanbengshu:'山崩术',
gw_shanbengshu_info:'所有角色随机弃置一张牌',
}, },
cardType:{ cardType:{
spell:0.5, spell:0.5,

View File

@ -4249,7 +4249,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseEnd'}, trigger:{player:'phaseEnd'},
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
return player.isLowestHp()&&player.isDamaged(); return player.isMinHp()&&player.isDamaged();
}, },
content:function(){ content:function(){
player.recover(); player.recover();

View File

@ -463,13 +463,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
type:'trick', type:'trick',
enable:true, enable:true,
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return (target.isLowestHp()&&target.isDamaged())||target.isFewestHandcard(); return (target.isMinHp()&&target.isDamaged())||target.isMinHandcard();
}, },
content:function(){ content:function(){
'step 0' 'step 0'
if(target.isFewestHandcard()) target.draw(2); if(target.isMinHandcard()) target.draw(2);
'step 1' 'step 1'
if(target.isLowestHp()) target.recover(); if(target.isMinHp()) target.recover();
}, },
ai:{ ai:{
order:2.5, order:2.5,
@ -477,7 +477,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
result:{ result:{
target:function(player,target){ target:function(player,target){
var num=0; var num=0;
if(target.isLowestHp()&&get.recoverEffect(target)>0){ if(target.isMinHp()&&get.recoverEffect(target)>0){
if(target.hp==1){ if(target.hp==1){
num+=3; num+=3;
} }
@ -485,7 +485,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
num+=2; num+=2;
} }
} }
if(target.isFewestHandcard()){ if(target.isMinHandcard()){
num+=2; num+=2;
} }
return num; return num;

View File

@ -57,7 +57,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.attitude(player,event.player)>0; return get.attitude(player,event.player)>0;
}, },
filter:function(event,player){ filter:function(event,player){
return event.player.isFewestHandcard(); return event.player.isMinHandcard();
}, },
logTarget:'player', logTarget:'player',
content:function(){ content:function(){
@ -778,12 +778,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(target.isTurnedOver()) return true; if(target.isTurnedOver()) return true;
if(target.countCards('j')) return true; if(target.countCards('j')) return true;
if(target.hp==target.maxHp) return false; if(target.hp==target.maxHp) return false;
return target.isLowestHp(); return target.isMinHp();
}).ai=function(target){ }).ai=function(target){
var num=0; var num=0;
var att=get.attitude(player,target); var att=get.attitude(player,target);
if(att>0){ if(att>0){
if(target.isLowestHp()){ if(target.isMinHp()){
num+=5; num+=5;
} }
if(target.isTurnedOver()){ if(target.isTurnedOver()){
@ -823,7 +823,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.target.discard(cards); event.target.discard(cards);
} }
"step 5" "step 5"
if(event.target.isLowestHp()){ if(event.target.isMinHp()){
event.target.recover(); event.target.recover();
} }
}, },

View File

@ -122,7 +122,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'phaseUse', enable:'phaseUse',
usable:2, usable:2,
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return target.isHighestHp(); return target.isMaxHp();
}, },
check:function(card){return 7-get.value(card);}, check:function(card){return 7-get.value(card);},
position:'he', position:'he',

View File

@ -1764,7 +1764,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseBegin'}, trigger:{player:'phaseBegin'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
return !player.isMostHandcard(); return !player.isMaxHandcard();
}, },
content:function(){ content:function(){
'step 0' 'step 0'

View File

@ -738,7 +738,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){ filter:function(event,player){
if(!player.hasZhuSkill('ruoyu'))return false; if(!player.hasZhuSkill('ruoyu'))return false;
if(player.storage.ruoyu) return false; if(player.storage.ruoyu) return false;
return player.isLowestHp(); return player.isMinHp();
}, },
content:function(){ content:function(){
player.storage.ruoyu=true; player.storage.ruoyu=true;
@ -2104,7 +2104,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseCardTarget({ player.chooseCardTarget({
selectCard:Math.floor(player.countCards('h')/2), selectCard:Math.floor(player.countCards('h')/2),
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return target.isFewestHandcard(); return target.isMinHandcard();
}, },
forced:true, forced:true,
ai2:function(target){ ai2:function(target){
@ -2428,7 +2428,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return false; return false;
}, },
filter:function(event,player){ filter:function(event,player){
return !player.isLowestHp(); return !player.isMinHp();
}, },
content:function(){ content:function(){
"step 0" "step 0"

View File

@ -1284,7 +1284,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(num==1) return false; if(num==1) return false;
if(player.hp<=1) return true; if(player.hp<=1) return true;
if(num==2) return false; if(num==2) return false;
if(num==3) return player.hp<3&&player.isLowestHp(); if(num==3) return player.hp<3&&player.isMinHp();
return true; return true;
}, },
content:function(){ content:function(){

View File

@ -327,7 +327,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return target.countCards('h')>player.countCards('h'); return target.countCards('h')>player.countCards('h');
}, },
filter:function(event,player){ filter:function(event,player){
return !player.isMostHandcard(); return !player.isMaxHandcard();
}, },
content:function(){ content:function(){
'step 0' 'step 0'
@ -903,7 +903,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'phaseUse', enable:'phaseUse',
usable:1, usable:1,
filter:function(event,player){ filter:function(event,player){
return player.isFewestHandcard(); return player.isMinHandcard();
}, },
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return target!=player&&target.countCards('h')>0; return target!=player&&target.countCards('h')>0;
@ -2287,7 +2287,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 8-get.value(card); return 8-get.value(card);
}, },
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return target.isDamaged()&&target.isLowestHp(); return target.isDamaged()&&target.isMinHp();
}, },
selectTarget:-1, selectTarget:-1,
content:function(){ content:function(){

View File

@ -4291,7 +4291,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'phaseUse', enable:'phaseUse',
usable:1, usable:1,
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return target.isHighestHp(); return target.isMaxHp();
}, },
check:function(card){return 7-get.value(card);}, check:function(card){return 7-get.value(card);},
position:'he', position:'he',

View File

@ -55,12 +55,16 @@ window.noname_asset_list=[
'image/card/gw_ansha.png', 'image/card/gw_ansha.png',
'image/card/gw_aozuzhilei.png', 'image/card/gw_aozuzhilei.png',
'image/card/gw_butianshu.png', 'image/card/gw_butianshu.png',
'image/card/gw_fuyuan.png',
'image/card/gw_niuquzhijing.png', 'image/card/gw_niuquzhijing.png',
'image/card/gw_poxiao.png', 'image/card/gw_poxiao.png',
'image/card/gw_shizizhaohuan.png', 'image/card/gw_shizizhaohuan.png',
'image/card/gw_tongdi.png',
'image/card/gw_xinsheng.png', 'image/card/gw_xinsheng.png',
'image/card/gw_youer.png',
'image/card/gw_zhihuanjun.png', 'image/card/gw_zhihuanjun.png',
'image/card/gw_zhongmozhizhan.png', 'image/card/gw_zhongmozhizhan.png',
'image/card/gw_zhuoshao.png',
'image/card/gw_zirankuizeng.png', 'image/card/gw_zirankuizeng.png',
'image/card/gw_zuihouyuanwang.png', 'image/card/gw_zuihouyuanwang.png',
'image/card/gw_zumoshoukao.png', 'image/card/gw_zumoshoukao.png',

View File

@ -16184,7 +16184,7 @@
isHealthy:function(){ isHealthy:function(){
return this.hp==this.maxHp; return this.hp==this.maxHp;
}, },
isHighestHp:function(equal){ isMaxHp:function(equal){
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].isOut()) continue; if(game.players[i].isOut()) continue;
if(equal){ if(equal){
@ -16196,7 +16196,7 @@
} }
return true; return true;
}, },
isLowestHp:function(equal){ isMinHp:function(equal){
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].isOut()) continue; if(game.players[i].isOut()) continue;
if(equal){ if(equal){
@ -16208,7 +16208,7 @@
} }
return true; return true;
}, },
isMostHandcard:function(equal){ isMaxHandcard:function(equal){
var nh=this.countCards('h'); var nh=this.countCards('h');
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].isOut()) continue; if(game.players[i].isOut()) continue;
@ -16221,7 +16221,7 @@
} }
return true; return true;
}, },
isFewestHandcard:function(equal){ isMinHandcard:function(equal){
var nh=this.countCards('h'); var nh=this.countCards('h');
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].isOut()) continue; if(game.players[i].isOut()) continue;

BIN
image/card/gw_fuyuan.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
image/card/gw_tongdi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
image/card/gw_youer.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
image/card/gw_zhuoshao.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB