[Question]
  [
As [everyone knows](https://pics.me.me/i-am-mr-clever-am-ovin-fact-adding-inator-3000-to-anything-makes-12173475.png), adding `inator-3000` to the end of any noun makes it way cooler. But what else can make a word cooler?
Given an ASCII string as input, output the ***coolness*** of the word.
## Calculating the coolness
There are 4 elements to calculating the coolness of a word.
* The word itself. The base score is the number of capital letters multiplied by 1000
* The end number. A number at the end of the word (such as burninator-**3000**) is added to the base score, **but** if the number is more than 4 digits, they're being too greedy and the number should be ignored.
* The connector. A space before the end number adds 1000, while a hyphen adds 2000, any other symbol, or no symbol at all, has no effect.
* The suffix. If the word ends in `ator`, double the final score. If it ends in `inator`, triple the score. These are case insensitive.
So for example `Burninator-3000` can be calculated as follows:
```
1 Capital letter - Base Score: 1000
(1000(base) + 3000(number) + 2000(hyphen)) * 3(suffix) = 18000
```
## Testcases
```
Burninator-3000 -> 18000
Burnator3000 -> 8000
BurNinator 100 -> 9300
BuRnInAtOr-7253 -> 42759
burn -> 0
burn- -> 0
bUrn-1 -> 3001
inator-7 -> 6021
ator 56 -> 2112
burninators 1000 -> 2000
burn_1000 -> 1000
BURNINATOR-9999 -> 65997
burninator 99999 -> 3000
burninator_99999 -> 0
Code Golfinator-3000 -> 21000
inator ator hello world-1000 -> 3000
javaiscool_99999 -> 0
hypen-ated -> 0
1000 -> 1000
-1000 -> 3000
10000 -> 0
-10000 -> 2000
BURN1N470R-3000 -> 11000
```
## Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so fewest bytes **in each language** wins!
  
[Answer]
## JavaScript (ES6), ~~138~~ ~~133~~ 128 bytes
```
s=>(([,a,b,,c,d]=s.match(/((in)?ator)?((\D?)(\d+))?$/i),s.split(/[A-Z]/).length-1+(c=='-'?2:c==' '))*1e3+(d<1e4&&+d))*(b?3:2-!a)
```
### How?
The number of capital letters is given by:
```
s.split(/[A-Z]/).length - 1
```
All other criteria are deduced from the result of the following regular expression, which is split into 4 variables:
```
/((in)?ator)?((\D?)(\d+))?$/i     criterion  | code                    | outcome
 \_________/  \___/\___/          -----------+-------------------------+----------
      a         c    d            end number | d < 1e4 && +d           | 0 or +d
  \___/                           connector  | c == '-' ? 2 : c == ' ' | 0, 1 or 2
    b                             suffix     | * (b ? 3 : 2 - !a)      | 1, 2 or 3
```
### Test cases
```
let f =
s=>(([,a,b,,c,d]=s.match(/((in)?ator)?((\D?)(\d+))?$/i),s.split(/[A-Z]/).length-1+(c=='-'?2:c==' '))*1e3+(d<1e4&&+d))*(b?3:2-!a)
let test = s => console.log((s + ' '.repeat(32)).slice(0, 32), f(s));
test("Burninator-3000")               // -> 18000
test("Burnator3000")                  // -> 8000
test("BurNinator 100")                // -> 9300
test("BuRnInAtOr-7253")               // -> 42759
test("burn")                          // -> 0
test("burn-")                         // -> 0
test("bUrn-1")                        // -> 3001
test("inator-7")                      // -> 6021
test("ator 56")                       // -> 2112
test("burninators 1000")              // -> 2000
test("burn_1000")                     // -> 1000
test("BURNINATOR-9999")               // -> 65997
test("burninator 99999")              // -> 3000
test("burninator_99999")              // -> 0
test("Code Golfinator-3000")          // -> 21000
test("inator ator hello world-1000")  // -> 3000
test("javaiscool_99999")              // -> 0
test("hypen-ated")                    // -> 0
test("1000")                          // -> 1000
test("-1000")                         // -> 3000
test("10000")                         // -> 0
test("-10000")                        // -> 2000
test("BURN1N470R-3000")               // -> 11000
```
[Answer]
# Vanilla C, 447 bytes
(Wrapped for readability)
```
#include<stdio.h>
int main(int c,char**a){char*v=a[1];while(*v++);int m=0,i=
0,bn=0,s=0,b=0,mul=1;char l[256],*lp=l;v--;while(a[1]<v--)
{if(!m){i=!i?1:(i*10),('0'<=*v&&*v<='9')?(bn=bn+i*(*v-'0')
):m++;}if(m==1){(*v=='-'||*v==' ')?(s+=bn?((*v=='-')?2000:
1000):0,v--):0,m++;}if(m==2){(*v>='A'&&*v<='Z')?(s+=1000,*
v+=32):0,*lp++=*v;}}s+=(bn<10000)?bn:0;for(i=0;i<lp-l;i++)
{if(*(l+i)=="rotani"[i]){mul=(i==5)?3:((i==3)?2:mul);}}s*=
mul;printf("%d\n",s);}
```
...or even... Friday mood!
*(I didn't use any tools for alying the code. Actually, I'm really lucky I picked right column widths without any precalculations. And it even compiles!)*
# Vanilla C, 789 bytes
```
#include<stdio.h>
int main(int c,     char**a){char       *v=a[1];while      (*v++);int m=0,i=
        0,bn=0,     s=0,     b=0,       mul=1   ;char      l[256],    *lp=l;
          v--;      while  (a[1]<       v--)    {if(!      m){i=!i    ?1:(i*
          10),      ('0'   <=*v&&       *v<=    '9')?      (bn=bn+    i*(*v-
'0')):m++;}if(      m==1)  {(*v==       '-'||    *v==      ' ')?(s    +=bn?(
(*v=='-')?2000      :1000) :0,v--       ):0,m    ++;}      if(m==2     ){(*v
       >='A'&&      *v<=    'Z')?       (s+=    1000,      *v+=32)    :0,*lp
          ++=*      v;}}s  +=(bn<       10000   )?bn:      0;for(i     =0;i<
         lp-l;      i++){  if(*(l       +i)==   "rot"      "ani"[i]   ){mul=
(i==5) ?3: ((i      ==3)?2:mul);}       } s *= mul;        printf("%d\n",s);}
```
Original code:
```
#include <stdio.h>
#include <math.h>
int main(int argc, char** argv) {
    char *v = argv[1];
    while(*v++);
    int m=0,i=-1;
    int bonus_number=0;
    int score=0;
    int b=0;
    int mul=1;
    char letters[256];
    char* lp=letters;
    v--;
    while(argv[1]<v--) {
        printf(" * %c %x\n", *v, *v);
        if (m == 0) {
            if ('0'<=*v&&*v<='9') {
                bonus_number=bonus_number+powl(10,++i)*(*v-'0');
                printf("Digit, bonus is now %d\n", bonus_number);
            } else {
                m++;
            }
        }
        if (m == 1) {
            if (*v=='-'||*v==' ') {
                printf("Dash/space\n");
                if (bonus_number) score += (*v=='-') ? 2000 : 1000;
                v--;
            }
            m++;
        }
        if (m == 2) {
            if(*v>='A'&&*v<='Z') {
                printf("Upper letter\n");
                score += 1000;
                *v += 32;
            }
            *lp++ = *v;
        }
    }
    score += (bonus_number<10000)?bonus_number:0;
    for(i=0;i<lp-letters;i++) {
        // printf("%d: %c\n\n", i, *(letters+i));
        if (*(letters+i) == "rotani"[i]) {
            if (i == 3) {
                printf("2x!\n");
                mul = 2;
            }
            if (i == 5) {
                printf("3x!\n");
                mul = 3;
            }
        }
    }
    score *= mul;
    printf("Score: \n%d\n", score);
}
```
After 1st minimization:
```
#include <stdio.h>
int main(int c, char** a) {
    char *v = a[1];while(*v++);
    int m=0,i=0,bn=0,s=0,b=0,mul=1;
    char l[256],*lp=l;
    v--;
    while(a[1]<v--) {
        if (!m) {
            i=!i?1:(i*10),
            ('0'<=*v&&*v<='9') ? (bn=bn+i*(*v-'0')) : m++;
        }
        if (m == 1) {
            (*v=='-'||*v==' ') ? (s += bn ? ((*v=='-') ? 2000 : 1000) : 0, v--):0,m++;
        }
        if (m == 2) {
            (*v>='A'&&*v<='Z') ? (s += 1000, *v += 32):0,
            *lp++ = *v;
        }
    }
    s += (bn<10000)?bn:0;
    for(i=0;i<lp-l;i++) {
        if (*(l+i) == "rotani"[i]) {
            mul=(i==5)?3:((i==3)?2:mul);
        }
    }
    s *= mul;
    printf("%d\n", s);
}
```
# Test cases
```
#!/usr/bin/env python3
import subprocess
TESTCASES = '''
Burninator-3000 -> 18000
Burnator3000 -> 8000
BurNinator 100 -> 9300
BuRnInAtOr-7253 -> 42759
burn -> 0
burn- -> 0
bUrn-1 -> 3001
inator-7 -> 6021
ator 56 -> 2112
burninators 1000 -> 2000
burn_1000 -> 1000
BURNINATOR-9999 -> 65997
burninator 99999 -> 3000
burninator_99999 -> 0
Code Golfinator-3000 -> 21000
inator ator hello world-1000 -> 3000
javaiscool_99999 -> 0
hypen-ated -> 0
1000 -> 1000
-1000 -> 3000
10000 -> 0
-10000 -> 2000
BURN1N470R-3000 -> 11000
'''
TESTCASES = dict(map(lambda x: x.split(' -> '), filter(None, TESTCASES.split('\n'))))
def process(arg):
    return subprocess.Popen(['./a.out', arg], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0].strip().split(b'\n')[-1].decode('utf-8')
for key, value in TESTCASES.items():
    assert value == process(key), '"{}" should yield {}, but got {}'.format(
        key, value, process(key)
    )
```
[Answer]
# C#, ~~322~~ 317 bytes
```
namespace System.Linq{s=>{var m=Text.RegularExpressions.Regex.Match(s,"(.*?)([- ])?(\\d+)$");string t=m.Groups[1].Value.ToLower(),c=m.Groups[2].Value,n=m.Groups[3].Value;return(s.Count(char.IsUpper)*1000+(n.Length>4|n==""?0:int.Parse(n))+(c==" "?1000:c=="-"?2000:0))*(t.EndsWith("inator")?3:t.EndsWith("ator")?2:1);}}
```
[Try it online!](https://tio.run/##jVRtb9owEP7OrzhF/WBTYvGyrmo7QB3qKiRKKwbrB4oqLzEkU7CpbSgV47czOyG8lIhxH@zzc3fPXXJne8odCy5WKzDC6ZipCfUY/PxQmo1JK@RvOWtZxKsVL6JKwdPmvLVYUZrq0IOZCH14oCFHeM@872zlx5R735SWIR8VIOS6BkOogoJq7cD1MNjKjEoYm5Aum2vSYaNpROXdfCKZUqHgykJsTh6o9gKkCuAgkq9j1HdhgOvo5cU/x2cOvsmkTsoCbdjH5F6K6UT1SwPyi0ZTRrqiJd6ZRLgA3q5Dee1QAL4LV9bwYabM1JLpqeSAMo27JZKGmHKNvIBK0lS9yYRJDHkoFYtFOP9fNOKkxfhIB1CDL/DXVlwFx4E6FOHadoM8UakY4hifQObF0WDD4/TXkCCuRcoJUsRHaY5b84A0ueO@eg51gJyQUy2kgw17xVDvmjaGsjGUMtq7vMnlstvdH4BmSjeoYmYKTxxC57vpVlKPWzFf6hQSyAI753biYn9PgnR4k9/qR@leli8qTiGb@7chsu52d2OlZ5SS1dYpL60eM198TT0Tk4pbcYz5tZTW1@u0m@3b7mPHvTKyzwNXh9jrGsvmbgifwb2Ihp9@y5ovXgIWRQLehYx8Ny3jD53RUHlCRMf5g48J4y7VzLdRafSGxu5bpOicNAFDIRn1AkDpzV8PgrkK26HAJ85Ew7w@ImLkWYaamYeUoTNnkbIswa3BYojSM15mPULL3NGHIs3QYdSPE3yi2IYn2nK1@gc "C# (Mono) – Try It Online")
Full/Formatted Version:
```
namespace System.Linq
{
    class P
    {
        static void Main()
        {
            Func<string, int> f = s =>
            {
                var m = Text.RegularExpressions.Regex.Match(s, "(.*?)([- ])?(\\d+)$");
                string t = m.Groups[1].Value.ToLower(), c = m.Groups[2].Value, n = m.Groups[3].Value;
                return (
                           s.Count(char.IsUpper) * 1000 +
                           (n.Length > 4 | n == "" ? 0 : int.Parse(n)) +
                           (c == " " ? 1000 : c == "-" ? 2000 : 0)
                        )
                        * (t.EndsWith("inator") ? 3 : t.EndsWith("ator") ? 2 : 1);
            };
            string[] testCases =
            {
                "Burninator-3000", "Burnator3000", "BurNinator 100", "BuRnInAtOr-7253",
                "burn", "burn-", "bUrn-1", "inator-7", "ator 56", "burninators 1000",
                "burn_1000", "BURNINATOR-9999", "burninator 99999", "burninator_99999",
                "Code Golfinator-3000", "inator ator hello world-1000", "javaiscool_99999",
                "hypen-ated", "1000", "-1000", "10000", "-10000"
            };
            foreach (string testCase in testCases)
            {
                Console.WriteLine($"{testCase} -> {f(testCase)}");
            }
            Console.ReadLine();
        }
    }
}
```
Splitting the regex off into it's own method is now 4 bytes longer (unless I missed something) due to only being allowed one lambda. This it comes in at 321 bytes:
```
namespace System.Linq{string m(string s,int n)=>Text.RegularExpressions.Regex.Match(s,"(.*?)([- ])?(\\d+)$").Groups[1].Value.ToLower();s=>{string t=m(s,1),c=m(s,2),n=m(s,3);return(s.Count(char.IsUpper)*1000+(n.Length>4|n==""?0: int.Parse(n))+(c==" "?1000:c=="-"?2000:0))*(t.EndsWith("inator")?3:t.EndsWith("ator")?2:1);}}
```
[Answer]
## Perl, 108 bytes
**107 bytes code + 1 for `-p`.**
```
$\+=1e3*y/A-Z//;s/( |-)?(\d+)$//;$\+=$2*($2<1e4);$\+={$",1e3,"-",2e3}->{$1};s/(in)?ator$//i&&($\*=$1?3:2)}{
```
[Try it online!](https://tio.run/##HctLCsIwFAXQrUh5lKTtIz@dqDXoMiQTwQwCJQltHUjM1o2Nw/s50c7ToRQw/Sis6t7sinfGTgsjuw9STcyzp7AV9QCyIyDPwu7pPydohg0NDTaDtCrjJYHI1TpP9WMN8yZd2xIw3QhCq6OkOZVye83e@bqj4px/Q1xd8EvB@AM "Perl 5 – Try It Online")
[Answer]
# PHP>=7.1, 165 bytes
```
preg_match("#((in)?ator)?((\D)?(\d+))?$#i",$argn,$m);[,$a,$i,,$c,$d]=$m;echo($d*($d<1e4)+(preg_match_all("#[A-Z]#",$argn)+($c!="-"?$c==" "?:0:2))*1e3)*($a?$i?3:2:1);
```
[Testcases](http://sandbox.onlinephpfunctions.com/code/0aca245ecf661c510d96c2ba23f0320f0ec9106e)
]