]> ruin.nu Git - NDIRC.git/blobdiff - Commands/PA.pm
T2 is 70% and T3 is 50% now
[NDIRC.git] / Commands / PA.pm
index 2265d3f1da8ea343b6e8972214d6ba841cc98893..8b64205c7af45f90b7ace83ba4730f7d491c28d2 100644 (file)
@@ -223,10 +223,10 @@ WHERE ps.tick = $1 AND trunc(2000.0*$2*$3/ps.value)::int = $4
 my $eff = class extends NDIRC::Command {
        use ND::Include;
        method execute($c,$msg) {
-               my ($amount,$ship,$target) = $msg =~ /^(-?\d+(?:\.\d+)?[hkMG]?) (\w+)(?: (\w+))?/
+               my ($amount,$ship,$target) = $msg =~ /^(-?\d+(?:\.\d+)?[hkMG]?) ([\w\%]+)(?: (\w+))?/
                        or die 'ARGS';
 
-               $ship = "\%$ship\%";
+               $ship = "$ship\%";
                $target //= '%';
                my $value;
                if ($self->name =~ /^v.+$/){
@@ -295,17 +295,17 @@ FROM ship_stats
        sub shipColor {
                my ($string,$type) = @_;
                my $c = 04;
-               $c = 12 if $type eq 'Emp';
+               $c = 12 if $type eq 'EMP';
                $c = 13 if $type eq 'Steal';
                return "<c$c>$string</c>";
        }
 
        method amount ($s,$t,$tn,$amount) {
-               my $number = $s->{type} eq 'Emp' ?
+               my $number = $s->{type} eq 'EMP' ?
                        ($amount*$s->{guns}*(100-$t->{eres})/100)
                        : ($amount*$s->{damage}/$t->{armor});
-               $number *= 0.60 if $tn eq 't2';
-               $number *= 0.30 if $tn eq 't3';
+               $number *= 0.70 if $tn eq 't2';
+               $number *= 0.50 if $tn eq 't3';
                return $number;
        }
 
@@ -352,7 +352,7 @@ command stop => {
        }
 
        method amount ($s,$t,$tn,$amount) {
-               my $number = $t->{type} eq 'Emp' ?
+               my $number = $t->{type} eq 'EMP' ?
                        ($amount*100/(100 - $s->{eres})/$t->{guns})
                        : ($amount*$s->{armor}/$t->{damage});
                $number /= 0.60 if $tn eq 't2';