Combat fixes ... Increased standard entity movement rate, and made pain sounds only occur on death.
This was SVN commit r1423.
This commit is contained in:
parent
a2bcfd8a47
commit
e459e93ab4
@ -24,9 +24,9 @@
|
|||||||
|
|
||||||
// Attack logic.
|
// Attack logic.
|
||||||
dmg = new DamageType();
|
dmg = new DamageType();
|
||||||
dmg.crush = this.actions.attack.damage * this.actions.attack.crush;
|
dmg.crush = parseInt(this.actions.attack.damage * this.actions.attack.crush);
|
||||||
dmg.hack = this.actions.attack.damage * this.actions.attack.hack;
|
dmg.hack = parseInt(this.actions.attack.damage * this.actions.attack.hack);
|
||||||
dmg.pierce = this.actions.attack.damage * this.actions.attack.pierce;
|
dmg.pierce = parseInt(this.actions.attack.damage * this.actions.attack.pierce);
|
||||||
|
|
||||||
evt.target.damage( dmg, this );
|
evt.target.damage( dmg, this );
|
||||||
]]>
|
]]>
|
||||||
@ -34,18 +34,15 @@
|
|||||||
|
|
||||||
<Event On="TakesDamage">
|
<Event On="TakesDamage">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
curr_pain = getGUIGlobal().newRandomSound("voice", "pain", this.traits.audio.path);
|
|
||||||
curr_pain.play();
|
|
||||||
|
|
||||||
// Apply armour and work out how much damage we actually take
|
// Apply armour and work out how much damage we actually take
|
||||||
crushDamage = evt.damage.crush - this.traits.armour.value * this.traits.armour.crush;
|
crushDamage = parseInt(evt.damage.crush - this.traits.armour.value * this.traits.armour.crush);
|
||||||
if( crushDamage < 0 ) crushDamage = 0;
|
if ( crushDamage < 0 ) crushDamage = 0;
|
||||||
pierceDamage = evt.damage.pierce - this.traits.armour.value * this.traits.armour.pierce;
|
pierceDamage = parseInt(evt.damage.pierce - this.traits.armour.value * this.traits.armour.pierce);
|
||||||
if( pierceDamage < 0 ) pierceDamage = 0;
|
if ( pierceDamage < 0 ) pierceDamage = 0;
|
||||||
hackDamage = evt.damage.hack - this.traits.armour.value * this.traits.armour.hack;
|
hackDamage = parseInt(evt.damage.hack - this.traits.armour.value * this.traits.armour.hack);
|
||||||
if( hackDamage < 0 ) hackDamage = 0;
|
if ( hackDamage < 0 ) hackDamage = 0;
|
||||||
|
|
||||||
totalDamage = evt.damage.typeless + crushDamage + pierceDamage + hackDamage;
|
totalDamage = parseInt(evt.damage.typeless + crushDamage + pierceDamage + hackDamage);
|
||||||
|
|
||||||
// Minimum of 1 damage
|
// Minimum of 1 damage
|
||||||
|
|
||||||
@ -105,6 +102,10 @@
|
|||||||
else
|
else
|
||||||
console.write( this.traits.id.generic + " died in mysterious circumstances." );
|
console.write( this.traits.id.generic + " died in mysterious circumstances." );
|
||||||
|
|
||||||
|
// Make him cry out in pain.
|
||||||
|
curr_pain = getGUIGlobal().newRandomSound("voice", "pain", this.traits.audio.path);
|
||||||
|
curr_pain.play();
|
||||||
|
|
||||||
// We've taken what we need. Kill the swine.
|
// We've taken what we need. Kill the swine.
|
||||||
this.kill();
|
this.kill();
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<Footprint Radius="0.5"/>
|
<Footprint Radius="0.5"/>
|
||||||
<Actions>
|
<Actions>
|
||||||
<Move
|
<Move
|
||||||
speed="3.0"
|
speed="6.0"
|
||||||
turningRadius="0.0"
|
turningRadius="0.0"
|
||||||
/>
|
/>
|
||||||
<Patrol />
|
<Patrol />
|
||||||
|
Loading…
Reference in New Issue
Block a user