This commit is contained in:
libccy 2016-07-01 09:31:02 +08:00
parent 6639769ad4
commit 56af0b5678
17 changed files with 141 additions and 68 deletions

View File

@ -585,16 +585,21 @@ card.guozhan={
xietianzi:{
trigger:{player:'phaseAfter'},
filter:function(event,player){
return player.num('he')>0;
return player.hasSkill('xietianzi');
},
forced:true,
popup:false,
content:function(){
"step 0"
player.removeSkill('xietianzi');
player.chooseToDiscard('he','是否弃置一张牌并获得一个额外回合?').set('ai',function(card){
return 10-ai.get.value(card);
});
if(player.num('he')>0){
player.chooseToDiscard('he','是否弃置一张牌并获得一个额外回合?').set('ai',function(card){
return 10-ai.get.value(card);
});
}
else{
event.finish();
}
"step 1"
if(result.bool){
player.phase();
@ -788,7 +793,10 @@ card.guozhan={
if(target.isUnseen()) return 0;
return 0.5;
},
target:1
target:function(player,target){
if(target.isUnseen()) return 0;
return 1;
}
},
}
},

View File

@ -341,6 +341,7 @@ card.hearth={
return target==player;
},
usable:3,
forceUsable:true,
content:function(){
'step 0'
ui.special.appendChild(cards[0]);

View File

@ -80,7 +80,6 @@ card.mingzhong={
fullskin:true,
enable:true,
type:'trick',
range:{global:1},
filterTarget:true,
content:function(){
'step 0'
@ -192,9 +191,9 @@ card.mingzhong={
},
translate:{
shengdong:'声东击西',
shengdong_info:'出牌阶段,对一名角色使用。你交给目标角色一张手牌,若如此做,其将两张牌交给另一名由你选择的其他角色',
shengdong_info:'出牌阶段,对一名其他角色使用。你交给目标角色一张手牌,若如此做,其将两张牌交给另一名由你选择的其他角色',
zengbin:'增兵减灶',
zengbin_info:'出牌阶段,对距离为1的一名角色使用。目标角色摸三张牌然后选择一项1.弃置一张非基本牌2.弃置两张牌',
zengbin_info:'出牌阶段,对一名角色使用。目标角色摸三张牌然后选择一项1.弃置一张非基本牌2.弃置两张牌',
caomu:'草木皆兵',
caomu_info:'出牌阶段对一名其他角色使用。将【草木皆兵】放置于该角色的判定区里若判定结果不为梅花摸牌阶段目标角色少摸一张牌摸牌阶段结束时与其距离为1的角色各摸一张牌',
},

View File

@ -442,6 +442,7 @@ card.shenqi={
haotianta:{
trigger:{global:'judgeBefore'},
direct:true,
usable:3,
content:function(){
"step 0"
event.cards=get.cards(3);
@ -740,7 +741,7 @@ card.shenqi={
donghuangzhong_info:'回合结束阶段,你可以弃置一张手牌,并选择一名角色将一张随机判定牌置入其判定区',
xuanyuanjian_info:'锁定技每当你即将造成一次伤害你令此伤害加一并变为雷属性此伤害结算后你流失一点体力并摸一张牌。任何时候若你体力值不超过2则立即失去轩辕剑',
pangufu_info:'锁定技,每当你造成一次伤害,受伤角色须弃置一张牌',
haotianta_info:'任意一名角色进行判定前你可以观看牌堆顶的3张牌并选择一张作为判定结果此结果不可被更改也不能触发技能',
haotianta_info:'任意一名角色进行判定前你可以观看牌堆顶的3张牌并选择一张作为判定结果此结果不可被更改也不能触发技能。每回合最多发动3次',
shennongding_info:'出牌阶段,你可以弃置两张手牌,然后回复一点体力。每阶段限一次',
kongdongyin_info:'令你抵挡一次死亡将体力回复至1并摸一张牌发动后进入弃牌堆',
kunlunjingc_info:'出牌阶段限一次,你可以观看牌堆顶的三张牌,然后用一张手牌替换其中的一张',

View File

@ -522,21 +522,26 @@ card.yunchou={
filterTarget:true,
content:function(){
"step 0"
target.chooseToDiscard('he',2).ai=function(card){
if(target.hasSkillTag('nofire')) return 0;
if(ai.get.damageEffect(target,player,target,'fire')>=0&&
!target.hasSkillTag('maixie')) return 0;
if(player.get('s').contains('xinwuyan')) return 0;
if(target.get('s').contains('xinwuyan')) return 0;
if(card.name=='tao') return 0;
if(target.hp==1&&card.name=='jiu') return 0;
if(target.hp==1&&get.type(card)!='basic'){
return 10-ai.get.value(card);
}
return 8-ai.get.value(card);
};
if(target.num('he')<2){
event.directfalse=true;
}
else{
target.chooseToDiscard('he',2).ai=function(card){
if(target.hasSkillTag('nofire')) return 0;
if(ai.get.damageEffect(target,player,target,'fire')>=0&&
!target.hasSkillTag('maixie')) return 0;
if(player.get('s').contains('xinwuyan')) return 0;
if(target.get('s').contains('xinwuyan')) return 0;
if(card.name=='tao') return 0;
if(target.hp==1&&card.name=='jiu') return 0;
if(target.hp==1&&get.type(card)!='basic'){
return 10-ai.get.value(card);
}
return 8-ai.get.value(card);
};
}
"step 1"
if(!result.bool){
if(event.directfalse&&!result.bool){
target.damage('fire');
}
},

View File

@ -646,15 +646,11 @@ character.gujian={
},
content:function(){
game.swapSeat(player,target,true,true);
player.useCard({name:'sha'},target);
player.useCard({name:'sha'},target,false);
},
ai:{
result:{
target:function(player,target){
if(player.num('h','sha')&&
lib.filter.targetInRange({name:'sha'},player,target)){
return 0;
}
return ai.get.effect(target,{name:'sha'},player,target);
},
},
@ -1110,7 +1106,7 @@ character.gujian={
boyun2:'拨云',
boyun_info:'在你的回合内,你可以弃置一张装备牌,并展示牌堆顶的一张牌,若其为装备牌,你须将其交给任意一张角色并对其造成一点伤害,否则你摸一张牌',
jizhan:'疾战',
jizhan_info:'出牌阶段限一次,你可以将移动到任意一名角色的前一位,视为对其使用了一张杀',
jizhan_info:'出牌阶段限一次,你可以将移动到任意一名角色的前一位,视为对其使用了一张不计入出杀次数的杀',
qianjun:'千军',
qianjun_info:'每当你使用一张杀你可以弃置一张牌令距离目标1以内的所有角色成为额外目标',
xuanning:'玄凝',

View File

@ -519,7 +519,7 @@ character.hearth={
enable:'phaseUse',
usable:1,
filterTarget:function(card,player,target){
return target!=player;
return target!=player&&!target.isMin();
},
delay:false,
content:function(){
@ -1600,6 +1600,9 @@ character.hearth={
discard:{
trigger:{global:'phaseEnd'},
forced:true,
check:function(event,player){
return ai.get.attitude(player,event.player)<0;
},
filter:function(event,player){
return typeof event.player.storage.shixu=='number'&&
event.player.storage.shixu>3000&&event.player.num('he')>0&&event.player.isAlive();
@ -2302,7 +2305,8 @@ character.hearth={
},
fengnu:{
mod:{
cardUsable:function(){
cardUsable:function(card){
if(get.info(card)&&get.info(card).forceUsable) return;
return Infinity;
},
targetInRange:function(){
@ -3621,7 +3625,7 @@ character.hearth={
return 1.2;
}
},
threaten:1.3
threaten:2
},
group:'tuteng_lose'
},

View File

@ -75,7 +75,7 @@ character.ow={
'step 0'
player.discardPlayerCard('是否发动【目镜】?',trigger.target).logSkill=['mujing'];
'step 1'
if(player.num('h')<trigger.target.num('h')){
if(result.bool&&player.num('h')<trigger.target.num('h')){
player.draw();
}
}
@ -527,8 +527,11 @@ character.ow={
player.discard(result.cards);
player.logSkill('yihun',result.targets);
player.addSkill('yihun2');
player.storage.yihun2=result.targets[0];
player.markSkillCharacter('yihun2',result.targets[0],'移魂','在'+get.translation(result.targets)+'的下一回合开始时视为对其使用一张杀');
var target=result.targets[0]
player.storage.yihun2=target;
if(target&&(get.mode()!='guozhan')||!target.isUnseen()){
player.markSkillCharacter('yihun2',target,'移魂','在'+get.translation(target)+'的下一回合开始时视为对其使用一张杀');
}
}
},
},

View File

@ -2787,7 +2787,7 @@ character.shenhua={
audio:2,
trigger:{player:'dieBefore'},
forced:true,
filter:function(event,player){return player.maxHp>0},
filter:function(event,player){return player.maxHp>0&&player.hp<=0},
content:function(){
"step 0"
event.card=get.cards()[0];
@ -2802,7 +2802,10 @@ character.shenhua={
}
trigger.untrigger();
trigger.finish();
player.hp=0;
if(player.hp<=0){
player.hp=1;
player.update();
}
},
mod:{
maxHandcard:function(player){
@ -3253,8 +3256,7 @@ character.shenhua={
hongyan_info:
'锁定技,你的黑桃牌均视为红桃',
buqu_info:
'锁定技每当你扣减1点体力后若你当前的体力值为0你可以将牌堆顶的一张牌置于你的武将牌上'+
'称为“创”,若所有“创”的点数均不同,你不会死亡。你的手牌上限为“创”的个数',
'锁定技在你死亡前若你的体力值不大于0亮出牌堆顶的一张牌并置于你的武将牌上若此牌的点数与你武将牌上已有的牌点数均不同则你回复至1体力。只要你的武将牌上有牌你的手牌上限便与这些牌数量相等',
leiji_info:
'每当你使用或打出一张【闪】,可令任意一名角色进行一次判定,若结果为黑桃,其受到两点雷电伤害',
guidao_info:

View File

@ -2415,16 +2415,15 @@ character.sp={
audio:2,
trigger:{player:'useCard'},
frequent:true,
usable:3,
filter:function(event,player){
if(!event.cards||event.cards.length!=1) return false;
if(_status.currentPhase!=player) return false;
if(!player.storage.fenyin) return false;
if(player.storage.fenyin2>=3) return false;
return get.color(player.storage.fenyin)!=get.color(event.cards[0]);
},
content:function(){
player.draw();
player.storage.fenyin2++;
},
intro:{
content:'card'
@ -2454,7 +2453,6 @@ character.sp={
priority:10,
content:function(){
player.storage.fenyin=null;
player.storage.fenyin2=0;
}
},
dujin:{
@ -3014,7 +3012,7 @@ character.sp={
return event.source&&event.nature=='thunder';
},
check:function(event,player){
return ai.get.attitude(player,event.source)>0;
return ai.get.attitude(player,event.source)>0&&ai.get.attitude(player,event.player)<0;
},
prompt:function(event){
return get.translation(event.source)+'即将对'+get.translation(event.player)+'造成伤害,是否发动【辅祭】?';
@ -4086,6 +4084,15 @@ character.sp={
if(ai.get.damageEffect(trigger.player,player,player)<=0){
nono=true
}
else if(trigger.player.hp>2){
nono=true;
}
else if(trigger.player.hp>1&&player.num('h')<3){
nono=true;
}
else if(trigger.player.canUse('sha',player)&&!player.num('h','shan')&&trigger.player.num('h')>=3){
nono=true;
}
var next=player.chooseToDiscard('是否对'+get.translation(trigger.player)+'发动【鸩毒】?');
next.set('ai',function(card){
if(_status.event.nono) return -1;

View File

@ -2936,7 +2936,10 @@ character.swd={
"step 0"
var next=player.chooseToDiscard('是否弃置两张手牌将'+get.translation(trigger.card)+'反弹?',2);
next.ai=function(card){
if(ai.get.effect(player,trigger.card)<0) return 4-ai.get.value(card);
if(ai.get.effect(player,trigger.card)<0){
if(card.name=='liuxinghuoyu') return 7-ai.get.value(card);
return 5-ai.get.value(card);
}
return 0;
}
next.logSkill='yihua';

View File

@ -1237,6 +1237,7 @@ character.xianjian={
if(ai.get.effect(player,trigger.card,trigger.player,player)<0){
if(get.tag(trigger.card,'respondSha')&&player.num('h','sha')) return 0;
if(get.tag(trigger.card,'respondShan')&&player.num('h','shan')) return 0;
if(card.name=='guohe') return 0;
return 4-ai.get.value(card);
}
return 0;

View File

@ -2342,6 +2342,7 @@ character.yijiang={
order:7,
result:{
target:function(player,target){
if(target.hasSkillTag('noe')) return 1;
if(target.get('e','1')||target.get('e','4')) return -1;
if(target.get('e','2')) return -0.7;
return -0.5;
@ -5945,7 +5946,7 @@ character.yijiang={
}
},
ai:{
order:8,
order:8.6,
result:{
target:function(player,target){
var num=player.getStat().skill.danshou;

View File

@ -7,7 +7,7 @@ window.config={
'gjqt_bailitusu','yuanshao','swd_anka','swd_nicole','daqiao','re_daqiao','hs_xuanzhuanjijia',
'zhuran','huatuo','swd_tuwei','hs_guldan','wangyi','caoang','swd_guyue','swd_rongshuang',
'swd_jiangziya','guojia','re_guojia','shen_caocao','swd_qiner','caopi','hs_yngvar',
'gjqt_aruan','swd_hanluo','hs_anduin','swd_huanglei','yxs_luzhishen','swd_muyun'],
'gjqt_aruan','swd_hanluo','hs_anduin','swd_huanglei','yxs_yujix','yxs_luzhishen','swd_muyun'],
replacecharacter:{
zhangjiao:'sp_zhangjiao',
caocao:'re_caocao',

View File

@ -7013,6 +7013,9 @@
if(get.config('revive')&&lib.mode[lib.config.mode].config.revive){
ui.revive=ui.create.control('revive',ui.click.dierevive);
}
if(get.config('continue_game')&&lib.mode[lib.config.mode].config.continue_game){
ui.continue_game=ui.create.control('再战',game.reloadCurrent);
}
if(get.config('dierestart')&&lib.mode[lib.config.mode].config.dierestart){
ui.restart=ui.create.control('restart',game.reload);
}
@ -12161,6 +12164,17 @@
}
}
},
counttrigger:{
trigger:{global:'phaseAfter'},
forced:true,
popup:false,
silent:true,
priority:-50,
content:function(){
player.removeSkill('counttrigger');
delete player.storage.counttrigger;
}
},
_recoverCheck:{
trigger:{player:'recoverBefore'},
forced:true,
@ -15943,6 +15957,10 @@
else if(event._trigger.notrigger.contains(player)&&!lib.skill.global.contains(event.skill)){
event.finish();
}
else if(typeof info.usable=='number'&&player.hasSkill('counttrigger')&&
player.storage.counttrigger&&player.storage.counttrigger[event.skill]>=info.usable){
event.finish();
}
else{
var hidden=player.hiddenSkills.slice(0);
game.expandSkills(hidden);
@ -15996,6 +16014,20 @@
if(result&&result.bool==false) return;
var info=get.info(event.skill);
var next=game.createEvent(event.skill);
if(typeof info.usable=='number'){
if(!player.hasSkill('counttrigger')){
player.addSkill('counttrigger');
}
if(!player.storage.counttrigger){
player.storage.counttrigger={};
}
if(!player.storage.counttrigger[event.skill]){
player.storage.counttrigger[event.skill]=1;
}
else{
player.storage.counttrigger[event.skill]++;
}
}
next.player=player;
next._trigger=trigger;
next.triggername=event.triggername;
@ -16780,7 +16812,7 @@
});
}
}
else if(!_status.connectMode&&get.config('continue_game')){
else if(!_status.connectMode&&get.config('continue_game')&&!ui.continue_game){
ui.continue_game=ui.create.control('再战',game.reloadCurrent);
}
if(!ui.restart){
@ -25931,13 +25963,14 @@
if(event.skillDialog){
var str=get.translation(skill);
if(info.prompt){
var str2;
if(typeof info.prompt=='function'){
str+=''+info.prompt(event);
str2=info.prompt(event);
}
else{
str+=''+info.prompt;
str2=info.prompt;
}
event.skillDialog=ui.create.dialog(str);
event.skillDialog=ui.create.dialog(str,'<div><div style="width:100%;text-align:center">'+str2+'</div></div>');
}
else if(info.promptfunc){
event.skillDialog=ui.create.dialog(str,'<div><div style="width:100%">'+info.promptfunc(event,event.player)+'</div></div>');
@ -26065,7 +26098,7 @@
if(!ui.arena.classList.contains('menupaused')) game.resume2();
};
uiintro.addEventListener('mouseleave',clickintro);
uiintro.listen(clickintro);
uiintro.addEventListener('click',clickintro);
game.pause2();
return uiintro;
@ -27941,14 +27974,15 @@
uiintro.content.lastChild.style.display='block';
for(var i=0;i<esnodes.length;i++){
uiintro.content.lastChild.childNodes[i].listen(function(e){
e.stopPropagation();
uiintro.content.innerHTML='';
uiintro.add(this.str);
uiintro._place_text=uiintro.add('<div class="text" style="display:inline">'+lib.translate[this.link[2]+'_info']+'</div>');
uiintro.add(ui.create.div('.placeholder.slim'));
if(evt){
lib.placePoppedDialog(uiintro,evt);
}
// uiintro.content.innerHTML='';
// uiintro.add(this.str);
// uiintro._place_text=uiintro.add('<div class="text" style="display:inline">'+lib.translate[this.link[2]+'_info']+'</div>');
// uiintro.add(ui.create.div('.placeholder.slim'));
// if(evt){
// lib.placePoppedDialog(uiintro,evt);
// }
});
if(i<es.length){
uiintro.content.lastChild.childNodes[i].str=get.translation(es[i]);

View File

@ -1,5 +1,5 @@
window.noname_update={
version:'1.8.16.2beta',
version:'1.8.16.3',
changeLog:[
'修bug',
],
@ -8,11 +8,19 @@ window.noname_update={
'character/hearth.js',
'character/ow.js',
'character/swd.js',
'character/shenhua.js',
'character/yijiang.js',
'character/sp.js',
'character/xianjian.js',
'card/swd.js',
'card/guozhan.js',
'card/yunchou.js',
'card/shenqi.js',
'card/hearth.js',
'card/mingzhong.js',
'game/game.js',
'game/config.js',
'mode/stone.js',
'layout/default/layout.css',
],
'1.8.16.1':[],

View File

@ -1258,7 +1258,7 @@ mode.stone={
careerList:['mage','shaman','druid','paladin','rogue','priest','hunter','warrior','warlock'],
game:{
reserveDead:true,
bannedcards:['lebu','guiyoujie'],
bannedcards:['lebu','guiyoujie','xietianzi'],
onwash:function(){
if(_status.mode!='deck') return;
var list=[];
@ -1478,7 +1478,7 @@ mode.stone={
_status.event.dialog.content.insertBefore(buttons,node);
buttons.animate('start');
node.remove();
game.uncheck();
game.check();
};
@ -5129,14 +5129,14 @@ mode.stone={
"step 0"
target.discard(target.get('he'));
"step 1"
if(target.maxHp>1){
target.loseMaxHp(target.maxHp-1);
if(target.maxHp>2){
target.loseMaxHp(target.maxHp-2);
}
},
ai:{
result:{
target:function(player,target){
return 1-target.hp-target.num('h')/2;
return Math.min(0,2-target.hp)-target.num('h')/2;
}
},
order:7
@ -7940,8 +7940,8 @@ mode.stone={
}
else{
event.target.discard(event.target.get('h'));
if(event.target.maxHp>1){
event.target.loseMaxHp(event.target.maxHp-1);
if(event.target.maxHp>2){
event.target.loseMaxHp(event.target.maxHp-2);
}
}
}
@ -9940,7 +9940,7 @@ mode.stone={
druid_chengzhang2:'成长',
druid_chengzhang_info:'你出场时,己方主将获得一点行动值;你死亡时,己方主将需弃置一张手牌',
druid_huwei:'护卫',
druid_huwei_info:'你出场时,己方主将可以选择一项:对一名随从造成一点伤害,或弃置一名随从的所有牌并将其体力上限改为1',
druid_huwei_info:'你出场时,己方主将可以选择一项:对一名随从造成一点伤害,或弃置一名随从的所有牌并将其体力上限改为2',
stone_fachao:'法潮图腾',
@ -10116,7 +10116,7 @@ mode.stone={
spell_diyulieyan:'地狱烈焰',
spell_diyulieyan_info:'所有角色失去一点体力',
spell_chenmo:'沉默',
spell_chenmo_info:'弃置一名随从的所有牌,并令其体力上限减至1',
spell_chenmo_info:'弃置一名随从的所有牌,并令其体力上限减至2',
spell_zhiliaoshui:'治疗水',
spell_zhiliaoshui_info:'出牌阶段对自己使用,恢复两点体力值;或于濒死阶段对一名角色使用,令目标恢复一点体力',
spell_yanmie:'极恶之咒',