forked from mirrors/0ad
Fix projectile modifier oversight and references
Update trigger script Update Attack.js component Update the relevant techs Update unit_tables.py
This commit is contained in:
committed by
Itms
parent
7c1a566d3e
commit
c798a12815
@@ -356,7 +356,7 @@ Trigger.prototype.RemoveSpread = function()
|
||||
{
|
||||
let cmpModifiersManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModifiersManager);
|
||||
cmpModifiersManager.AddModifiers("no_promotion", {
|
||||
"Attack/Ranged/Spread": [{ "affects": ["Unit"], "replace": 0 }],
|
||||
"Attack/Ranged/Projectile/Spread": [{ "affects": ["Unit"], "replace": 0 }],
|
||||
}, 4); // player 2 is ent 4
|
||||
};
|
||||
|
||||
|
||||
@@ -695,7 +695,7 @@ Attack.prototype.PerformAttack = function(type, target)
|
||||
let predictedHeight = cmpTargetPosition.GetHeightAt(predictedPosition.x, predictedPosition.z);
|
||||
|
||||
// Add inaccuracy based on spread.
|
||||
let distanceModifiedSpread = ApplyValueModificationsToEntity("Attack/" + type + "/Spread", +this.template[type].Projectile.Spread, this.entity) *
|
||||
const distanceModifiedSpread = ApplyValueModificationsToEntity("Attack/" + type + "/Projectile/Spread", +this.template[type].Projectile.Spread, this.entity) *
|
||||
predictedPosition.horizDistanceTo(selfPosition) / 100;
|
||||
|
||||
let randNorm = randomNormal2D();
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"researchTime": 40,
|
||||
"tooltip": "Archers −20% ranged attack spread.",
|
||||
"modifications": [
|
||||
{ "value": "Attack/Ranged/Spread", "multiply": 0.8 }
|
||||
{ "value": "Attack/Ranged/Projectile/Spread", "multiply": 0.8 }
|
||||
],
|
||||
"affects": ["Archer"],
|
||||
"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"researchTime": 40,
|
||||
"tooltip": "Bolt Shooters −20% ranged attack spread.",
|
||||
"modifications": [
|
||||
{ "value": "Attack/Ranged/Spread", "multiply": 0.8 }
|
||||
{ "value": "Attack/Ranged/Projectile/Spread", "multiply": 0.8 }
|
||||
],
|
||||
"affects": ["BoltShooter"],
|
||||
"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{ "value": "Attack/Melee/Damage/Hack", "multiply": 1.1, "affects": "Melee" },
|
||||
{ "value": "Attack/Melee/Damage/Pierce", "multiply": 1.1, "affects": "Melee" },
|
||||
{ "value": "Attack/Melee/Damage/Crush", "multiply": 1.1, "affects": "Melee" },
|
||||
{ "value": "Attack/Ranged/Spread", "multiply": 0.8, "affects": "Ranged" },
|
||||
{ "value": "Attack/Ranged/Projectile/Spread", "multiply": 0.8, "affects": "Ranged" },
|
||||
{ "value": "Cost/BuildTime", "multiply": 1.2 },
|
||||
{ "value": "Health/Max", "multiply": 1.25 },
|
||||
{ "value": "Heal/Range", "add": 3, "affects": "Healer" },
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{ "value": "Attack/Melee/Damage/Hack", "multiply": 1.1, "affects": "Melee" },
|
||||
{ "value": "Attack/Melee/Damage/Pierce", "multiply": 1.1, "affects": "Melee" },
|
||||
{ "value": "Attack/Melee/Damage/Crush", "multiply": 1.1, "affects": "Melee" },
|
||||
{ "value": "Attack/Ranged/Spread", "multiply": 0.8, "affects": "Ranged" },
|
||||
{ "value": "Attack/Ranged/Projectile/Spread", "multiply": 0.8, "affects": "Ranged" },
|
||||
{ "value": "Cost/BuildTime", "multiply": 1.2 },
|
||||
{ "value": "Health/Max", "multiply": 1.25 },
|
||||
{ "value": "Heal/Range", "add": 3, "affects": "Healer" },
|
||||
|
||||
@@ -469,9 +469,9 @@ def compute_unit_efficiency_diff(templates_by_parent, civs):
|
||||
)
|
||||
|
||||
diff = float(tp[1]["Spread"]) - float(templates[parent]["Spread"])
|
||||
efficiency_table[(parent, tp[0], "Attack/" + att_type + "/Ranged/Spread")] = (
|
||||
diff
|
||||
)
|
||||
efficiency_table[
|
||||
(parent, tp[0], "Attack/" + att_type + "/Ranged/Projectile/Spread")
|
||||
] = diff
|
||||
|
||||
for rtype in RESOURCES:
|
||||
diff = +1j + (
|
||||
|
||||
Reference in New Issue
Block a user