v1.9.45.3

This commit is contained in:
libccy 2017-11-26 13:21:55 +08:00
parent ffe32a9f20
commit 590fadd89a
10 changed files with 260 additions and 97 deletions

View File

@ -1746,11 +1746,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){
subtype:'spell_bronze',
enable:true,
filterTarget:function(card,player,target){
return target.isMinHp()&&target.countCards('h');
return target.isMinHp();
},
selectTarget:-1,
content:function(){
if(target.countCards('h')){
target.randomDiscard('h');
}
else{
target.loseHp();
}
},
ai:{
basic:{
@ -1759,7 +1764,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
useful:[4,1],
},
result:{
target:-1
target:function(player,target){
if(target.countCards('h')) return -1;
return -2;
}
},
tag:{
multitarget:1,
@ -1832,27 +1840,31 @@ game.import('card',function(lib,game,ui,get,ai,_status){
mark:true,
nopop:true,
intro:{
content:'不能成为其他角色的普通锦囊牌的目标(剩余#回合)'
},
mod:{
targetEnabled:function(card,player,target,now){
if(player!=target){
if(get.type(card)=='trick') return false;
}
}
content:'防止所有非属性伤害(剩余个#角色的回合)'
},
init:function(player){
// if(game.players.length>=6){
// player.storage.gw_kunenfayin=3;
// }
// else{
// player.storage.gw_kunenfayin=2;
// }
player.storage.gw_kunenfayin=3;
player.storage.gw_kunenfayin=Math.min(5,game.countPlayer());
},
trigger:{player:'damageBefore'},
filter:function(event){
return !event.nature;
},
trigger:{player:'phaseEnd'},
forced:true,
popup:false,
content:function(){
trigger.cancel();
},
ai:{
nodamage:true,
effect:{
target:function(card,player,target,current){
if(get.tag(card,'damage')&&!get.tag(card,'natureDamage')) return [0,0];
}
},
},
subSkill:{
count:{
trigger:{global:'phaseEnd'},
silent:true,
content:function(){
player.storage.gw_kunenfayin--;
if(player.storage.gw_kunenfayin>0){
@ -1862,6 +1874,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
player.removeSkill('gw_kunenfayin');
}
},
}
},
group:'gw_kunenfayin_count',
onremove:true
},
gw_baobaoshu:{
@ -2226,13 +2241,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
gw_ciguhanshuang_bg:'霜',
gw_ciguhanshuang_info:'天气牌,出牌阶段对一名角色及其相邻角色使用,目标下个摸牌阶段摸牌数-1',
gw_wenyi:'瘟疫',
gw_wenyi_info:'令所有体力值为全场最少的角色随机弃置一张手牌',
gw_wenyi_info:'令所有体力值为全场最少的角色随机弃置一张手牌;若没有手牌,改为失去一点体力',
gw_yanziyaoshui:'燕子药水',
gw_yanziyaoshui_info:'令一名角色摸一张牌,若其手牌数为全场最少或之一,改为摸两张',
gw_shanbengshu:'山崩术',
gw_shanbengshu_info:'出牌阶段对自己使用,随机弃置两件敌方角色场上的装备',
gw_kunenfayin:'昆恩法印',
gw_kunenfayin_info:'出牌阶段对一名角色使用,目标不能成为其他角色的普通锦囊牌的目标持续3回合',
gw_kunenfayin_info:'出牌阶段对一名角色使用,目标防止所有非属性伤害持续X个角色的回合X为存活角色数且最多为5',
},
cardType:{
spell:0.5,

View File

@ -121,17 +121,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
subSkill:{
use:{
enable:'phaseUse',
usable:2,
usable:1,
filterCard:true,
check:function(card){
return 9-get.value(card);
},
filter:function(event,player){
if(!player.storage.nstuiyan2_done&&player.getStat().skill.nsbugua_use){
return false;
}
return player.countCards('h');
// if(!player.storage.nstuiyan2_done&&player.getStat().skill.nsbugua_use){
// return false;
// }
return player.countCards('he');
},
position:'he',
content:function(){
'step 0'
player.throwDice();
@ -206,7 +207,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return _status.currentPhase==player&&event.getParent('phaseUse',true)&&!player.hasSkill('nstuiyan_fail')&&
typeof player.storage.nstuiyan=='number'&&event.card.number>player.storage.nstuiyan;
},
forced:true,
frequent:true,
content:function(){
player.draw();
},
@ -297,9 +298,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
player.storage.nstuiyan=trigger.card.number;
player.storage.nstuiyan2+=trigger.card.number;
if(player.storage.nstuiyan2%8==0){
if(player.storage.nstuiyan2%8==0&&!player.storage.nstuiyan2_done){
player.storage.nstuiyan2_done=true;
// player.addTempSkill('nstuiyan_bugua');
player.addTempSkill('nstuiyan_bugua');
}
player.markSkill('nstuiyan');
}
@ -3576,7 +3577,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
nsbugua_use_info:'弃置一张手牌,并将牌堆顶的六张牌反面朝上逐张按先后顺序排放,然后抛骰子,展示牌序号与骰子显示的点数一致的牌,然后你根据这张牌的花色、点数随机获得牌堆中相应的一张牌',
nsbugua_info:'出牌阶段限一次,你可以弃置一张手牌,并将牌堆顶的六张牌反面朝上逐张按先后顺序排放,然后抛骰子,展示牌序号与骰子显示的点数一致的牌,然后你根据这张牌的花色、点数按以下规则随机获得牌堆中相应的一张牌:乾(红桃偶数):无中生有;坤(黑桃奇数):决斗;震(黑桃偶数):南蛮入侵;巽(红桃奇数):万箭齐发;坎(梅花偶数):过河拆桥、兑(梅花奇数):借刀杀人、艮(方片偶数):顺手牵羊、离(方片奇数):火攻。若牌堆中无此牌则摸一张牌,然后你观看未展示的另外五张牌并按任意顺序将其置于牌堆顶。',
nstuiyan:'推演',
nstuiyan_info:'锁定技,出牌阶段,若你使用的牌点数比上一张使用的牌点数大,你摸一张牌否则你本回合不能再以此法摸牌当你使用的牌点数首次达到8的倍数时你额外获得一次【卜卦】的机会',
nstuiyan_info:'出牌阶段,若你使用的牌点数比上一张使用的牌点数大,你可以摸一张牌反之你本回合不能再以此法摸牌当你使用的牌点数首次达到8的倍数时你可以在结算后立即发动一次【卜卦】',
nstianji:'天机',
nstianji_info:'限定技当一名其他角色进入濒死状态你可自减一点体力上限令其回复体力至1并增加一点体力上限',
nszhaoxin:'昭心',

View File

@ -1011,9 +1011,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
else if(button.link[2]=='gw_wenyi'){
if(game.countPlayer(function(current){
if(current.isMinHp()&&current.countCards('he')){
if(current.isMinHp()){
if(!current.countCards('h')){
return -2*get.sgn(get.attitude(player,current));
}
else{
return -get.sgn(get.attitude(player,current));
}
}
})>0){
return 2;
}

View File

@ -1245,6 +1245,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
enable:'phaseUse',
usable:1,
delay:0,
filter:function(event,player){
return game.hasPlayer(function(current){
return current.sex=='male';
@ -1260,33 +1261,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 'red';
});
"step 1"
var num=20;
var card;
event.cards=[];
while(num--){
card=get.cards(0);
event.cards.push(card);
if(get.color(card)==result.control) break;
else if(get.type(card,'trick')==result.control) break;
event.card=get.cardPile(function(card){
if(get.color(card)==result.control) return true;
if(get.type(card,'trick')==result.control) return true;
return false;
},'cardPile');
if(!event.card){
event.finish();
return;
}
event.card=card;
player.showCards(event.cards);
player.showCards([event.card]);
"step 2"
player.chooseTarget(true,'选择一名男性角色送出'+get.translation(event.card),function(card,player,target){
return target.sex=='male';
}).set('ai',function(target){
var att=get.attitude(_status.event.player,target);
if(_status.event.neg) return -att;
return att;
}).set('neg',get.value(card,player,'raw')<0);
"step 2"
player.line(result.targets,'green');
result.targets[0].$gain2(event.card);
for(var i=0;i<cards.length-1;i++){
cards[i].discard();
}
game.delay(0,1000);
}).set('neg',get.value(event.card,player,'raw')<0);
"step 3"
result.targets[0].gain(event.card,'log');
player.line(result.targets,'green');
result.targets[0].gain(event.card,'gain2');
},
ai:{
@ -1551,7 +1546,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
reguicai_info:'在任意角色的判定牌生效前,你可以打出一张牌代替之',
zhuhai_info:'一名其他角色的结束阶段开始时,若该角色本回合造成过伤害,你可以对其使用一张【杀】。',
qianxin_info:'觉醒技当你造成一次伤害后若你已受伤你须减1点体力上限并获得技能“荐言”。',
jianyan_info:'出牌阶段限一次,你可以声明一种牌的类别或颜色,然后连续亮出牌堆顶的牌,直到亮出符合你声明的牌为止,选择一名男性角色,该角色获得此牌',
jianyan_info:'出牌阶段限一次,你可以声明一种牌的类别或颜色,并亮出牌库中第一张符合你声明的牌,然后你令一名男性角色获得此牌',
rekurou_info:'出牌阶段限一次你可以弃置一张牌然后失去1点体力。',
zhaxiang_info:'锁定技 每当你失去1点体力后你摸三张牌。然后若此时是你的出牌阶段则直到回合结束你使用红色【杀】无距离限制且不能被【闪】响应你可以额外使用一张【杀】。',
qiaomeng_info:'每当你使用黑色【杀】对一名角色造成伤害后,你可以弃置该角色装备区里的一张牌,若此牌是坐骑牌,你于此牌置入弃牌堆时获得之。',

View File

@ -1479,8 +1479,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
}
player.storage.huashen.owned[name]=skills;
player.popup(name);
// player.popup(name);
game.log(player,'获得了一个化身');
if(lib.character[player.name2]&&lib.character[player.name2][3].contains('huashen')){
player.setAvatarQueue(player.name2,[name]);
}
else{
player.setAvatarQueue(player.name,[name]);
}
}
},
group:['huashen1','huashen2'],
@ -1617,6 +1623,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
player.addAdditionalSkill('huashen',link);
player.logSkill('huashen2');
if(lib.character[player.name2]&&lib.character[player.name2][3].contains('huashen')){
player.setAvatarQueue(player.name2,[currentname]);
}
else{
player.setAvatarQueue(player.name,[currentname]);
}
game.log(player,'获得技能','【'+get.translation(link)+'】');
player.popup(link);

View File

@ -5539,13 +5539,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageBegin'},
direct:true,
filter:function(event,player){
if(!player.hasSkill('fenxin_nei')){
if(!player.countCards('h',{color:'black'})) return false;
return event.player.hp>=player.hp&&player!=event.player;
}
return (event.player.hp>=player.hp||player.hasSkill('fenxin_fan'))&&player!=event.player;
},
content:function(){
'step 0'
var goon=(get.attitude(player,trigger.player)<0);
var next=player.chooseToDiscard(get.prompt('jieyuan',trigger.player),{color:'black'});
var next=player.chooseToDiscard(get.prompt('jieyuan',trigger.player));
if(!player.hasSkill('fenxin_nei')){
next.set('filterCard',function(card){
return get.color(card)=='black';
});
next.set('prompt2','弃置一张黑色手牌令伤害+1');
}
else{
next.set('prompt2','弃置一张手牌令伤害+1');
}
next.set('ai',function(card){
if(_status.event.goon){
return 8-get.value(card);
@ -5564,13 +5575,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:true,
trigger:{player:'damageBegin'},
filter:function(event,player){
if(!player.hasSkill('fenxin_nei')){
if(!player.countCards('h',{color:'red'})) return false;
return event.source&&event.source.hp>=player.hp&&player!=event.source;
}
return event.source&&(event.source.hp>=player.hp||player.hasSkill('fenxin_zhong'))&&player!=event.source;
},
direct:true,
content:function(){
"step 0"
var next=player.chooseToDiscard('竭缘:是否弃置一张红色手牌令伤害-1',{color:'red'});
var next=player.chooseToDiscard(get.prompt('jieyuan'),{color:'red'});
if(!player.hasSkill('fenxin_nei')){
next.set('filterCard',function(card){
return get.color(card)=='red';
});
next.set('prompt2','弃置一张红色手牌令伤害-1');
}
else{
next.set('prompt2','弃置一张手牌令伤害-1');
}
next.set('ai',function(card){
var player=_status.event.player;
if(player.hp==1||_status.event.getTrigger().num>1){
@ -5584,7 +5606,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
next.logSkill='jieyuan_less';
"step 1"
if(result.bool){
game.delay();
trigger.num--;
}
}
@ -5596,6 +5617,39 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
fenxin:{
mode:['identity'],
trigger:{global:'dieAfter'},
filter:function(event,player){
return ['fan','zhong','nei'].contains(event.player.identity)&&!player.hasSkill('fenxin_'+event.player.identity);
},
forced:true,
content:function(){
player.addSkill('fenxin_'+trigger.player.identity);
player.markSkill('fenxin');
},
intro:{
mark:function(dialog,content,player){
if(player.hasSkill('fenxin_zhong')){
dialog.addText('你发动“竭缘”减少伤害无体力值限制');
}
if(player.hasSkill('fenxin_fan')){
dialog.addText('你发动“竭缘”增加伤害无体力值限制');
}
if(player.hasSkill('fenxin_nei')){
dialog.addText('将“竭缘”中的黑色手牌和红色手牌改为一张牌');
}
}
},
subSkill:{
fan:{},
zhong:{},
nei:{}
},
ai:{
combo:'jieyuan'
}
},
fenxin_old:{
mode:['identity'],
trigger:{source:'dieBegin'},
init:function(player){
@ -9733,7 +9787,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
jieyuan_less:'竭缘',
jieyuan_info:'当你对一名其他角色造成伤害时,若其体力值大于或等于你的体力值,你可弃置一张黑色手牌令此伤害+1当你受到一名其他角色造成的伤害时若其体力值大于或等于你的体力值你可弃置一张红色手牌令此伤害-1。',
fenxin:'焚心',
fenxin_info:'限定技,当你杀死一名非主公角色时,在其翻开身份牌之前,你可以与该角色交换身份牌。(你的身份为主公时不能发动此技能)',
fenxin_info:'锁定技,一名其他角色死亡后,若其身份为:忠臣,你发动“竭缘”减少伤害无体力值限制;反贼,你发动“竭缘”增加伤害无体力值限制;内奸,将“竭缘”中的黑色手牌和红色手牌改为一张牌。',
fenxin_old_info:'限定技,当你杀死一名非主公角色时,在其翻开身份牌之前,你可以与该角色交换身份牌。(你的身份为主公时不能发动此技能)',
shixin:'释衅',
shixin_info:'锁定技,当你受到火属性伤害时,你防止此伤害',
qingyi:'轻逸',

View File

@ -1367,18 +1367,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
'step 0'
if(player.storage.fumian_choice=='draw'){
player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸一张牌','使用红色牌可以多选择两个目标',function(event,player){
player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸一张牌','使用红色牌可以多选择两个目标(限一次)',function(event,player){
if(player.hp==1||player.countCards('h')<=1) return 0;
return 1;
});
}
else if(player.storage.fumian_choice=='red'){
player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸两张牌','使用红色牌可以多选择一个目标',function(event,player){
player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸两张牌','使用红色牌可以多选择一个目标(限一次)',function(event,player){
return 0;
});
}
else{
player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸一张牌','使用红色牌可以多选择一个目标',function(event,player){
player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸一张牌','使用红色牌可以多选择一个目标(限一次)',function(event,player){
if(player.hp==1||player.countCards('h')<player.hp) return 0;
return 1;
});
@ -1437,16 +1437,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.num+=player.storage.fumian_draw;
}
},
red2:{},
red:{
trigger:{player:'useCard'},
direct:true,
mark:true,
onremove:true,
intro:{
content:'你使用红色牌可以多选择#个目标'
content:'你使用红色牌可以多选择#个目标(限一次)'
},
filter:function(event,player){
if(get.color(event.card)!='red') return false;
if(player.hasSkill('fumian_red2')) return false;
var info=get.info(event.card);
if(info.allowMultiple==false) return false;
if(event.targets&&!info.multitarget){
@ -1490,6 +1492,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(event.targets){
player.logSkill('fumian',event.targets);
trigger.targets.addArray(event.targets);
player.addTempSkill('fumian_red2');
}
}
}
@ -9098,7 +9101,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fuzhu:'伏诛',
fuzhu_info:'一名男性角色的结束阶段,若牌堆剩余牌数不大于你体力值的十倍,则你可以依次对其使用牌堆中所有的【杀】(不能超过游戏人数),然后洗牌',
fumian:'福绵',
fumian_info:'准备阶段你可以选择一项1.摸牌阶段多摸一张牌2.使用红色牌可以多选择一个目标。若与你上回合选择的选项不同,则该选项数值+1并复原此技能',
fumian_info:'准备阶段你可以选择一项1.摸牌阶段多摸一张牌2.使用红色牌可以多选择一个目标(限一次)。若与你上回合选择的选项不同,则该选项数值+1并复原此技能',
daiyan:'怠宴',
daiyan_info:'结束阶段你可以令一名其他角色从牌堆中获得一张红桃基本牌然后若其于上回合成为过该技能目标则其失去1点体力',
zhongjian:'忠鉴',

View File

@ -2953,6 +2953,7 @@
}
else{
ui.roundmenu.style.display='none';
alert('关闭触屏按钮后可通过手势打开菜单(默认为下划)')
}
}
},
@ -13841,7 +13842,7 @@
return this;
},
smoothAvatar:function(vice){
smoothAvatar:function(vice,video){
var div=ui.create.div('.fullsize');
div.style.background=getComputedStyle(this.node.avatar).background;
if(vice){
@ -13858,7 +13859,9 @@
div.remove();
},2000);
},100);
if(video!=false){
game.addVideo('smoothAvatar',this,vice);
}
},
changeSeat:function(position,video){
var player=this;
@ -14025,20 +14028,60 @@
this.node.nameol.innerHTML=str||this.nickname||'';
return this;
},
setAvatar:function(name,name2){
setAvatar:function(name,name2,video){
var node;
if(this.name2==name){
node=this.node.avatar2;
this.smoothAvatar(true,video);
}
else if(this.name==name){
node=this.node.avatar;
this.smoothAvatar(false,video);
}
if(node){
node.setBackground(name2,'character');
if(this==game.me&&ui.fakeme){
ui.fakeme.style.backgroundImage=node.style.backgroundImage;
}
if(video!=false){
game.addVideo('setAvatar',this,[name,name2]);
}
}
game.broadcast(function(player,name,name2){
player.setAvatar(name,name2,false);
},this,name,name2);
},
setAvatarQueue:function(name, list){
var node;
var player=this;
if(player.name2==name){
node=player.node.avatar2;
}
else{
node=player.node.avatar;
}
if(node._avatarqueue){
for(var i=0;i<list.length;i++){
node._avatarqueue.push(list[i]);
}
}
else{
var func=function(){
if(node._avatarqueue.length){
player.setAvatar(name,node._avatarqueue.shift(),false);
}
else{
clearInterval(node._avatarqueueinterval);
delete node._avatarqueue;
delete node._avatarqueueinterval;
player.setAvatar(name,name);
}
};
node._avatarqueue=list.slice(0);
node._avatarqueueinterval=setInterval(func,1000);
func();
}
game.addVideo('setAvatarQueue',this,[name,list]);
},
update:function(){
if(_status.video&&arguments.length==0) return;
@ -24182,6 +24225,16 @@
}
}
},
setAvatar:function(player,content){
if(player&&content&&content.length==2){
player.setAvatar(content[0],content[1])
}
},
setAvatarQueue:function(player,content){
if(player&&content&&content.length==2){
player.setAvatarQueue(content[0],content[1])
}
},
addSubPlayer:function(player,content){
if(player&&content&&content[0]&&content[1]&&
content[2]&&content[3]&&content[4]){
@ -29135,15 +29188,37 @@
ul.appendChild(li);
}
var dialog=ui.create.dialog(caption,'hidden');
dialog.content.appendChild(ul);
var lic=ui.create.div(dialog.content);
lic.style.display='block';
ul.style.display='inline-block';
ul.style.marginLeft='-40px';
lic.appendChild(ul);
if(players){
for(var i=0;i<players.length;i++){
if(!lib.character[players[i]]){
players.splice(i--,1);
}
}
if(players.length){
dialog.addSmall([players,'character']);
dialog.classList.add('forcebutton');
dialog.classList.add('withbg');
}
}
if(cards){
for(var i=0;i<cards.length;i++){
if(!lib.card[cards[i]]){
cards.splice(i--,1);
}
}
if(cards.length){
for(var i=0;i<cards.length;i++){
cards[i]=[get.translation(get.type(cards[i])),'',cards[i]]
}
dialog.addSmall([cards,'vcard']);
dialog.classList.add('forcebutton');
dialog.classList.add('withbg');
}
}
dialog.open();
var hidden=false;

View File

@ -1,8 +1,10 @@
window.noname_update={
version:'1.9.45.2',
version:'1.9.45.3',
update:'1.9.45',
changeLog:[
'bug修复'
'武将修改',
'players://["ns_guanlu","ns_caocaosp","re_xushu","wuxian","lingju"]',
'cards://["gw_kunenfayin","gw_wenyi"]',
],
files:[
'game/game.js',
@ -15,18 +17,18 @@ window.noname_update={
// 'card/gujian.js',
// 'card/yunchou.js',
// 'card/hearth.js',
// 'card/gwent.js',
'card/gwent.js',
// 'card/standard.js',
// 'character/*',
// 'character/hearth.js',
// 'character/gwent.js',
'character/diy.js',
'character/standard.js',
// 'character/sp.js',
// 'character/swd.js',
'character/shenhua.js',
'character/refresh.js',
'character/yijiang.js',
'character/sp.js',
// 'character/rank.js',
// 'character/yijiang.js',
// 'character/xianjian.js',
// 'mode/identity.js',
// 'mode/boss.js',
// 'mode/guozhan.js',

View File

@ -1467,13 +1467,13 @@ div:not(.handcards)>.card>.info>span,
overflow: visible;
}
.mark-container.marks>div>.markcount.menubutton {
font-size: 18px;
width: 24px;
height: 24px;
line-height: 28px;
font-size: 12px;
width: 16px;
height: 16px;
line-height: 18px;
position: absolute;
left: 32px;
top: 28px;
left: 36px;
top: 34px;
border-radius: 100%;
}
.mark-container.marks>.card.fullskin>.image{