diff --git a/OpenRA.Mods.CA/Widgets/Logic/Ingame/ProductionTooltipLogicCA.cs b/OpenRA.Mods.CA/Widgets/Logic/Ingame/ProductionTooltipLogicCA.cs index 334753a28..b743d66ab 100644 --- a/OpenRA.Mods.CA/Widgets/Logic/Ingame/ProductionTooltipLogicCA.cs +++ b/OpenRA.Mods.CA/Widgets/Logic/Ingame/ProductionTooltipLogicCA.cs @@ -365,6 +365,8 @@ Color GetEffectiveLabelColor(int effectValue, int neutralValue) { } String GetEffectiveLabelText(int effectValue, int neutralValue) { + return $"{effectValue}%"; + /* if (effectValue >= neutralValue * 2) return "It's super effective!"; else if (effectValue >= neutralValue * 1.33) @@ -375,6 +377,7 @@ String GetEffectiveLabelText(int effectValue, int neutralValue) { return "not effective"; else return "ok"; + */ } LabelWidget GetArmorTypeLabel(LabelWidget armorTypeLabel, ActorInfo actor) @@ -382,38 +385,44 @@ LabelWidget GetArmorTypeLabel(LabelWidget armorTypeLabel, ActorInfo actor) var armor = actor.TraitInfos().FirstOrDefault(); armorTypeLabel.Text = armor != null ? armor.Type : ""; + var health = actor.TraitInfos().FirstOrDefault(); + var healthText = health != null ? "("+health.HP/100+")" : ""; + // hard coded, specific to CA - find a better way to set user-friendly names and colors for armor types switch (armorTypeLabel.Text) { case "None": - armorTypeLabel.Text = "Infantry"; + armorTypeLabel.Text = "Infantry"+healthText; armorTypeLabel.TextColor = Color.LightSalmon; break; case "Light": + armorTypeLabel.Text += healthText; armorTypeLabel.TextColor = Color.Khaki; break; case "Reflector": + armorTypeLabel.Text += healthText; armorTypeLabel.TextColor = Color.SkyBlue; break; case "Heavy": + armorTypeLabel.Text += healthText; armorTypeLabel.TextColor = Color.Crimson; break; case "Concrete": - armorTypeLabel.Text = "Fortified"; + armorTypeLabel.Text = "Fortified"+healthText; armorTypeLabel.TextColor = Color.Gray; break; case "Wood": - armorTypeLabel.Text = "Building"; + armorTypeLabel.Text = "Building"+healthText; armorTypeLabel.TextColor = Color.IndianRed; break; case "Brick": - armorTypeLabel.Text = "Wall"; + armorTypeLabel.Text = "Wall"+healthText; armorTypeLabel.TextColor = Color.RosyBrown; break; diff --git a/OpenRA.Mods.CA/Widgets/Logic/Ingame/SelectionTooltipLogic.cs b/OpenRA.Mods.CA/Widgets/Logic/Ingame/SelectionTooltipLogic.cs index 08416049d..adaa83055 100644 --- a/OpenRA.Mods.CA/Widgets/Logic/Ingame/SelectionTooltipLogic.cs +++ b/OpenRA.Mods.CA/Widgets/Logic/Ingame/SelectionTooltipLogic.cs @@ -301,6 +301,8 @@ Color GetEffectiveLabelColor(int effectValue, int neutralValue) { } String GetEffectiveLabelText(int effectValue, int neutralValue) { + return $"{effectValue}%"; + /* if (effectValue >= neutralValue * 2) return "It's super effective!"; else if (effectValue >= neutralValue * 1.33) @@ -311,6 +313,7 @@ String GetEffectiveLabelText(int effectValue, int neutralValue) { return "not effective"; else return "ok"; + */ } LabelWidget GetArmorTypeLabel(LabelWidget armorTypeLabel, ActorInfo actor) @@ -318,38 +321,44 @@ LabelWidget GetArmorTypeLabel(LabelWidget armorTypeLabel, ActorInfo actor) var armor = actor.TraitInfos().FirstOrDefault(); armorTypeLabel.Text = armor != null ? armor.Type : ""; + var health = actor.TraitInfos().FirstOrDefault(); + var healthText = health != null ? "("+health.HP/100+")" : ""; + // hard coded, specific to CA - find a better way to set user-friendly names and colors for armor types switch (armorTypeLabel.Text) { case "None": - armorTypeLabel.Text = "Infantry"; + armorTypeLabel.Text = "Infantry"+healthText; armorTypeLabel.TextColor = Color.LightSalmon; break; case "Light": + armorTypeLabel.Text += healthText; armorTypeLabel.TextColor = Color.Khaki; break; case "Reflector": + armorTypeLabel.Text += healthText; armorTypeLabel.TextColor = Color.SkyBlue; break; case "Heavy": + armorTypeLabel.Text += healthText; armorTypeLabel.TextColor = Color.Crimson; break; case "Concrete": - armorTypeLabel.Text = "Fortified"; + armorTypeLabel.Text = "Fortified"+healthText; armorTypeLabel.TextColor = Color.Gray; break; case "Wood": - armorTypeLabel.Text = "Building"; + armorTypeLabel.Text = "Building"+healthText; armorTypeLabel.TextColor = Color.IndianRed; break; case "Brick": - armorTypeLabel.Text = "Wall"; + armorTypeLabel.Text = "Wall"+healthText; armorTypeLabel.TextColor = Color.RosyBrown; break; diff --git a/mods/ca/rules/scrin.yaml b/mods/ca/rules/scrin.yaml index 456a2fd26..48478dd60 100644 --- a/mods/ca/rules/scrin.yaml +++ b/mods/ca/rules/scrin.yaml @@ -799,7 +799,7 @@ CORR: Name: Corrupter Buildable: BuildPaletteOrder: 65 - Prerequisites: nerv, ~vehicles.scrin, ~!commander_tree.corrupter.area, ~!commander_tree.corrupter.range + Prerequisites: nerv, ~vehicles.scrin, ~!filler.corrupter Queue: Vehicle Description: Short-ranged anti-infantry/structure unit.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Defenses, Aircraft IconPalette: chrome @@ -831,7 +831,7 @@ CORR.Area: Tooltip: Name: Area Corrupter Buildable: - Prerequisites: nerv, ~vehicles.scrin, ~commander_tree.corrupter.area + Prerequisites: nerv, ~vehicles.scrin, ~commander_tree.corrupter.area, ~!filler.corrupter2 Description: Short-ranged anti-infantry/structure unit.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Defenses, Aircraft IconPalette: chrome Health: @@ -855,8 +855,9 @@ CORR.Area: RevokeDelay: 20 RevokeOnNewTarget: False RevokeAll: True + -WithAttackAnimation: -CORR.Area.PLD: +CORR.Area.PDL: Inherits: CORR.Area Inherits@PLD: ^PointLaserDefenseSystem WithProductionIconOverlay@PDL: @@ -866,7 +867,7 @@ CORR.Area.PLD: Tooltip: Name: Area Corrupter (PDL) Buildable: - Prerequisites: techcenter, ~vehicles.scrin, ~commander_tree.corrupter.area, ~commander_tree.corrupter.pld + Prerequisites: techcenter, ~vehicles.scrin, ~commander_tree.corrupter.area, ~commander_tree.corrupter.pdl Description: Ranged anti-infantry/structure unit.\n Strong vs Infantry, Buildings, Projectiles\n Weak vs Tanks, Defenses, Aircraft CORR.Area.Reflector: @@ -891,13 +892,13 @@ CORR.Range: Tooltip: Name: Ranged Corrupter Buildable: - Prerequisites: nerv, ~vehicles.scrin, ~commander_tree.corrupter.range + Prerequisites: nerv, ~vehicles.scrin, ~commander_tree.corrupter.range, ~!filler.corrupter2 Description: Ranged anti-infantry/structure unit.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Defenses, Aircraft IconPalette: chrome Armament@PRIMARY: Weapon: CorrupterSpew.range -CORR.Range.PLD: +CORR.Range.PDL: Inherits: CORR.Range Inherits@PLD: ^PointLaserDefenseSystem WithProductionIconOverlay@PDL: @@ -907,7 +908,7 @@ CORR.Range.PLD: Tooltip: Name: Ranged Corrupter (PDL) Buildable: - Prerequisites: techcenter, ~vehicles.scrin, ~commander_tree.corrupter.range, ~commander_tree.corrupter.pld + Prerequisites: techcenter, ~vehicles.scrin, ~commander_tree.corrupter.range, ~commander_tree.corrupter.pdl Description: Ranged anti-infantry/structure unit.\n Strong vs Infantry, Buildings, Projectiles\n Weak vs Tanks, Defenses, Aircraft CORR.Range.Reflector: diff --git a/mods/ca/rules/scrin/commander-tree.yaml b/mods/ca/rules/scrin/commander-tree.yaml index 463f881df..ac94463e4 100644 --- a/mods/ca/rules/scrin/commander-tree.yaml +++ b/mods/ca/rules/scrin/commander-tree.yaml @@ -107,7 +107,7 @@ commander_tree.Corrupter.Range: ProvidesPrerequisite@filler: Prerequisite: filler.corrupter -commander_tree.Corrupter.PLD: +commander_tree.Corrupter.PDL: Inherits: ^default.commander_tree_item RenderSprites: Image: CORR @@ -136,7 +136,7 @@ commander_tree.Corrupter.Reflector: Queue: Commander_Tree BuildPaletteOrder: 411 ForceIconLocation: true - Prerequisites: prerequisite.has_points, techcenter, ~vehicles.scrin, ~filler.corrupter, ~!commander_tree.corrupter.pld + Prerequisites: prerequisite.has_points, techcenter, ~vehicles.scrin, ~filler.corrupter, ~!commander_tree.corrupter.pdl Description: Upgrades the Corrupter with Reflector armor. \nReflector armor is very efficient vs energy weapons. ProvidesPrerequisite@filler: Prerequisite: filler.corrupter2 diff --git a/mods/ca/sequences/scrin.yaml b/mods/ca/sequences/scrin.yaml index 00a2b6c2f..3e24d535a 100644 --- a/mods/ca/sequences/scrin.yaml +++ b/mods/ca/sequences/scrin.yaml @@ -877,7 +877,7 @@ intl.destroyed: corr: Inherits: ^VehicleOverlays - Defaults: + Defaults: corrupter Scale: 0.5 idle: corrupter Facings: 8 @@ -899,7 +899,7 @@ corr: corr.destroyed: Inherits: ^VehicleOverlays Defaults: - Scale: 0.6 + Scale: 0.5 idle: corrupter Facings: 8 Stride: 11