修改boss

This commit is contained in:
libccy 2015-05-13 11:14:57 +08:00
parent aa7438c60d
commit c0de77e02f
3 changed files with 111 additions and 55 deletions

View File

@ -1,3 +1,4 @@
'use strict';
card.ex={ card.ex={
card:{ card:{
hanbing:{ hanbing:{
@ -28,7 +29,7 @@ card.ex={
hanbing_skill:{ hanbing_skill:{
trigger:{player:'shaHit'}, trigger:{player:'shaHit'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event){
return event.target.get('he').length>0; return event.target.get('he').length>0;
}, },
content:function(){ content:function(){
@ -42,10 +43,10 @@ card.ex={
if(eff<=0) return ai.get.buttonValue(button); if(eff<=0) return ai.get.buttonValue(button);
if(trigger.target.hp==1) return false; if(trigger.target.hp==1) return false;
if(player.skills.contains('jiu')||player.skills.contains('tianxianjiu')) return false; if(player.skills.contains('jiu')||player.skills.contains('tianxianjiu')) return false;
if(ui.dialog.buttons.length<2) return -1; if(_status.event.dialog.buttons.length<2) return -1;
var num=0; var num=0;
for(var i=0;i<ui.dialog.buttons.length;i++){ for(var i=0;i<_status.event.dialog.buttons.length;i++){
if(ai.get.buttonValue(ui.dialog.buttons[i])>1.5) num++; if(ai.get.buttonValue(_status.event.dialog.buttons[i])>1.5) num++;
} }
if(num>=2) return ai.get.buttonValue(button)-1.5; if(num>=2) return ai.get.buttonValue(button)-1.5;
}); });
@ -64,7 +65,7 @@ card.ex={
trigger:{target:'shaBefore'}, trigger:{target:'shaBefore'},
forced:true, forced:true,
priority:6, priority:6,
filter:function(event,player){ filter:function(event){
if(event.player.num('s','unequip')) return false; if(event.player.num('s','unequip')) return false;
return (event.card.name=='sha'&&get.color(event.card)=='black') return (event.card.name=='sha'&&get.color(event.card)=='black')
}, },

View File

@ -1347,7 +1347,7 @@ character.yijiang={
event.finish(); event.finish();
} }
"step 2" "step 2"
if(result.bool){ if(result.bool&&result.targets.length){
game.log(get.translation(player)+'指定的出杀目标为'+get.translation(result.targets)); game.log(get.translation(player)+'指定的出杀目标为'+get.translation(result.targets));
event.target.line(result.targets); event.target.line(result.targets);
event.target.chooseToUse('对'+get.translation(result.targets)+'使用一张杀,或令'+get.translation(player)+'获得你的两张牌',{name:'sha'},result.targets[0],-1); event.target.chooseToUse('对'+get.translation(result.targets)+'使用一张杀,或令'+get.translation(player)+'获得你的两张牌',{name:'sha'},result.targets[0],-1);

View File

@ -234,7 +234,12 @@ mode.boss={
td=ui.create.div(tr); td=ui.create.div(tr);
td.innerHTML=get.translation(game.dead[i]); td.innerHTML=get.translation(game.dead[i]);
td=ui.create.div(tr); td=ui.create.div(tr);
td.innerHTML='剩余'+get.cnNumber(game.bossinfo.chongzheng-game.dead[i].storage.boss_chongzheng)+'回合'; if(game.dead[i].maxHp>0){
td.innerHTML='剩余'+get.cnNumber(game.bossinfo.chongzheng-game.dead[i].storage.boss_chongzheng)+'回合';
}
else{
td.innerHTML='无法重整'
}
} }
if(!added){ if(!added){
@ -276,25 +281,27 @@ mode.boss={
else if(player.isDead()){ else if(player.isDead()){
if(player.hp<0) player.hp=0; if(player.hp<0) player.hp=0;
player.storage.boss_chongzheng++; player.storage.boss_chongzheng++;
if(player.hp<player.maxHp){ if(player.maxHp>0){
player.hp++; if(player.hp<player.maxHp){
game.log(get.translation(player)+'回复了一点体力'); player.hp++;
game.log(get.translation(player)+'回复了一点体力');
}
else{
var card=get.cards()[0];
var sort=lib.config.sort_card(card);
var position=sort>0?player.node.handcards1:player.node.handcards2;
card.fix();
card.animate('start');
position.insertBefore(card,position.firstChild);
player.$draw();
game.log(get.translation(player)+'摸了一张牌');
}
player.update();
if(player.storage.boss_chongzheng>=game.bossinfo.chongzheng){
player.revive();
}
} }
else{
var card=get.cards()[0];
var sort=lib.config.sort_card(card);
var position=sort>0?player.node.handcards1:player.node.handcards2;
card.fix();
card.animate('start');
position.insertBefore(card,position.firstChild);
player.$draw();
game.log(get.translation(player)+'摸了一张牌');
}
player.update();
if(player.storage.boss_chongzheng>=game.bossinfo.chongzheng){
player.revive();
}
if(game.bossinfo.loopType==2){ if(game.bossinfo.loopType==2){
game.boss.chongzheng=true; game.boss.chongzheng=true;
} }
@ -488,7 +495,6 @@ mode.boss={
}, },
boss_caiwenji:{ boss_caiwenji:{
loopType:2, loopType:2,
chongzheng:3
}, },
boss_pangtong:{ boss_pangtong:{
loopType:2 loopType:2
@ -523,7 +529,7 @@ mode.boss={
boss_zhouyu:['male','wu',6,['huoshen','boss_honglian','boss_xianyin'],['fullskin','boss'],'zhu'], boss_zhouyu:['male','wu',6,['huoshen','boss_honglian','boss_xianyin'],['fullskin','boss'],'zhu'],
boss_lvbu1:['male','qun',8,['mashu','wushuang','boss_baonu'],['fullskin','boss'],'wei'], boss_lvbu1:['male','qun',8,['mashu','wushuang','boss_baonu'],['fullskin','boss'],'wei'],
boss_lvbu2:['male','qun',4,['mashu','wushuang','swd_xiuluo','shenwei','shenji'],['fullskin','hiddenboss'],'qun'], boss_lvbu2:['male','qun',4,['mashu','wushuang','swd_xiuluo','shenwei','shenji'],['fullskin','hiddenboss'],'qun'],
boss_caiwenji:['female','qun',4,['tinqin','beige','boss_hujia','boss_guihan'],['fullskin','boss'],'wei'], boss_caiwenji:['female','qun',4,['beige','boss_hujia','boss_guihan'],['fullskin','boss'],'wei'],
boss_zhangjiao:['male','qun',8,['diyleiji','guidao','tiangong','jidian'],['fullskin','boss'],'shu'], boss_zhangjiao:['male','qun',8,['diyleiji','guidao','tiangong','jidian'],['fullskin','boss'],'shu'],
boss_zuoci:['male','qun',0,['huanhua'],['fullskin','boss'],'shu'], boss_zuoci:['male','qun',0,['huanhua'],['fullskin','boss'],'shu'],
// boss_yuji:['male','qun',8,[],['fullskin','boss'],'nei'], // boss_yuji:['male','qun',8,[],['fullskin','boss'],'nei'],
@ -787,12 +793,7 @@ mode.boss={
filter:function(event,player){ filter:function(event,player){
if(player.hp==player.maxHp) return false; if(player.hp==player.maxHp) return false;
if(!player.num('he')) return false; if(!player.num('he')) return false;
for(var i=0;i<game.players.length;i++){ return true;
if(game.players[i]!=player&&!game.players[i].storage.boss_hujia){
return true;
}
}
return false;
}, },
content:function(){ content:function(){
"step 0" "step 0"
@ -816,38 +817,61 @@ mode.boss={
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.disabledSkills.boss_hujia){
target.clearSkills(); target.loseMaxHp();
target.storage.boss_hujia=true;
delete target.disabledSkills.boss_hujia;
} }
else{ else{
target.disabledSkills.boss_hujia=lib.character[target.name][3]; target.disabledSkills.boss_hujia=lib.character[target.name][3];
} }
player.discard(result.cards); player.discard(result.cards);
} }
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&!game.players[i].storage.boss_hujia){
event.finish();break;
}
}
"step 2"
player.draw(2);
if(player.hp<player.maxHp){
player.recover(player.maxHp-player.hp);
}
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player){
game.players[i].maxHp=1;
game.players[i].update();
}
}
game.bossinfo.loopType=1;
}, },
ai:{ ai:{
expose:0.2, expose:0.2,
} }
}, },
boss_guihan:{}, boss_guihan:{
unique:true,
enable:'chooseToUse',
mark:true,
init:function(player){
player.storage.boss_guihan=false;
},
filter:function(event,player){
if(event.type!='dying') return false;
if(player!=_status.dying) return false;
if(player.storage.boss_guihan) return false;
return true;
},
content:function(){
"step 0"
player.removeSkill('boss_guihan');
player.recover(player.maxHp-player.hp);
player.storage.boss_guihan=true;
"step 1"
player.draw(4);
"step 2"
for(var i=0;i<game.players.length;i++){
delete game.players[i].disabledSkills.boss_hujia;
}
game.bossinfo.loopType=1;
player.removeSkill('beige');
player.removeSkill('boss_hujia');
player.addSkill('tinqin');
player.addSkill('boss_huixin');
},
ai:{
skillTagFilter:function(player){
if(player.storage.boss_guihan) return false;
},
save:true,
result:{
player:4,
},
},
intro:{
content:'limited'
}
},
huoshen:{ huoshen:{
trigger:{player:'damageBefore'}, trigger:{player:'damageBefore'},
forced:true, forced:true,
@ -908,6 +932,35 @@ mode.boss={
} }
} }
}, },
boss_huixin:{
trigger:{player:'loseEnd'},
frequent:true,
unique:true,
filter:function(event,player){
return _status.currentPhase!=player;
},
content:function(){
"step 0"
player.draw();
player.judge();
"step 1"
if(result.color=='black'){
_status.currentPhase.loseHp();
}
else{
player.recover();
}
},
ai:{
effect:{
target:function(card){
if(get.tag(card,'loseCard')){
return [0.5,1];
}
}
}
}
},
boss_shengshou:{ boss_shengshou:{
trigger:{player:'useCard'}, trigger:{player:'useCard'},
frequent:true, frequent:true,
@ -1222,9 +1275,11 @@ mode.boss={
tinqin:'听琴', tinqin:'听琴',
boss_guihan:'归汉', boss_guihan:'归汉',
boss_guihan_info:'觉醒技当所有敌人失去技能后你摸两张牌并将体力回复至体力上限然后令所有敌人将体力上限减至1', boss_guihan_info:'限定技濒死阶段你可以将体力回复至体力上限摸4张牌令所有敌人的技能恢复并获得技能【听琴】、【蕙质】',
boss_huixin:'蕙质',
boss_huixin_info:'每当你于回合外失去牌,可以摸一张牌并进行一次判定,若为黑色,当前回合角色失去一点体力,否则你回复一点体力',
boss_hujia:'胡笳', boss_hujia:'胡笳',
boss_hujia_info:'回合结束阶段,若你已受伤,可以弃置一张牌令一名其他角色的所有技能失效,若其所有技能已失效,改为令其失去所有技能', boss_hujia_info:'回合结束阶段,若你已受伤,可以弃置一张牌令一名其他角色的所有技能失效,若其所有技能已失效,改为令其失去一点体力上限',
boss_honglian:'红莲', boss_honglian:'红莲',
boss_honglian_info:'锁定技,回合结束阶段,你摸两张牌,并对所有敌人造成一点火焰伤害', boss_honglian_info:'锁定技,回合结束阶段,你摸两张牌,并对所有敌人造成一点火焰伤害',
huoshen:'火神', huoshen:'火神',