forked from 0ad/0ad
Remove charge attack from the templates which isn't implemented nor designed yet. Patch by fatherbushido, fixes #4139.
Remove the unused "recharge" attack timer which was introduced inb21e798243
but should have been removed with4e5c5e2d8f
. This was SVN commit r18599.
This commit is contained in:
parent
fb46ce578f
commit
416049e4b4
@ -6,7 +6,6 @@ const g_TooltipTextFormats = {
|
||||
};
|
||||
|
||||
const g_AttackTypes = {
|
||||
"Charge": translate("Charge Attack:"),
|
||||
"Melee": translate("Melee Attack:"),
|
||||
"Ranged": translate("Ranged Attack:"),
|
||||
"Capture": translate("Capture Attack:")
|
||||
@ -144,8 +143,6 @@ function getAttackTooltip(template)
|
||||
{
|
||||
if (type == "Slaughter")
|
||||
continue; // Slaughter is used to kill animals, so do not show it.
|
||||
if (type == "Charge")
|
||||
continue; // Charging isn't implemented yet and shouldn't be displayed.
|
||||
|
||||
let rate = sprintf(translate("%(label)s %(details)s"), {
|
||||
"label":
|
||||
|
@ -1,8 +1,8 @@
|
||||
SPEARMEN
|
||||
- The basic melee infantry for every faction in the game.
|
||||
|
||||
- Used against cavalry for a 2x attack bonus.
|
||||
- Used against cavalry for an attack bonus.
|
||||
|
||||
- Decent hack attack and a good charge bonus make them good front line troops.
|
||||
- Decent hack attack make them good front line troops.
|
||||
|
||||
- They are countered by ranged units and swordsmen, so support your spearmen with slingers or cavalry.
|
||||
- They are countered by ranged units and swordsmen, so support your spearmen with slingers or cavalry.
|
||||
|
@ -11,7 +11,7 @@ m.getMaxStrength = function(ent, againstClass)
|
||||
|
||||
for (let type of attackTypes)
|
||||
{
|
||||
if (type == "Slaughter" || type == "Charge")
|
||||
if (type == "Slaughter")
|
||||
continue;
|
||||
|
||||
let attackStrength = ent.attackStrengths(type);
|
||||
|
@ -88,13 +88,6 @@ Attack.prototype.Schema =
|
||||
"<Crush>0.0</Crush>" +
|
||||
"</Splash>" +
|
||||
"</Ranged>" +
|
||||
"<Charge>" +
|
||||
"<Hack>10.0</Hack>" +
|
||||
"<Pierce>0.0</Pierce>" +
|
||||
"<Crush>50.0</Crush>" +
|
||||
"<MaxRange>24.0</MaxRange>" +
|
||||
"<MinRange>20.0</MinRange>" +
|
||||
"</Charge>" +
|
||||
"<Slaughter>" +
|
||||
"<Hack>1000.0</Hack>" +
|
||||
"<Pierce>0.0</Pierce>" +
|
||||
@ -172,20 +165,6 @@ Attack.prototype.Schema =
|
||||
"</interleave>" +
|
||||
"</element>" +
|
||||
"</optional>" +
|
||||
"<optional>" +
|
||||
"<element name='Charge'>" +
|
||||
"<interleave>" +
|
||||
"<element name='Hack' a:help='Hack damage strength'><ref name='nonNegativeDecimal'/></element>" +
|
||||
"<element name='Pierce' a:help='Pierce damage strength'><ref name='nonNegativeDecimal'/></element>" +
|
||||
"<element name='Crush' a:help='Crush damage strength'><ref name='nonNegativeDecimal'/></element>" +
|
||||
"<element name='MaxRange'><ref name='nonNegativeDecimal'/></element>" + // TODO: how do these work?
|
||||
"<element name='MinRange'><ref name='nonNegativeDecimal'/></element>" +
|
||||
Attack.prototype.bonusesSchema +
|
||||
Attack.prototype.preferredClassesSchema +
|
||||
Attack.prototype.restrictedClassesSchema +
|
||||
"</interleave>" +
|
||||
"</element>" +
|
||||
"</optional>" +
|
||||
"<optional>" +
|
||||
"<element name='Slaughter' a:help='A special attack to kill domestic animals'>" +
|
||||
"<interleave>" +
|
||||
@ -375,7 +354,7 @@ Attack.prototype.GetTimers = function(type)
|
||||
let repeat = +(this.template[type].RepeatTime || 1000);
|
||||
repeat = ApplyValueModificationsToEntity("Attack/" + type + "/RepeatTime", repeat, this.entity);
|
||||
|
||||
return { "prepare": prepare, "repeat": repeat, "recharge": repeat - prepare };
|
||||
return { "prepare": prepare, "repeat": repeat };
|
||||
};
|
||||
|
||||
Attack.prototype.GetAttackStrengths = function(type)
|
||||
@ -596,7 +575,6 @@ Attack.prototype.PerformAttack = function(type, target)
|
||||
"type":type
|
||||
});
|
||||
}
|
||||
// TODO: charge attacks (need to design how they work)
|
||||
};
|
||||
|
||||
Attack.prototype.InterpolatedLocation = function(ent, lateness)
|
||||
|
@ -112,14 +112,12 @@ attackComponentTest(undefined, (attacker, cmpAttack, defender) => {
|
||||
|
||||
TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetTimers("Ranged"), {
|
||||
"prepare": 300,
|
||||
"repeat": 500,
|
||||
"recharge": 200
|
||||
"repeat": 500
|
||||
});
|
||||
|
||||
TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetTimers("Capture"), {
|
||||
"prepare": 0,
|
||||
"repeat": 1000,
|
||||
"recharge": 1000
|
||||
"repeat": 1000
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -19,19 +19,6 @@
|
||||
</BonusCav>
|
||||
</Bonuses>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>30.0</Hack>
|
||||
<Pierce>30.0</Pierce>
|
||||
<Crush>30.0</Crush>
|
||||
<MaxRange>6.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
<Bonuses>
|
||||
<BonusCav>
|
||||
<Classes>Cavalry</Classes>
|
||||
<Multiplier>1.5</Multiplier>
|
||||
</BonusCav>
|
||||
</Bonuses>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Footprint>
|
||||
<Square width="4.6" depth="9.2"/>
|
||||
|
@ -19,19 +19,6 @@
|
||||
</BonusCav>
|
||||
</Bonuses>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>28.0</Hack>
|
||||
<Pierce>28.0</Pierce>
|
||||
<Crush>28.0</Crush>
|
||||
<MaxRange>6.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
<Bonuses>
|
||||
<BonusCav>
|
||||
<Classes>Cavalry</Classes>
|
||||
<Multiplier>1.5</Multiplier>
|
||||
</BonusCav>
|
||||
</Bonuses>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Footprint>
|
||||
<Square width="4.0" depth="8.0"/>
|
||||
|
@ -13,14 +13,6 @@
|
||||
<RepeatTime>750</RepeatTime>
|
||||
<PreferredClasses datatype="tokens">Siege</PreferredClasses>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>30.0</Hack>
|
||||
<Pierce>0.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<MaxRange>6.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
<PreferredClasses datatype="tokens">Siege</PreferredClasses>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Identity>
|
||||
<VisibleClasses datatype="tokens">Melee</VisibleClasses>
|
||||
|
@ -6,10 +6,6 @@
|
||||
<Pierce>13.0</Pierce>
|
||||
<RepeatTime>3500</RepeatTime>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>10.0</Hack>
|
||||
<Pierce>80.0</Pierce>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<Resources>
|
||||
|
@ -11,13 +11,6 @@
|
||||
<Crush>0.0</Crush>
|
||||
<MaxRange>6.0</MaxRange>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>16.0</Hack>
|
||||
<Pierce>0.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<MaxRange>6.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<Resources>
|
||||
|
@ -12,13 +12,6 @@
|
||||
<MaxRange>5.0</MaxRange>
|
||||
<RepeatTime>3500</RepeatTime>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>7.5</Hack>
|
||||
<Pierce>120.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<MaxRange>5.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<Resources>
|
||||
|
@ -13,14 +13,6 @@
|
||||
<RepeatTime>750</RepeatTime>
|
||||
<PreferredClasses datatype="tokens">Siege</PreferredClasses>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>60.0</Hack>
|
||||
<Pierce>0.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<MaxRange>5.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
<PreferredClasses datatype="tokens">Siege</PreferredClasses>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<Resources>
|
||||
|
@ -8,13 +8,6 @@
|
||||
<MaxRange>8.0</MaxRange>
|
||||
<RepeatTime>1500</RepeatTime>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>40.0</Hack>
|
||||
<Pierce>0.0</Pierce>
|
||||
<Crush>300.0</Crush>
|
||||
<MaxRange>8.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Identity>
|
||||
<VisibleClasses datatype="tokens">Melee</VisibleClasses>
|
||||
|
@ -19,19 +19,6 @@
|
||||
</BonusCavMelee>
|
||||
</Bonuses>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>6.0</Hack>
|
||||
<Pierce>24.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<MaxRange>8.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
<Bonuses>
|
||||
<BonusCavMelee>
|
||||
<Classes>Cavalry</Classes>
|
||||
<Multiplier>3.0</Multiplier>
|
||||
</BonusCavMelee>
|
||||
</Bonuses>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<Resources>
|
||||
|
@ -18,19 +18,6 @@
|
||||
</BonusCavMelee>
|
||||
</Bonuses>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>15.0</Hack>
|
||||
<Pierce>40.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<MaxRange>5.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
<Bonuses>
|
||||
<BonusCavMelee>
|
||||
<Classes>Cavalry</Classes>
|
||||
<Multiplier>3.0</Multiplier>
|
||||
</BonusCavMelee>
|
||||
</Bonuses>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<Resources>
|
||||
|
@ -12,13 +12,6 @@
|
||||
<MaxRange>5.0</MaxRange>
|
||||
<RepeatTime>750</RepeatTime>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>18.0</Hack>
|
||||
<Pierce>0.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<MaxRange>5.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<Resources>
|
||||
|
@ -20,14 +20,6 @@
|
||||
<RepeatTime>1000</RepeatTime>
|
||||
<RestrictedClasses datatype="tokens">Structure</RestrictedClasses>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>20.0</Hack>
|
||||
<Pierce>0.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<MaxRange>3.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
<RestrictedClasses datatype="tokens">Structure</RestrictedClasses>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<BuildTime>12</BuildTime>
|
||||
|
@ -9,14 +9,6 @@
|
||||
<RepeatTime>1000</RepeatTime>
|
||||
<PreferredClasses datatype="tokens">Human</PreferredClasses>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>2.0</Hack>
|
||||
<Pierce>0.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<MaxRange>4.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
<PreferredClasses datatype="tokens">Human</PreferredClasses>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Health>
|
||||
<Max>100</Max>
|
||||
|
@ -17,17 +17,6 @@
|
||||
</BonusCavMelee>
|
||||
</Bonuses>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>8.0</Hack>
|
||||
<Pierce>16.0</Pierce>
|
||||
<MaxRange>8.0</MaxRange>
|
||||
<Bonuses>
|
||||
<BonusCavMelee>
|
||||
<Classes>Cavalry</Classes>
|
||||
<Multiplier>3.0</Multiplier>
|
||||
</BonusCavMelee>
|
||||
</Bonuses>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<Resources>
|
||||
|
@ -15,16 +15,6 @@
|
||||
</BonusCavMelee>
|
||||
</Bonuses>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>12.0</Hack>
|
||||
<Pierce>24.0</Pierce>
|
||||
<Bonuses>
|
||||
<BonusCavMelee>
|
||||
<Classes>Cavalry</Classes>
|
||||
<Multiplier>3.0</Multiplier>
|
||||
</BonusCavMelee>
|
||||
</Bonuses>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<Resources>
|
||||
|
@ -11,9 +11,6 @@
|
||||
<MaxRange>2.0</MaxRange>
|
||||
<RepeatTime>750</RepeatTime>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>12.0</Hack>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<Resources>
|
||||
|
@ -8,13 +8,6 @@
|
||||
<MaxRange>8.0</MaxRange>
|
||||
<RepeatTime>100</RepeatTime>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>15.0</Hack>
|
||||
<Pierce>15.0</Pierce>
|
||||
<Crush>15.0</Crush>
|
||||
<MaxRange>8.0</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Cost>
|
||||
<BuildTime>20</BuildTime>
|
||||
|
@ -14,14 +14,6 @@
|
||||
<RepeatTime>1500</RepeatTime>
|
||||
<PreferredClasses datatype="tokens">Gates Structure</PreferredClasses>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>0.0</Hack>
|
||||
<Pierce>0.0</Pierce>
|
||||
<Crush>160.0</Crush>
|
||||
<MaxRange>6.5</MaxRange>
|
||||
<MinRange>0.0</MinRange>
|
||||
<PreferredClasses datatype="tokens">Gates Structure</PreferredClasses>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Capturable disable=""/>
|
||||
<Cost>
|
||||
|
@ -4,9 +4,6 @@
|
||||
<Melee>
|
||||
<MaxRange>6.0</MaxRange>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<MaxRange>6.0</MaxRange>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Builder>
|
||||
<Entities datatype="tokens">
|
||||
|
@ -9,10 +9,6 @@
|
||||
<Hack>0</Hack>
|
||||
<Crush>10.5</Crush>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>0.0</Hack>
|
||||
<Crush>21.0</Crush>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Identity>
|
||||
<Civ>maur</Civ>
|
||||
|
@ -4,9 +4,6 @@
|
||||
<Melee>
|
||||
<Crush op="mul">1.2</Crush>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Crush op="mul">1.2</Crush>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Footprint replace="">
|
||||
<Square width="7.0" depth="15.0"/>
|
||||
|
@ -4,9 +4,6 @@
|
||||
<Melee>
|
||||
<Hack>20</Hack>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>40.0</Hack>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Health>
|
||||
<Max>140</Max>
|
||||
|
@ -4,9 +4,6 @@
|
||||
<Melee>
|
||||
<Hack>18.5</Hack>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Hack>36.0</Hack>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Identity>
|
||||
<Civ>rome</Civ>
|
||||
|
@ -4,9 +4,6 @@
|
||||
<Melee>
|
||||
<Crush op="mul">1.2</Crush>
|
||||
</Melee>
|
||||
<Charge>
|
||||
<Crush op="mul">1.2</Crush>
|
||||
</Charge>
|
||||
</Attack>
|
||||
<Footprint replace="">
|
||||
<Square width="8.0" depth="12.0"/>
|
||||
|
@ -38,7 +38,6 @@
|
||||
<item>attack_melee </item>
|
||||
<item>attack_ranged </item>
|
||||
<item>attack_capture </item>
|
||||
<item>attack_charge </item>
|
||||
<item>attack_slaughter</item>
|
||||
<item>death </item>
|
||||
<item>build </item>
|
||||
|
@ -274,10 +274,6 @@ public:
|
||||
"</element>";
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: the running/charging thing needs to be designed and implemented
|
||||
*/
|
||||
|
||||
virtual void Init(const CParamNode& paramNode)
|
||||
{
|
||||
m_FormationController = paramNode.GetChild("FormationController").ToBool();
|
||||
@ -859,7 +855,6 @@ void CCmpUnitMotion::Move(fixed dt)
|
||||
CFixedVector2D pos = initialPos;
|
||||
|
||||
// If in formation, run to keep up; otherwise just walk
|
||||
// (TODO: support stamina, charging, etc)
|
||||
fixed basicSpeed;
|
||||
if (IsFormationMember())
|
||||
basicSpeed = GetRunSpeed();
|
||||
|
Loading…
Reference in New Issue
Block a user