This commit is contained in:
libccy 2018-08-13 15:17:34 +08:00
parent 3ff6839c51
commit 5a62004aad
4 changed files with 191 additions and 12 deletions

View File

@ -4,6 +4,19 @@ game.import('card',function(lib,game,ui,get,ai,_status){
name:'guozhan',
connect:true,
card:{
minguangkai:{
mode:['guozhan'],
fullskin:true,
type:'equip',
subtype:'equip2',
cardimage:'suolianjia',
skills:['minguangkai_cancel','minguangkai_link'],
ai:{
basic:{
equipValue:6
}
}
},
dinglanyemingzhu:{
mode:['guozhan'],
fullskin:true,
@ -665,6 +678,51 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
},
skill:{
minguangkai_cancel:{
trigger:{target:'useCardToBefore'},
forced:true,
priority:15,
check:function(event,player){
return get.effect(event.target,event.card,event.player,player)<0;
},
filter:function(event,player){
if(['huoshaolianying','huogong'].contains(event.card.name)) return true;
if(event.card.name=='sha') return event.card.nature=='fire';
return false;
},
content:function(){
trigger.cancel();
},
ai:{
effect:{
target:function(card,player,target,current){
if(['huoshaolianying','huogong'].contains(card.name)||(card.name=='sha'&&card.nature=='fire')){
return 'zeroplayertarget';
}
},
}
}
},
minguangkai_link:{
trigger:{player:'linkBefore'},
forced:true,
priority:20,
filter:function(event,player){
return player.isMinor()&&!player.isLinked();
},
content:function(){
trigger.cancel();
},
ai:{
effect:{
target:function(card,player,target,current){
if(target.isMinor()&&['tiesuo','lulitongxin'].contains(card.name)){
return 'zeroplayertarget';
}
},
}
}
},
dinglanyemingzhu_skill:{
inherit:'gzzhiheng',
filter:function(event,player){
@ -1091,16 +1149,18 @@ game.import('card',function(lib,game,ui,get,ai,_status){
group:'undist'
},
huxinjing:{
trigger:{player:'damageBegin'},
priority:10,
forced:true,
filter:function(event){
trigger:{player:'damageBefore'},
// forced:true,
filter:function(event,player){
if(event.source&&event.source.hasSkillTag('unequip',false,event.card)) return false;
return event.num>0;
return event.num>=player.hp;
},
content:function(){
trigger.num--;
player.addSkill('huxinjing2');
trigger.cancel();
var e2=player.getEquip('huxinjing');
if(e2){
player.discard(e2);
}
}
},
huxinjing2:{
@ -1215,6 +1275,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
},
translate:{
minguangkai:'明光铠',
minguangkai_cancel:'明光铠',
minguangkai_link:'明光铠',
minguangkai_info:'锁定技,当你成为【火烧连营】、【火攻】或火【杀】的目标时,取消之;若你是小势力角色,你不会被横置。',
dinglanyemingzhu:'定澜夜明珠',
dinglanyemingzhu_bg:'珠',
dinglanyemingzhu_info:'锁定技,你视为拥有技能“制衡”,若你已经有“制衡”,则改为取消弃置牌数的限制。',
@ -1269,7 +1333,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
jingfanma_info:'你的进攻距离+1',
huxinjing_bg:'镜',
huxinjing:'护心镜',
huxinjing_info:'抵消一点伤害',
huxinjing_info:'当你受到伤害时,若伤害值大于或等于你的体力值,则你可以将【护心镜】置入弃牌堆,然后防止此伤害。',
},
list:[
['heart',9,'yuanjiao'],

View File

@ -417,7 +417,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
equipValue:3.5
}
},
skills:['qinglong_skill']
skills:['qinglong_skill','qinglong_guozhan']
},
zhangba:{
fullskin:true,
@ -461,7 +461,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
equipValue:2.5
}
},
skills:['fangtian_skill']
skills:['fangtian_skill','fangtian_guozhan']
},
qilin:{
fullskin:true,
@ -1315,6 +1315,43 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
},
skill:{
qinglong_guozhan:{
trigger:{player:'useCard'},
forced:true,
filter:function(){
return get.mode()=='guozhan';
},
content:function(){
var players=game.filterPlayer();
for(var i=0;i<players.length;i++){
game.players[i].addTempSkill('qinglong_guozhan_mingzhi');
game.players[i].storage.qinglong_guozhan_mingzhi.add(trigger.card);
}
}
},
qinglong_guozhan_mingzhi:{
vanish:true,
silent:true,
onremove:true,
trigger:{global:'useCardAfter'},
filter:function(event,player){
return player.storage.qinglong_guozhan_mingzhi.contains(event.card);
},
init:function(player){
if(!player.storage.qinglong_guozhan_mingzhi){
player.storage.qinglong_guozhan_mingzhi=[];
}
},
content:function(){
player.storage.qinglong_guozhan_mingzhi.remove(trigger.card);
if(!player.storage.qinglong_guozhan_mingzhi.length){
player.removeSkill('qinglong_guozhan_mingzhi');
}
},
ai:{
nomingzhi:true
}
},
hanbing_skill:{
trigger:{player:'shaHit'},
direct:true,
@ -1416,6 +1453,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
trigger:{player:'shaMiss'},
direct:true,
filter:function(event,player){
if(get.mode()=='guozhan') return false;
return player.canUse('sha',event.target)&&player.hasSha();
},
content:function(){
@ -1493,6 +1531,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
mod:{
selectTarget:function(card,player,range){
if(card.name!='sha') return;
if(get.mode()=='guozhan') return;
if(range[1]==-1) return;
var cards=player.getCards('h');
for(var i=0;i<cards.length;i++){
@ -1503,6 +1542,70 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
}
},
fangtian_guozhan:{
trigger:{player:'useCard'},
silent:true,
filter:function(event,player){
if(get.mode()!='guozhan') return false;
return event.card.name=='sha'&&event.targets&&event.targets.length>1;
},
content:function(){
player.addTempSkill('fangtian_guozhan_trigger');
},
mod:{
selectTarget:function(card,player,range){
if(card.name!='sha') return;
if(get.mode()!='guozhan') return;
if(range[1]==-1) return;
range[1]=Infinity;
},
playerEnabled:function(card,player,target){
if(card.name!='sha') return;
if(get.mode()!='guozhan') return;
if(!ui.selected.targets.length) return;
if(target.identity=='ye'||target.identity=='unknown') return;
for(var i=0;i<ui.selected.targets.length;i++){
if(target!=ui.selected.targets[i]&&target.identity==ui.selected.targets[i].identity){
return false;
}
}
}
}
},
fangtian_guozhan_trigger:{
trigger:{player:'shaMiss'},
silent:true,
onremove:true,
init:function(player){
if(!player.storage.fangtian_guozhan_trigger){
player.storage.fangtian_guozhan_trigger=[];
}
},
content:function(){
player.storage.fangtian_guozhan_trigger.add(trigger.card);
},
group:['fangtian_guozhan_cancel','fangtian_guozhan_remove']
},
fangtian_guozhan_cancel:{
trigger:{player:'shaBefore'},
silent:true,
filter:function(event,player){
return player.storage.fangtian_guozhan_trigger&&player.storage.fangtian_guozhan_trigger.contains(event.card);
},
content:function(){
trigger.cancel();
}
},
fangtian_guozhan_remove:{
trigger:{player:'useCardAfter'},
silent:true,
filter:function(event,player){
return player.storage.fangtian_guozhan_trigger&&player.storage.fangtian_guozhan_trigger.contains(event.card);
},
content:function(){
player.storage.fangtian_guozhan_trigger.remove(trigger.card);
}
},
qilin_skill:{
trigger:{player:'shaHit'},
filter:function(event,player){
@ -1942,13 +2045,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){
qinggang_skill_info:'每当你使用【杀】指定一名目标角色后,你无视其防具。',
qinggang_info:'每当你使用【杀】指定一名目标角色后,你无视其防具。',
qinglong_skill_info:'每当你使用的【杀】被目标角色使用的【闪】抵消时,你可以对其使用一张【杀】(无距离限制)。',
qinglong_guozhan_info:'锁定技,当你使用【杀】指定目标时,所有目标角色不能明置武将牌直到此【杀】结算完毕为止。',
qinglong_info:'每当你使用的【杀】被目标角色使用的【闪】抵消时,你可以对其使用一张【杀】(无距离限制)。',
qinglong_info_guozhan:'锁定技,当你使用【杀】指定目标时,所有目标角色不能明置武将牌直到此【杀】结算完毕为止。',
zhangba_skill_info:'你可以将两张手牌当【杀】使用或打出。',
zhangba_info:'你可以将两张手牌当【杀】使用或打出。',
guanshi_skill_info:'每当你使用的【杀】被目标角色使用的【闪】抵消时,你可以弃置两张牌,令此【杀】依然对其造成伤害。',
guanshi_info:'每当你使用的【杀】被目标角色使用的【闪】抵消时,你可以弃置两张牌,令此【杀】依然对其造成伤害。',
fangtian_skill_info:'你使用的【杀】若是你最后的手牌,你可以额外选择至多两个目标。',
fangtian_info:'你使用的【杀】若是你最后的手牌,你可以额外选择至多两个目标。',
fangtian_info_guozhan:'你使用【杀】可以指定任意名角色为目标(不能包含势力相同的角色),若任意一名目标角色使用【闪】抵消了此【杀】,则此【杀】对剩余的目标角色无效。',
qilin_skill_info:'每当你使用【杀】对目标角色造成伤害时,你可以弃置其装备区里的一张坐骑牌。',
qilin_info:'每当你使用【杀】对目标角色造成伤害时,你可以弃置其装备区里的一张坐骑牌。',
wugu_info:'出牌阶段,对所有角色使用。(选择目标后)你从牌堆顶亮出等同于目标数量的牌,每名目标角色获得这些牌中(剩余的)的任意一张。',

View File

@ -5,6 +5,8 @@ window.noname_update={
'bug修复'
],
files:[
'card/guozhan.js',
'card/standard.js',
'character/gujian.js',
'character/gwent.js',
'character/hearth.js',

View File

@ -29,6 +29,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(get.config('onlyguozhan')&&!playback){
game.arrangeTrigger=true;
}
lib.card.sha.complexTarget=true;
},
onreinit:function(){
var pack=lib.characterPack.mode_guozhan;
@ -4447,6 +4448,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
['club',1,'yuxi'],
['heart',3,'taipingyaoshu'],
['diamond',6,'dinglanyemingzhu'],
['spade',2,'minguangkai'],
],
element:{
content:{
@ -4946,7 +4948,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return false;
},
isMinor:function(){
if(this.identity=='unknown') return false;
if(this.identity=='unknown'||this.isMajor()) return false;
if(!game.hasPlayer(function(current){
return current.isMajor();
})){
return false;
}
if(!lib.group.contains(this.identity)) return true;
var min=game.players.length;
if(game.hasPlayer(function(current){