From 821b50f7daca45dfbfcee9d91036074f9bf69045 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 22 Apr 2018 14:11:12 +0200 Subject: [PATCH] sc: indicate flying upgrade for locusts --- sc-units-hots.inc.pl | 11 ++++++++--- sc-units-lotv.inc.pl | 1 + sc.plp | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/sc-units-hots.inc.pl b/sc-units-hots.inc.pl index e69bb81..9faaea8 100644 --- a/sc-units-hots.inc.pl +++ b/sc-units-hots.inc.pl @@ -2733,6 +2733,14 @@ use strict; duration => 25, cooldown => 60, count => 2, + upgrade => [ + { + # Flying Locusts + attr => { + flying => 1, + }, + }, + ], }, ], upgrade => [ @@ -2741,9 +2749,6 @@ use strict; min => 200, gas => 200, build => 160, - attr => { - flying => 1, - }, }, ], }, diff --git a/sc-units-lotv.inc.pl b/sc-units-lotv.inc.pl index dfa9748..e7608c5 100644 --- a/sc-units-lotv.inc.pl +++ b/sc-units-lotv.inc.pl @@ -783,6 +783,7 @@ $unit{nydus_worm}, { %{ $unit{swarm_host}->{special}->[0] }, # locust hp => 50, + upgrade => [], # no flying }, ], upgrade => [], diff --git a/sc.plp b/sc.plp index f0824bf..c7aec30 100644 --- a/sc.plp +++ b/sc.plp @@ -280,7 +280,8 @@ sub showrangeint { sprintf('%s', $_-> {cargo} < 0 ? ('supply', T => 'transport') : $_->{upgraded}->{cargo} < 0 ? ('supply magic-opt', T => 'optional transport') : - $_->{attr}->{flying} ? ('air', F => 'flying') : + $_-> {attr}->{flying} ? ('air', F => 'flying') : + $_->{upgraded}->{attr}->{flying} ? ('air magic-opt', F => 'potentially flying') : $_->{attr}->{structure} ? ('x', B => 'building') : ( [qw( x s m l l h h h h )]->[ $_->{cargo} ], -- 2.30.0