# Updates to the combat damage system.
This was SVN commit r4766.
This commit is contained in:
parent
38755cc589
commit
d5e5bb5e09
@ -20,7 +20,6 @@
|
||||
|
||||
<!-- Defaults to no armour. -->
|
||||
<Armour>
|
||||
<Value>0.0</Value>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.0</Hack>
|
||||
<Pierce>0.0</Pierce>
|
||||
|
@ -31,6 +31,12 @@
|
||||
<BarHeight>12.0</BarHeight>
|
||||
<Repairable />
|
||||
</Health>
|
||||
|
||||
<Armour>
|
||||
<Hack>20.0</Hack>
|
||||
<Pierce>20.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
</Armour>
|
||||
|
||||
<Vision>
|
||||
<Los>9</Los>
|
||||
|
@ -27,6 +27,9 @@
|
||||
<Height>4.0</Height>
|
||||
</Footprint>
|
||||
|
||||
<Armour>
|
||||
<Crush>1000.0</Crush>
|
||||
</Armour>
|
||||
|
||||
<Formation>
|
||||
<Category>Melee</Category>
|
||||
|
@ -16,10 +16,9 @@
|
||||
|
||||
|
||||
<Armour>
|
||||
<Value>4</Value>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.75</Hack>
|
||||
<Pierce>0.25</Pierce>
|
||||
<Hack>3.0</Hack>
|
||||
<Pierce>1.0</Pierce>
|
||||
<Crush>1000.0</Crush>
|
||||
</Armour>
|
||||
|
||||
<Footprint>
|
||||
|
@ -18,10 +18,11 @@
|
||||
<Radius>5</Radius>
|
||||
<Speed>1000</Speed>
|
||||
<Duration>3</Duration>
|
||||
<Damage>20.0</Damage>
|
||||
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
<Hack>10.0</Hack>
|
||||
<Pierce>10.0</Pierce>
|
||||
|
||||
<r>1.0</r>
|
||||
<g>0.1</g>
|
||||
<b>0.2</b>
|
||||
@ -34,19 +35,19 @@
|
||||
<Actions>
|
||||
<Attack>
|
||||
<Melee>
|
||||
<Damage>10.0</Damage>
|
||||
<Hack>5.0</Hack>
|
||||
<Pierce>5.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
|
||||
<Range>2.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
</Melee>
|
||||
|
||||
<Charge>
|
||||
<Damage>20.0</Damage>
|
||||
<Hack>10.0</Hack>
|
||||
<Pierce>10.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
|
||||
<Range>2.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
</Charge>
|
||||
|
@ -17,10 +17,9 @@
|
||||
<Actions>
|
||||
<Attack>
|
||||
<Ranged>
|
||||
<Damage>10.0</Damage>
|
||||
<Hack>0.0</Hack>
|
||||
<Pierce>10.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
<Range>16.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
</Ranged>
|
||||
|
@ -20,10 +20,9 @@
|
||||
</Creation>
|
||||
|
||||
<Armour>
|
||||
<Value>0</Value>
|
||||
<Crush>0.3</Crush>
|
||||
<Hack>0.3</Hack>
|
||||
<Pierce>0.3</Pierce>
|
||||
<Hack>3.0</Hack>
|
||||
<Pierce>3.0</Pierce>
|
||||
<Crush>1000.0</Crush>
|
||||
</Armour>
|
||||
|
||||
<Health>
|
||||
@ -47,19 +46,19 @@
|
||||
<Actions>
|
||||
<Attack>
|
||||
<Melee>
|
||||
<Damage>20.0</Damage>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
<Hack>15.0</Hack>
|
||||
<Pierce>15.0</Pierce>
|
||||
|
||||
<Crush>0.0</Crush>
|
||||
<Range>5.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
</Melee>
|
||||
|
||||
<Charge>
|
||||
<Damage>40.0</Damage>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
<Hack>25.0</Hack>
|
||||
<Pierce>25.0</Pierce>
|
||||
|
||||
<Crush>0.0</Crush>
|
||||
<Range>5.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
</Charge>
|
||||
|
@ -10,14 +10,11 @@
|
||||
|
||||
<Classes>Military, Foot, Organic, CitizenSoldier, Worker</Classes>
|
||||
</Id>
|
||||
|
||||
|
||||
|
||||
<Armour>
|
||||
<Value>4</Value>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.75</Hack>
|
||||
<Pierce>0.25</Pierce>
|
||||
<Hack>2.0</Hack>
|
||||
<Pierce>2.0</Pierce>
|
||||
<Crush>1000.0</Crush>
|
||||
</Armour>
|
||||
|
||||
<Health>
|
||||
|
@ -19,23 +19,20 @@
|
||||
<Actions>
|
||||
<Attack>
|
||||
<Melee>
|
||||
<Damage>10.0</Damage>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
<Hack>5.0</Hack>
|
||||
<Pierce>5.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<Range>5.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
</Melee>
|
||||
|
||||
<Charge>
|
||||
<Damage>10.0</Damage>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
<Hack>7.5</Hack>
|
||||
<Pierce>7.5</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<Range>5.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
</Charge>
|
||||
</Attack>
|
||||
</Actions>
|
||||
|
||||
</Entity>
|
@ -22,10 +22,9 @@
|
||||
<Actions>
|
||||
<Attack>
|
||||
<Ranged>
|
||||
<Damage>10.0</Damage>
|
||||
<Hack>0.0</Hack>
|
||||
<Pierce>10.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
<Range>24.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
<ProjectileSpeed>12.0</ProjectileSpeed>
|
||||
|
@ -23,10 +23,9 @@
|
||||
<Actions>
|
||||
<Attack>
|
||||
<Charge>
|
||||
<Damage>20.0</Damage>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
<Hack>0.0</Hack>
|
||||
<Pierce>0.0</Pierce>
|
||||
<Crush>100.0</Crush>
|
||||
<Range>2.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
</Charge>
|
||||
|
@ -30,28 +30,28 @@
|
||||
<Actions>
|
||||
<Attack>
|
||||
<Melee>
|
||||
<Damage>15.0</Damage>
|
||||
<Hack>10.0</Hack>
|
||||
<Pierce>10.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
|
||||
<Range>5.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
</Melee>
|
||||
|
||||
<Charge>
|
||||
<Damage>30.0</Damage>
|
||||
<Hack>15.0</Hack>
|
||||
<Pierce>15.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
|
||||
<Range>5.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
</Charge>
|
||||
|
||||
<Ranged>
|
||||
<Damage>10.0</Damage>
|
||||
<Hack>0.0</Hack>
|
||||
<Pierce>20.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>0.5</Hack>
|
||||
<Pierce>0.5</Pierce>
|
||||
|
||||
<Range>24.0</Range>
|
||||
<Speed>1500</Speed>
|
||||
</Ranged>
|
||||
|
@ -25,10 +25,11 @@
|
||||
<Radius>1</Radius>
|
||||
<Speed>1000</Speed>
|
||||
<Duration>3</Duration>
|
||||
<Damage>50</Damage>
|
||||
<Crush>0</Crush>
|
||||
<Hack>0.9</Hack>
|
||||
<Pierce>0.1</Pierce>
|
||||
|
||||
<Crush>0.0</Crush>
|
||||
<Hack>20.0</Hack>
|
||||
<Pierce>5.0</Pierce>
|
||||
|
||||
<r>1.0</r>
|
||||
<g>0.1</g>
|
||||
<b>0.2</b>
|
||||
|
@ -575,17 +575,17 @@ function performAttack( evt )
|
||||
{
|
||||
console.write("" + this + " doing a charge attack!");
|
||||
var a = this.actions.attack.charge;
|
||||
dmg.crush = a.damage * a.crush;
|
||||
dmg.hack = a.damage * a.hack;
|
||||
dmg.pierce = a.damage * a.pierce;
|
||||
dmg.crush = a.crush;
|
||||
dmg.hack = a.hack;
|
||||
dmg.pierce = a.pierce;
|
||||
this.setRun( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
var a = this.actions.attack.melee;
|
||||
dmg.crush = a.damage * a.crush;
|
||||
dmg.hack = a.damage * a.hack;
|
||||
dmg.pierce = a.damage * a.pierce;
|
||||
dmg.crush = a.crush;
|
||||
dmg.hack = a.hack;
|
||||
dmg.pierce = a.pierce;
|
||||
}
|
||||
|
||||
// Add flank penalty
|
||||
@ -610,9 +610,9 @@ function performAttackRanged( evt )
|
||||
// Create a projectile from us, to the target, that will do some damage when it hits them.
|
||||
dmg = new DamageType();
|
||||
var a = this.actions.attack.ranged;
|
||||
dmg.crush = a.damage * a.crush;
|
||||
dmg.hack = a.damage * a.hack;
|
||||
dmg.pierce = a.damage * a.pierce;
|
||||
dmg.crush = a.crush;
|
||||
dmg.hack = a.hack;
|
||||
dmg.pierce = a.pierce;
|
||||
|
||||
// Add flank penalty and elevation bonus
|
||||
var bonus = 1.0;
|
||||
@ -1882,7 +1882,9 @@ function DamageModifyAura( source, ally, bonus )
|
||||
if( this.affects( e ) )
|
||||
{
|
||||
//console.write( "DamageModify aura: giving " + this.bonus + " damage to " + e );
|
||||
e.actions.attack.damage += this.bonus;
|
||||
e.actions.attack.crush += this.bonus;
|
||||
e.actions.attack.pierce += this.bonus;
|
||||
e.actions.attack.hack += this.bonus;
|
||||
}
|
||||
};
|
||||
|
||||
@ -1891,7 +1893,9 @@ function DamageModifyAura( source, ally, bonus )
|
||||
if( this.affects( e ) )
|
||||
{
|
||||
//console.write( "DamageModify aura: taking away " + this.bonus + " damage from " + e );
|
||||
e.actions.attack.damage -= this.bonus;
|
||||
e.actions.attack.crush -= this.bonus;
|
||||
e.actions.attack.pierce -= this.bonus;
|
||||
e.actions.attack.hack -= this.bonus;
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -2075,9 +2079,9 @@ function TrampleAura( source )
|
||||
// Set up the damage object
|
||||
var dmg = new DamageType();
|
||||
var a = this.source.traits.auras.trample;
|
||||
dmg.crush = parseInt(a.damage * a.crush);
|
||||
dmg.hack = parseInt(a.damage * a.hack);
|
||||
dmg.pierce = parseInt(a.damage * a.pierce);
|
||||
dmg.crush = parseInt(a.crush);
|
||||
dmg.hack = parseInt(a.hack);
|
||||
dmg.pierce = parseInt(a.pierce);
|
||||
|
||||
// Add flank bonus
|
||||
if(e.traits.flankPenalty)
|
||||
|
Loading…
Reference in New Issue
Block a user