音效、bug
This commit is contained in:
parent
c504b5a18b
commit
2c18c826a7
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -29,12 +29,13 @@ card.ex={
|
|||
hanbing_skill:{
|
||||
trigger:{player:'shaHit'},
|
||||
direct:true,
|
||||
audio:true,
|
||||
filter:function(event){
|
||||
return event.target.get('he').length>0;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
player.choosePlayerCard('是否发动【寒冰剑】?','he',trigger.target,[1,2],function(button){
|
||||
player.choosePlayerCard('是否发动【寒冰剑】?','he',trigger.target,Math.min(2,trigger.target.num('he')),function(button){
|
||||
var eff=ai.get.damageEffect(trigger.target,player,player);
|
||||
if(ai.get.attitude(player,trigger.target)>0){
|
||||
if(eff>=0) return false;
|
||||
|
@ -55,7 +56,7 @@ card.ex={
|
|||
trigger.untrigger();
|
||||
var cards=[];
|
||||
for(var i=0;i<result.buttons.length;i++) cards.push(result.buttons[i].link);
|
||||
player.logSkill('hanbing');
|
||||
player.logSkill('hanbing_skill');
|
||||
trigger.unhurt=true;
|
||||
trigger.target.discard(cards);
|
||||
}
|
||||
|
@ -65,6 +66,7 @@ card.ex={
|
|||
trigger:{target:'shaBefore'},
|
||||
forced:true,
|
||||
priority:6,
|
||||
audio:true,
|
||||
filter:function(event){
|
||||
if(event.player.num('s','unequip')) return false;
|
||||
return (event.card.name=='sha'&&get.color(event.card)=='black')
|
||||
|
|
|
@ -309,6 +309,7 @@ card.extra={
|
|||
},
|
||||
},
|
||||
guding_skill:{
|
||||
audio:true,
|
||||
trigger:{source:'damageBegin'},
|
||||
filter:function(event){
|
||||
if(event.card&&event.card.name=='sha'){
|
||||
|
@ -332,6 +333,7 @@ card.extra={
|
|||
trigger:{target:'useCardToBefore'},
|
||||
forced:true,
|
||||
priority:6,
|
||||
audio:true,
|
||||
filter:function(event,player){
|
||||
if(event.player.num('s','unequip')) return false;
|
||||
if(event.card.name=='nanman') return true;
|
||||
|
@ -362,6 +364,7 @@ card.extra={
|
|||
filter:function(event){
|
||||
if(event.nature=='fire') return true;
|
||||
},
|
||||
audio:true,
|
||||
forced:true,
|
||||
content:function(){
|
||||
trigger.num++;
|
||||
|
@ -396,6 +399,7 @@ card.extra={
|
|||
filter:function(event,player){
|
||||
if(event.card.name=='sha'&&!event.card.nature) return true;
|
||||
},
|
||||
audio:true,
|
||||
check:function(event,player){
|
||||
var att=ai.get.attitude(player,event.target);
|
||||
if(event.target.hasSkillTag('nofire')){
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
'use strict';
|
||||
card.guozhan={
|
||||
card:{
|
||||
yuanjiao:{
|
||||
|
@ -104,7 +105,7 @@ card.guozhan={
|
|||
target.chooseToDiscard(2,'he',true).ai=ai.get.disvalue;
|
||||
},
|
||||
ai:{
|
||||
wuxie:function(target,card,player,viewer){
|
||||
wuxie:function(){
|
||||
if(lib.config.mode=='guozhan'){
|
||||
return 0;
|
||||
}
|
||||
|
@ -184,6 +185,7 @@ card.guozhan={
|
|||
}
|
||||
},
|
||||
sanjian_skill:{
|
||||
audio:true,
|
||||
trigger:{source:'damageAfter'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
|
@ -213,7 +215,7 @@ card.guozhan={
|
|||
});
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.logSkill('sanjian');
|
||||
player.logSkill('sanjian_skill');
|
||||
player.discard(result.cards);
|
||||
result.targets[0].damage();
|
||||
}
|
||||
|
|
|
@ -202,7 +202,8 @@ card.refresh={
|
|||
filter:function(event,player){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].name=='muniu'&&event.cards[i].original=='e'&&
|
||||
player.skills.contains('muniu_skill6')==false) return true;
|
||||
player.skills.contains('muniu_skill6')==false&&
|
||||
get.position(event.cards[i])==='d') return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
|
|
@ -987,6 +987,7 @@ card.standard={
|
|||
cixiong_skill:{
|
||||
trigger:{player:'shaBegin'},
|
||||
priority:5,
|
||||
audio:true,
|
||||
filter:function(event,player){
|
||||
if(player.sex=='male'&&event.target.sex=='female') return true;
|
||||
if(player.sex=='female'&&event.target.sex=='male') return true;
|
||||
|
@ -1028,6 +1029,7 @@ card.standard={
|
|||
selectCard:2,
|
||||
position:'h',
|
||||
viewAs:{name:'sha'},
|
||||
audio:true,
|
||||
prompt:'将两张手牌当杀使用或打出',
|
||||
check:function(card){return 6-ai.get.useful(card)},
|
||||
ai:{
|
||||
|
@ -1037,6 +1039,7 @@ card.standard={
|
|||
guanshi_skill:{
|
||||
trigger:{player:'shaMiss'},
|
||||
direct:true,
|
||||
audio:true,
|
||||
filter:function(event,player){
|
||||
return player.num('he')>2;
|
||||
},
|
||||
|
@ -1058,7 +1061,7 @@ card.standard={
|
|||
};
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.logSkill('guanshi');
|
||||
player.logSkill('guanshi_skill');
|
||||
trigger.untrigger();
|
||||
trigger.trigger('shaHit');
|
||||
trigger._result.bool=false;
|
||||
|
@ -1081,15 +1084,17 @@ card.standard={
|
|||
},
|
||||
qilin_skill:{
|
||||
trigger:{player:'shaHit'},
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.target.get('e',{subtype:['equip3','equip4']}).length>0
|
||||
},
|
||||
direct:true,
|
||||
audio:true,
|
||||
content:function(){
|
||||
"step 0"
|
||||
player.chooseButton(ui.create.dialog('选择要弃置的马',trigger.target.get('e',{subtype:['equip3','equip4']})));
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.logSkill('qilin_skill');
|
||||
trigger.target.discard(result.buttons[0].link);
|
||||
}
|
||||
}
|
||||
|
@ -1101,6 +1106,7 @@ card.standard={
|
|||
if(event.parent.player.num('s','unequip')) return false;
|
||||
return true;
|
||||
},
|
||||
audio:true,
|
||||
content:function(){
|
||||
"step 0"
|
||||
player.judge('bagua',function(card){return (get.color(card)=='red')?1.5:-0.5});
|
||||
|
|
|
@ -2445,8 +2445,8 @@ character.yijiang={
|
|||
content:function(){
|
||||
"step 0"
|
||||
event.cards=[targets[0].get('e'),targets[1].get('e')];
|
||||
targets[0].lose(event.cards[0]);
|
||||
targets[1].lose(event.cards[1]);
|
||||
targets[0].lose(event.cards[0],ui.special);
|
||||
targets[1].lose(event.cards[1],ui.special);
|
||||
if(event.cards[0].length) targets[0].$give(event.cards[0],targets[1]);
|
||||
if(event.cards[1].length) targets[1].$give(event.cards[1],targets[0]);
|
||||
"step 1"
|
||||
|
|
48
game/game.js
48
game/game.js
|
@ -1142,7 +1142,7 @@ window.play={};
|
|||
game.playAudio('card',sex,card.name);
|
||||
}
|
||||
}
|
||||
else{
|
||||
else if(get.type(card)!='equip'){
|
||||
game.playAudio('card/default');
|
||||
}
|
||||
}
|
||||
|
@ -1283,16 +1283,15 @@ window.play={};
|
|||
var info=get.info(event.skill);
|
||||
event._skill=event.skill;
|
||||
if(lib.config.background_speak&&!lib.skill.global.contains(event.skill)){
|
||||
if(info.audio){
|
||||
game.playAudio('skill',event.skill,Math.ceil(info.audio*Math.random()));
|
||||
if(typeof info.audio=='number'){
|
||||
game.playAudio('skill',event.skill+Math.ceil(info.audio*Math.random()));
|
||||
}
|
||||
else if(info.audio){
|
||||
game.playAudio('skill',event.skill);
|
||||
}
|
||||
else if(lib.config.background_ogg){
|
||||
game.playAudio('skill',event.skill);
|
||||
}
|
||||
else{
|
||||
game.playAudio('skill','default',
|
||||
player.sex=='female'?'female':'male',Math.ceil(Math.random()*5));
|
||||
}
|
||||
}
|
||||
if(player.checkShow){
|
||||
player.checkShow(event.skill);
|
||||
|
@ -1611,7 +1610,7 @@ window.play={};
|
|||
damage:function(){
|
||||
"step 0"
|
||||
if(lib.config.background_audio){
|
||||
game.playAudio('effect','damage_'+(player.sex==='female'?'female':'male'));
|
||||
game.playAudio('effect','damage'+(num>1?'2':''));
|
||||
}
|
||||
var str=get.translation(player)+'受到了';
|
||||
if(source) str+='来自'+(source==player?'自己':get.translation(source)+'的');
|
||||
|
@ -1655,6 +1654,9 @@ window.play={};
|
|||
},
|
||||
loseHp:function(){
|
||||
"step 0"
|
||||
if(lib.config.background_audio){
|
||||
game.playAudio('effect','loseHp');
|
||||
}
|
||||
game.log(get.translation(player)+'失去了'+get.cnNumber(num)+'点体力')
|
||||
player.changeHp(-num);
|
||||
"step 1"
|
||||
|
@ -1793,9 +1795,9 @@ window.play={};
|
|||
else if(lib.config.background_ogg){
|
||||
game.playAudio('die',player.name);
|
||||
}
|
||||
}
|
||||
if(lib.config.background_audio){
|
||||
game.playAudio('effect','die_'+(player.sex==='female'?'female':'male'));
|
||||
else if(lib.config.background_audio){
|
||||
game.playAudio('effect','die_'+(player.sex==='female'?'female':'male'));
|
||||
}
|
||||
}
|
||||
if(player==game.me&&!_status.over){
|
||||
ui.control.show();
|
||||
|
@ -1816,7 +1818,7 @@ window.play={};
|
|||
},
|
||||
equip:function(){
|
||||
"step 0"
|
||||
if(get.owner(card)) get.owner(card).lose(card);
|
||||
if(get.owner(card)) get.owner(card).lose(card,ui.special);
|
||||
|
||||
if(card.clone){
|
||||
card.clone.moveTo(player,Math.random()<0.8?'flip':'rotate').delete();
|
||||
|
@ -1934,6 +1936,7 @@ window.play={};
|
|||
game.log(get.translation(player)+'被连环');
|
||||
}
|
||||
player.classList.toggle('linked');
|
||||
game.playAudio('effect','link');
|
||||
},
|
||||
|
||||
},
|
||||
|
@ -3435,16 +3438,16 @@ window.play={};
|
|||
}
|
||||
var info=lib.skill[name];
|
||||
if(info&&lib.config.background_speak){
|
||||
if(info.audio){
|
||||
game.playAudio('skill',name,Math.ceil(info.audio*Math.random()));
|
||||
if(typeof info.audio==='number'){
|
||||
game.playAudio('skill',name+Math.ceil(info.audio*Math.random()));
|
||||
}
|
||||
else if(info.audio){
|
||||
game.playAudio('skill',name);
|
||||
}
|
||||
else{
|
||||
if(lib.config.background_ogg){
|
||||
game.playAudio('skill',name);
|
||||
}
|
||||
else{
|
||||
game.playAudio('skill','default',Math.ceil(Math.random()*5));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(lib.config.mode=='chess'){
|
||||
|
@ -5222,6 +5225,17 @@ window.play={};
|
|||
_status.over=true;
|
||||
ui.control.show();
|
||||
ui.clear();
|
||||
if(lib.config.background_audio){
|
||||
if(result===true){
|
||||
game.playAudio('effect','win');
|
||||
}
|
||||
else if(result===false){
|
||||
game.playAudio('effect','lose');
|
||||
}
|
||||
else{
|
||||
game.playAudio('effect','tie');
|
||||
}
|
||||
}
|
||||
if(result===true) result='战斗胜利';
|
||||
if(result===false) result='战斗失败';
|
||||
if(result==undefined) result='战斗结束';
|
||||
|
|
Loading…
Reference in New Issue