This commit is contained in:
libccy 2017-01-28 11:10:59 +08:00
parent 8f93d2b45b
commit f11eec4b31
7 changed files with 79 additions and 174 deletions

View File

@ -29,7 +29,7 @@ character.hearth={
hs_malorne:['male','wu',3,['enze','chongsheng']], hs_malorne:['male','wu',3,['enze','chongsheng']],
hs_malygos:['male','wei',4,['malymowang']], hs_malygos:['male','wei',4,['malymowang']],
hs_xuefashi:['male','wei',2,['liehun','xjumo']], hs_xuefashi:['male','wei',2,['liehun','xjumo']],
hs_loatheb:['male','wu',5,['fengyin']], hs_loatheb:['male','wu',5,['duzhang']],
hs_trueheart:['female','qun',3,['qianghuax']], hs_trueheart:['female','qun',3,['qianghuax']],
hs_sainaliusi:['male','wu',4,['chongsheng','yulu']], hs_sainaliusi:['male','wu',4,['chongsheng','yulu']],
hs_lrhonin:['male','wei',4,['bingyan','yufa']], hs_lrhonin:['male','wei',4,['bingyan','yufa']],
@ -2188,7 +2188,7 @@ character.hearth={
threaten:1.2 threaten:1.2
} }
}, },
fengyin:{ duzhang:{
trigger:{player:'phaseEnd'}, trigger:{player:'phaseEnd'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
@ -2202,19 +2202,19 @@ character.hearth={
}, },
content:function(){ content:function(){
'step 0' 'step 0'
player.chooseTarget(get.prompt('fengyin'),function(card,player,target){ player.chooseTarget(get.prompt('duzhang'),function(card,player,target){
return target!=player; return target!=player;
}).ai=function(target){ }).ai=function(target){
return -ai.get.attitude(player,target)*Math.sqrt(target.num('h')); return -ai.get.attitude(player,target)*Math.sqrt(target.num('h'));
} }
'step 1' 'step 1'
if(result.bool){ if(result.bool){
player.logSkill('fengyin',result.targets); player.logSkill('duzhang',result.targets);
result.targets[0].addTempSkill('fengyin2',{player:'phaseAfter'}); result.targets[0].addTempSkill('duzhang2',{player:'phaseAfter'});
} }
} }
}, },
fengyin2:{ duzhang2:{
mod:{ mod:{
cardEnabled:function(card){ cardEnabled:function(card){
if(get.type(card,'trick')=='trick') return false; if(get.type(card,'trick')=='trick') return false;
@ -5499,9 +5499,9 @@ character.hearth={
byuhuo_info:'觉醒技当你进入濒死状态时你须将体力和体力上限变为2并将武将牌翻至背面在你的下一回合开始时你对所有其他角色造成两点火焰伤害在此之前你不能成为其他角色的卡牌的目标', byuhuo_info:'觉醒技当你进入濒死状态时你须将体力和体力上限变为2并将武将牌翻至背面在你的下一回合开始时你对所有其他角色造成两点火焰伤害在此之前你不能成为其他角色的卡牌的目标',
yulu:'雨露', yulu:'雨露',
yulu_info:'出牌阶段限一次,你可以指定任意名角色各摸一张牌,然后各弃置一区域内的一张牌', yulu_info:'出牌阶段限一次,你可以指定任意名角色各摸一张牌,然后各弃置一区域内的一张牌',
fengyin:'封印', duzhang:'毒瘴',
fengyin2:'封印', duzhang2:'毒瘴',
fengyin_info:'回合结束阶段,若你于本回合内未使用过锦囊牌,你可以指定一名其他角色令其下个回合无法使用锦囊牌', duzhang_info:'回合结束阶段,若你于本回合内未使用过锦囊牌,你可以指定一名其他角色令其下个回合无法使用锦囊牌',
hannu:'寒怒', hannu:'寒怒',
hannu_info:'锁定技每当你受到一次伤害你将手牌数翻倍若你的手牌数因此超过10张你随机弃置若干张手牌直到手牌数等于你当前的体力值', hannu_info:'锁定技每当你受到一次伤害你将手牌数翻倍若你的手牌数因此超过10张你随机弃置若干张手牌直到手牌数等于你当前的体力值',
chuidiao:'垂钓', chuidiao:'垂钓',

View File

@ -30,12 +30,15 @@ character.ow={
qinru:{ qinru:{
trigger:{player:'useCardToBegin'}, trigger:{player:'useCardToBegin'},
filter:function(event,player){ filter:function(event,player){
return event.target!=player&&event.targets&&event.targets.length==1&&!event.target.hasSkill('qinru2'); return event.target!=player&&event.targets&&event.targets.length==1;
}, },
logTarget:'target', logTarget:'target',
check:function(event,player){ check:function(event,player){
return ai.get.attitude(player,event.player)<0; return ai.get.attitude(player,event.player)<0;
}, },
intro:{
content:'players'
},
content:function(){ content:function(){
'step 0' 'step 0'
trigger.target.judge(function(card){ trigger.target.judge(function(card){
@ -44,13 +47,6 @@ character.ow={
'step 1' 'step 1'
if(result.suit!='heart'){ if(result.suit!='heart'){
var target=trigger.target; var target=trigger.target;
var skills=target.get('s');
var list=[];
for(var i=0;i<skills.length;i++){
if(!get.is.locked(skills[i])){
list.push(skills[i]);
}
}
if(!player.storage.qinru){ if(!player.storage.qinru){
player.storage.qinru=[]; player.storage.qinru=[];
} }
@ -64,8 +60,8 @@ character.ow={
if(player.storage.qinru.length>2){ if(player.storage.qinru.length>2){
player.storage.qinru.shift(); player.storage.qinru.shift();
} }
target.disableSkill('qinru',list); target.addTempSkill('fengyin',{player:'phaseAfter'});
target.addSkill('qinru2'); player.markSkill('qinru');
} }
}, },
ai:{ ai:{
@ -73,31 +69,6 @@ character.ow={
threaten:1.3, threaten:1.3,
} }
}, },
qinru2:{
trigger:{player:'phaseAfter'},
forced:true,
mark:true,
audio:false,
popup:false,
content:function(){
player.enableSkill('qinru');
player.removeSkill('qinru2');
},
intro:{
content:function(st,player){
var storage=player.disabledSkills.qinru;
if(storage&&storage.length){
var str='失效技能:';
for(var i=0;i<storage.length;i++){
if(lib.translate[storage[i]+'_info']){
str+=get.translation(storage[i])+'、';
}
}
return str.slice(0,str.length-1);
}
}
}
},
yinshen:{ yinshen:{
trigger:{player:'phaseEnd'}, trigger:{player:'phaseEnd'},
direct:true, direct:true,
@ -2895,7 +2866,6 @@ character.ow={
translate:{ translate:{
ow_heiying:'黑影', ow_heiying:'黑影',
qinru:'侵入', qinru:'侵入',
qinru2:'侵入',
qinru_info:'每当你使用卡牌指定惟一目标时,你可以令目标进行一次判定,若结果不为红桃,该角色的非锁定技失效直到其下一回合结束', qinru_info:'每当你使用卡牌指定惟一目标时,你可以令目标进行一次判定,若结果不为红桃,该角色的非锁定技失效直到其下一回合结束',
yinshen:'隐身', yinshen:'隐身',
yinshen_info:'回合结束阶段,你可以弃置一张装备牌并获得潜行直到下一回合开始', yinshen_info:'回合结束阶段,你可以弃置一张装备牌并获得潜行直到下一回合开始',

View File

@ -993,16 +993,10 @@ character.refresh={
player.chooseToCompare(target).set('small',true); player.chooseToCompare(target).set('small',true);
"step 1" "step 1"
if(result.bool){ if(result.bool){
if(target.hasSkill('yijue2')==false){ if(!target.hasSkill('fengyin')){
var list=[]; target.addTempSkill('fengyin','phaseAfter');
for(var i=0;i<target.skills.length;i++){
if(!get.is.locked(target.skills[i])){
list.push(target.skills[i]);
}
}
target.disableSkill('yijue',list);
target.addSkill('yijue2');
} }
target.addTempSkill('yijue2','phaseAfter');
event.finish(); event.finish();
} }
else if(target.hp<target.maxHp){ else if(target.hp<target.maxHp){
@ -1044,15 +1038,7 @@ character.refresh={
} }
}, },
yijue2:{ yijue2:{
trigger:{global:'phaseAfter'},
forced:true,
mark:true, mark:true,
audio:false,
popup:false,
content:function(){
player.enableSkill('yijue');
player.removeSkill('yijue2');
},
mod:{ mod:{
cardEnabled:function(){ cardEnabled:function(){
return false; return false;
@ -1068,18 +1054,7 @@ character.refresh={
} }
}, },
intro:{ intro:{
content:function(st,player){ content:'不能使用或打出卡牌'
var storage=player.disabledSkills.yijue;
if(storage&&storage.length){
var str='失效技能:';
for(var i=0;i<storage.length;i++){
if(lib.translate[storage[i]+'_info']){
str+=get.translation(storage[i])+'、';
}
}
return str.slice(0,str.length-1);
}
}
} }
}, },
retieji:{ retieji:{
@ -1091,16 +1066,8 @@ character.refresh={
content:function(){ content:function(){
"step 0" "step 0"
player.judge(function(){return 0}); player.judge(function(){return 0});
var target=trigger.target; if(!trigger.target.hasSkill('fengyin')){
if(target.hasSkill('retieji2')==false){ trigger.target.addTempSkill('fengyin','phaseAfter');
var list=[];
for(var i=0;i<target.skills.length;i++){
if(!get.is.locked(target.skills[i])){
list.push(target.skills[i]);
}
}
target.disableSkill('retieji',list);
target.addSkill('retieji2');
} }
"step 1" "step 1"
var suit=get.suit(result.card); var suit=get.suit(result.card);
@ -1120,31 +1087,6 @@ character.refresh={
} }
} }
}, },
retieji2:{
trigger:{global:'phaseAfter'},
forced:true,
content:function(){
player.enableSkill('retieji');
player.removeSkill('retieji2');
},
audio:false,
mark:true,
popup:false,
intro:{
content:function(st,player){
var storage=player.disabledSkills.retieji;
if(storage&&storage.length){
var str='失效技能:';
for(var i=0;i<storage.length;i++){
if(lib.translate[storage[i]+'_info']){
str+=get.translation(storage[i])+'、';
}
}
return str.slice(0,str.length-1);
}
}
}
},
reyicong:{ reyicong:{
mod:{ mod:{
globalFrom:function(from,to,current){ globalFrom:function(from,to,current){
@ -1549,7 +1491,6 @@ character.refresh={
yijue:'义绝', yijue:'义绝',
yijue2:'义绝', yijue2:'义绝',
retieji:'铁骑', retieji:'铁骑',
retieji2:'铁骑',
refankui:'反馈', refankui:'反馈',
reyicong:'义从', reyicong:'义从',
qiaomeng:'趫猛', qiaomeng:'趫猛',

View File

@ -2604,7 +2604,7 @@ character.swd={
return '是否弃置一枚破咒标记令'+get.translation(event.player)+ return '是否弃置一枚破咒标记令'+get.translation(event.player)+
'的非锁定技失效?(剩余'+player.storage.pozhou+'枚)'; '的非锁定技失效?(剩余'+player.storage.pozhou+'枚)';
}, },
popup:false, logTarget:'player',
content:function(){ content:function(){
player.storage.pozhou--; player.storage.pozhou--;
if(!player.storage.pozhou){ if(!player.storage.pozhou){
@ -2613,39 +2613,7 @@ character.swd={
else{ else{
player.updateMarks(); player.updateMarks();
} }
var target=trigger.player; trigger.player.addTempSkill('fengyin',{player:'phaseBegin'});
var list=[];
for(var i=0;i<target.skills.length;i++){
if(!get.is.locked(target.skills[i])){
list.push(target.skills[i]);
}
}
target.disableSkill('pozhou',list);
target.addSkill('pozhou3');
player.line(target,'green');
}
},
pozhou3:{
trigger:{player:'phaseBegin'},
forced:true,
mark:true,
content:function(){
player.enableSkill('pozhou');
player.removeSkill('pozhou3');
},
intro:{
content:function(st,player){
var storage=player.disabledSkills.pozhou;
if(storage&&storage.length){
var str='失效技能:';
for(var i=0;i<storage.length;i++){
if(lib.translate[storage[i]+'_info']){
str+=get.translation(storage[i])+'、';
}
}
return str.slice(0,str.length-1);
}
}
} }
}, },
fengmo:{ fengmo:{
@ -8735,8 +8703,6 @@ character.swd={
pozhou:'破咒', pozhou:'破咒',
pozhou_bg:'破', pozhou_bg:'破',
pozhou2:'破咒', pozhou2:'破咒',
pozhou3:'破咒',
pozhou3_bg:'咒',
pozhou_info:'每当你受到一次伤害,你获得一枚破咒标记。在其他角色的回合开始阶段,你可以弃置一枚破咒标记令其所有非锁定技失效直到下一回合开始', pozhou_info:'每当你受到一次伤害,你获得一枚破咒标记。在其他角色的回合开始阶段,你可以弃置一枚破咒标记令其所有非锁定技失效直到下一回合开始',
xuanzhou:'玄咒', xuanzhou:'玄咒',
xuanzhou_info:'出牌阶段限一次,你可以将一张非延时锦囊牌当作任意一张延时锦囊,对任意一名角色使用(无视锦囊使用范围限制)', xuanzhou_info:'出牌阶段限一次,你可以将一张非延时锦囊牌当作任意一张延时锦囊,对任意一名角色使用(无视锦囊使用范围限制)',

View File

@ -5548,6 +5548,7 @@
_lianhuan:'连环', _lianhuan:'连环',
_lianhuan2:'连环', _lianhuan2:'连环',
qianxing:'潜行', qianxing:'潜行',
fengyin:'封印',
}, },
element:{ element:{
content:{ content:{
@ -11727,32 +11728,27 @@
this.awakenedSkills.add(skill); this.awakenedSkills.add(skill);
}, },
disableSkill:function(skill,skills){ disableSkill:function(skill,skills){
this.disabledSkills[skill]=skills;
if(typeof skills=='string'){ if(typeof skills=='string'){
this.removeSkillTrigger(skills,true); if(!this.disabledSkills[skills]){
this.disabledSkills[skills]=[];
}
this.disabledSkills[skills].add(skill);
} }
else if(Array.isArray(skills)){ else if(Array.isArray(skills)){
for(var i=0;i<skills.length;i++){ for(var i=0;i<skills.length;i++){
this.removeSkillTrigger(skills[i],true); this.disableSkill(skill,skills[i]);
} }
} }
return this;
}, },
enableSkill:function(skill){ enableSkill:function(skill){
var skills=this.disabledSkills[skill]; for(var i in this.disabledSkills){
delete this.disabledSkills[skill]; this.disabledSkills[i].remove(skill);
var list=this.get('s'); if(this.disabledSkills[i].length==0){
if(typeof skills=='string'){ delete this.disabledSkills[i];
if(list.contains(skills)){
this.addSkillTrigger(skills,false,true);
}
}
else if(Array.isArray(skills)){
for(var i=0;i<skills.length;i++){
if(list.contains(skills[i])){
this.addSkillTrigger(skills[i],false,true);
}
} }
} }
return this;
}, },
checkMarks:function(){ checkMarks:function(){
var skills=this.get('s'); var skills=this.get('s');
@ -14003,6 +13999,7 @@
var addList=function(skill,player){ var addList=function(skill,player){
if(listAdded[skill]) return; if(listAdded[skill]) return;
if(player.forbiddenSkills[skill]) return; if(player.forbiddenSkills[skill]) return;
if(player.disabledSkills[skill]) return;
listAdded[skill]=true; listAdded[skill]=true;
var info=lib.skill[skill]; var info=lib.skill[skill];
var num=0; var num=0;
@ -14774,6 +14771,40 @@
others:{}, others:{},
zhu:{}, zhu:{},
zhuSkill:{}, zhuSkill:{},
fengyin:{
init:function(player){
var skills=player.get('s');
for(var i=0;i<skills.length;i++){
if(get.is.locked(skills[i])){
skills.splice(i--,1);
}
}
player.disableSkill('fengyin',skills);
},
onremove:function(player){
player.enableSkill('fengyin');
},
mark:true,
intro:{
content:function(storage,player){
var list=[];
for(var i in player.disabledSkills){
if(player.disabledSkills[i].contains('fengyin')){
list.push(i)
}
}
if(list.length){
var str='失效技能:';
for(var i=0;i<list.length;i++){
if(lib.translate[list[i]+'_info']){
str+=get.translation(list[i])+'、';
}
}
return str.slice(0,str.length-1);
}
}
}
},
qianxing:{ qianxing:{
mark:true, mark:true,
nopop:true, nopop:true,
@ -21115,14 +21146,7 @@
filterSkills:function(skills,player){ filterSkills:function(skills,player){
var out=skills.slice(0); var out=skills.slice(0);
for(var i in player.disabledSkills){ for(var i in player.disabledSkills){
if(typeof player.disabledSkills[i]=='string'){ out.remove(i);
out.remove(player.disabledSkills[i]);
}
else if(Array.isArray(player.disabledSkills[i])){
for(var j=0;j<player.disabledSkills[i].length;j++){
out.remove(player.disabledSkills[i][j]);
}
}
} }
return out; return out;
}, },

View File

@ -17,8 +17,9 @@ window.noname_update={
'character/xianjian.js', 'character/xianjian.js',
'character/refresh.js', 'character/refresh.js',
'character/shenhua.js', 'character/shenhua.js',
'character/swd.js',
'character/yijiang.js', 'character/yijiang.js',
// 'mode/chess.js', 'mode/boss.js',
'mode/versus.js', 'mode/versus.js',
// 'mode/guozhan.js', // 'mode/guozhan.js',
// 'mode/identity.js', // 'mode/identity.js',

View File

@ -2265,15 +2265,16 @@ mode.boss={
player.chooseCardTarget({ player.chooseCardTarget({
position:'he', position:'he',
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
if(player==target) return false;
if(!lib.character[target.name]) return false; if(!lib.character[target.name]) return false;
return player!=target&&!target.storage.boss_hujia; return true;
}, },
filterCard:lib.filter.cardDiscardable, filterCard:lib.filter.cardDiscardable,
ai1:function(card){ ai1:function(card){
return ai.get.unuseful(card)+9; return ai.get.unuseful(card)+9;
}, },
ai2:function(target){ ai2:function(target){
if(target.disabledSkills.boss_hujia) return Math.max(1,10-target.maxHp); if(target.storage.boss_hujia) return Math.max(1,10-target.maxHp);
return 1/target.maxHp; return 1/target.maxHp;
}, },
prompt:get.prompt('boss_hujia') prompt:get.prompt('boss_hujia')
@ -2282,11 +2283,12 @@ mode.boss={
if(result.bool){ if(result.bool){
var target=result.targets[0]; var target=result.targets[0];
player.logSkill('boss_hujia',target); player.logSkill('boss_hujia',target);
if(target.disabledSkills.boss_hujia){ if(target.storage.boss_hujia){
target.loseMaxHp(); target.loseMaxHp();
} }
else{ else{
target.disableSkill('boss_hujia',lib.character[target.name][3]); target.disableSkill('boss_hujia',lib.character[target.name][3]);
target.storage.boss_hujia=true;
} }
player.discard(result.cards); player.discard(result.cards);
} }
@ -2319,6 +2321,7 @@ mode.boss={
"step 2" "step 2"
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
game.players[i].enableSkill('boss_hujia'); game.players[i].enableSkill('boss_hujia');
delete game.players[i].storage.boss_hujia;
} }
if(game.bossinfo){ if(game.bossinfo){
game.bossinfo.loopType=1; game.bossinfo.loopType=1;