diff --git a/character/hearth.js b/character/hearth.js index 6c5906ded..d234e20cb 100755 --- a/character/hearth.js +++ b/character/hearth.js @@ -185,8 +185,9 @@ character.hearth={ if(event.targets.length){ var current=event.targets.shift(); trigger.player.line(current,'thunder'); - current.damage('nosource').animate=false; + current.damage('nosource','thunder').animate=false; current.$damage(trigger.player); + current.$thunder(); event.redo(); } } diff --git a/game/game.js b/game/game.js index c1a5137a3..458b23fd1 100755 --- a/game/game.js +++ b/game/game.js @@ -4254,7 +4254,7 @@ }, $thunder:function(){ game.animate.flame(this.offsetLeft+this.offsetWidth/2, - this.offsetTop+this.offsetHeight-20,700,'thunder'); + this.offsetTop+this.offsetHeight-30,700,'thunder'); }, $damage:function(source){ if(source&&source!=this){ @@ -5327,13 +5327,17 @@ var particles=[]; var particle_count=50; if(type=='thunder'){ - particle_count=10; + particle_count=30; } for(var i = 0; i < particle_count; i++) { particles.push(new particle()); } function particle() { this.speed = {x: -1+Math.random()*2, y: -5+Math.random()*5}; + if(type=='thunder'){ + this.speed.y=-3+Math.random()*5; + this.speed.x=-2+Math.random()*4; + } this.location = {x: x, y: y}; this.radius = .5+Math.random()*1; @@ -5341,17 +5345,14 @@ this.life = 10+Math.random()*10; this.death = this.life; - if(type=='thunder'){ - this.radius*=3; - this.life*=1.2; - this.death*=1.2; - } - switch(type){ case 'thunder':{ this.b = 255; this.r = Math.round(Math.random()*255); this.g = Math.round(Math.random()*255); + this.x+=Math.random()*20-10; + this.y+=Math.random()*20-10; + break; } case 'fire':{ @@ -5377,14 +5378,16 @@ var p = particles[i]; surface.beginPath(); + var middle=0.5; + var radius=p.radius; p.opacity = Math.round(p.death/p.life*100)/100 var gradient = surface.createRadialGradient(p.location.x, p.location.y, 0, p.location.x, p.location.y, p.radius); gradient.addColorStop(0, "rgba("+p.r+", "+p.g+", "+p.b+", "+p.opacity+")"); - gradient.addColorStop(0.5, "rgba("+p.r+", "+p.g+", "+p.b+", "+p.opacity+")"); + gradient.addColorStop(middle, "rgba("+p.r+", "+p.g+", "+p.b+", "+p.opacity+")"); gradient.addColorStop(1, "rgba("+p.r+", "+p.g+", "+p.b+", 0)"); surface.fillStyle = gradient; - surface.arc(p.location.x, p.location.y, p.radius, Math.PI*2, false); + surface.arc(p.location.x, p.location.y, radius, Math.PI*2, false); surface.fill(); p.death--; p.radius++; @@ -11681,9 +11684,48 @@ h:function(player){ console.log(get.translation(player.get('h'))); }, - g:function(name,target){ + g:function(){ + for(var i=0;i0&&typeof arguments[i]=='number'){ + for(var j=0;j.intro{opacity: 1;} position:absolute; overflow:scroll; } -.dialog.scroll1>.bar.top{opacity:1} -.dialog.scroll2>.bar.bottom{opacity:1} +/*.dialog.scroll1>.bar.top{opacity:1} +.dialog.scroll2>.bar.bottom{opacity:1}*/ .dialog.slim{top:300px;bottom:auto;min-height: none} /*.dialog.scroll1{box-shadow:0 -10px 10px -9px rgba(0,0,0,0.1),0 -10px 0 -9px rgba(0,0,0,0.05);} .dialog.scroll2{box-shadow:0 10px 10px -9px rgba(0,0,0,0.1),0 10px 0 -9px rgba(0,0,0,0.05)} @@ -727,6 +727,14 @@ div[data-nature='soil']{ color:white; text-shadow:black 0 0 2px; } +.dialog.scroll1, +.dialog.scroll2, +.dialog.withbg{ + background: rgba(0,0,0,0.2); + box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px; + border-radius:8px; + min-height:240px; +} /*--------动画--------*/ @-webkit-keyframes cardflip{