parent
df697d6827
commit
99397849a4
|
@ -3244,57 +3244,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
multitarget:true,
|
||||
targetprompt:['伤害来源','受伤角色'],
|
||||
content:function(){
|
||||
targets[1].damage(targets[0]).setContent(lib.skill.guanzong.viewAsDamageContent);
|
||||
},
|
||||
viewAsDamageContent:function(){
|
||||
'step 0'
|
||||
if(lib.config.background_audio){
|
||||
game.playAudio('effect','damage'+(num>1?'2':''));
|
||||
}
|
||||
game.broadcast(function(num){
|
||||
if(lib.config.background_audio){
|
||||
game.playAudio('effect','damage'+(num>1?'2':''));
|
||||
}
|
||||
},num);
|
||||
var str='视为受到了';
|
||||
if(source) str+='来自<span class="bluetext">'+(source==player?'自己':get.translation(source))+'</span>的';
|
||||
str+=get.cnNumber(num)+'点';
|
||||
if(event.nature) str+=get.translation(event.nature)+'属性';
|
||||
str+='伤害';
|
||||
game.log(player,str);
|
||||
if(player.stat[player.stat.length-1].damaged==undefined){
|
||||
player.stat[player.stat.length-1].damaged=num;
|
||||
}
|
||||
else {
|
||||
player.stat[player.stat.length-1].damaged+=num;
|
||||
}
|
||||
if(source){
|
||||
source.getHistory('sourceDamage').push(event);
|
||||
if(source.stat[source.stat.length-1].damage==undefined){
|
||||
source.stat[source.stat.length-1].damage=num;
|
||||
}
|
||||
else {
|
||||
source.stat[source.stat.length-1].damage+=num;
|
||||
}
|
||||
}
|
||||
player.getHistory('damage').push(event);
|
||||
if(event.animate!==false){
|
||||
player.$damage(source);
|
||||
game.broadcastAll(function(nature,player){
|
||||
if(lib.config.animation&&!lib.config.low_performance){
|
||||
if(nature=='fire'){
|
||||
player.$fire();
|
||||
}
|
||||
else if(nature=='thunder'){
|
||||
player.$thunder();
|
||||
}
|
||||
}
|
||||
},event.nature,player);
|
||||
var numx=Math.max(0,num-player.hujia);
|
||||
player.$damagepop(-numx,'gray');
|
||||
}
|
||||
'step 1'
|
||||
event.trigger('damageSource');
|
||||
targets[1].damage(targets[0],'unreal');
|
||||
},
|
||||
ai:{
|
||||
result:{
|
||||
|
|
20
game/game.js
20
game/game.js
|
@ -18213,6 +18213,7 @@
|
|||
damage:function(){
|
||||
"step 0"
|
||||
event.forceDie=true;
|
||||
if(event.unreal) event.goto(4)
|
||||
event.trigger('damageBegin1');
|
||||
"step 1"
|
||||
event.trigger('damageBegin2');
|
||||
|
@ -18230,7 +18231,7 @@
|
|||
game.playAudio('effect','damage'+(num>1?'2':''));
|
||||
}
|
||||
},num);
|
||||
var str='受到了';
|
||||
var str=event.unreal?'视为受到了':'受到了';
|
||||
if(source) str+='来自<span class="bluetext">'+(source==player?'自己':get.translation(source))+'</span>的';
|
||||
str+=get.cnNumber(num)+'点';
|
||||
if(event.nature) str+=get.translation(event.nature)+'属性';
|
||||
|
@ -18252,11 +18253,13 @@
|
|||
}
|
||||
}
|
||||
player.getHistory('damage').push(event);
|
||||
if(event.notrigger){
|
||||
player.changeHp(-num,false)._triggered=null;
|
||||
}
|
||||
else{
|
||||
player.changeHp(-num,false);
|
||||
if(!event.unreal){
|
||||
if(event.notrigger){
|
||||
player.changeHp(-num,false)._triggered=null;
|
||||
}
|
||||
else{
|
||||
player.changeHp(-num,false);
|
||||
}
|
||||
}
|
||||
if(event.animate!==false){
|
||||
player.$damage(source);
|
||||
|
@ -18273,6 +18276,7 @@
|
|||
var numx=Math.max(0,num-player.hujia);
|
||||
player.$damagepop(-numx,event.nature);
|
||||
}
|
||||
if(event.unreal) event.goto(6)
|
||||
if(!event.notrigger){
|
||||
if(num==0){
|
||||
event.trigger('damageZero');
|
||||
|
@ -23354,6 +23358,9 @@
|
|||
next._triggered=null;
|
||||
next.notrigger=true;
|
||||
}
|
||||
else if(arguments[i]=='unreal'){
|
||||
next.unreal='unreal'
|
||||
}
|
||||
else if(get.itemtype(arguments[i])=='nature'&&arguments[i]!='stab'){
|
||||
next.nature=arguments[i];
|
||||
}
|
||||
|
@ -23362,6 +23369,7 @@
|
|||
if(next.cards==undefined&&!nocard) next.cards=event.cards;
|
||||
if(next.source==undefined&&!nosource) next.source=event.player;
|
||||
if(next.source&&next.source.isDead()) delete next.source;
|
||||
if(next.unreal==undefined) next.unreal=false;
|
||||
if(next.num==undefined) next.num=1;
|
||||
next.original_num=next.num;
|
||||
next.change_history=[];
|
||||
|
|
Loading…
Reference in New Issue