g | x | w | all
Bytes Lang Time Link
085Tcl241203T180831Zsergiol
069C clang241224T165858Zjdt
039Charcoal241128T060509ZNeil
055Perl 5 p241202T055557ZXcali
061Python241129T092809ZAlbert.L
027Jelly241201T005303ZJonathan
076AWK241129T141202Zxrs
071Java JDK241129T084957ZFhuvi
064Google Sheets241127T224424Zdoubleun
081Kotlin241128T151405ZJoon Yor
058APL+WIN241128T110600ZGraham
02905AB1E241128T104608ZKevin Cr
061JavaScript Node.js241128T020109Zl4m2
056Bash + coreutils241127T225007ZDigital
075Retina 0.8.2241128T004907ZNeil
072Python 3241127T230049Zxnor

Tcl, 85 bytes

puts [lindex [set L {Cut Bomb Ice Fire Oil Elec Time Guts Cut}] [lsearch $L $argv]+1]

Try it online!

C (clang), 69 bytes

f(*s){strncpy(s,"GutsElecCut\0FireTimeOil\0Ice\0Bomb"+*s%405%8*4,4);}

Try it online!

Charcoal, 40 39 bytes

§⪪”↶0²«gR→X?→?ïM↘⌈⟦ⅈH×↷⟲&↨⟧‽≧jβ” ﹪⍘Sγ⁹⁷

Try it online! Link is to verbose version of code. Explanation: The input string is converted from base 95, then reduced modulo 97 and again modulo 9 via modular indexing into a compressed string of the relevant words split on spaces.

Perl 5 -p, 55 bytes

CutBombIceFireOilElecTimeGutsCutX=~/$_(.+?)[A-Z]/;$_=$1

Try it online!

Input must have first letter capitalized.

Python, 61 bytes

-3 thanks to @Jonathan Allan

lambda b:"FGBTEOCIiuoiliucrtmmelteesbec"[int(b,36)%9075&7::8]

Attempt This Online!

Was:

Python, 66 bytes

lambda b:"GBFETCIOuoiliucitmremtelsbece"["TCIOEGBF".find(b[0])::8]

Attempt This Online!

A bit boring.

Python, 67 bytes

for f in 0,eval:*Cut,Guts,Time,Elec,Oil,Fire,Ice,Bomb,Cut=globals()

Attempt This Online!

This one is exhilaratingly dirty.

How?

Creates global variables named Cut, Guts, etc. such that eval can be used to retrieve their robot master (or whatever the story is) from their names.

The assignment needs to be done twice: First pass adds the variable names to the global dictionary (which remembers insertion order). Note that the packed assignment ignores the values of globals() and assigns whatever names happen to have been last inserted (we don't care in the first pass) as values to the new variables .

At the second pass the names (rotated by one because we list Cut twice) will be at the end of the dictionary. So the value "Cut" will be assigned to variable Guts etc.

Jelly, 27 bytes

“B¢ċḅßṗœyœḳlsɲṀƥṆQ_»ḲṖ€ṙiḢɗ

A monadic link that accepts a list of characters and yields a list of characters.

Try it online!

How?

“...»ḲṖ€ṙiḢɗ - Link: list of characters, Name
“...»        - compressed string -> "Icel Fired Oily Elect Timex Gutsy Cute Bombe"
     Ḳ       - split at spaces
      Ṗ€     - pop each -> Names = ["Ice","Fire","Oil","Elec","Time","Guts","Cut","Bomb"]
           ɗ - last three links as a dyad - f(Names, Name)
         i   -   1-indexed index of {Name} in {Names}
        ṙ    -   rotate {Names} left by {that}
          Ḣ  -   head

AWK, 76 bytes

{for(split("Cut Bomb Ice Fire Oil Elec Time Guts",a);a[i++]!~$1;);}$0=a[i%8]

Try it at home!

awk '{for(split("Cut Bomb Ice Fire Oil Elec Time Guts",a);a[i++]!~$1;);}$0=a[i%8]' <<< Guts

However, it would get stuck in a loop with invalid input.

{for(split("Cut Bomb Ice Fire Oil Elec Time Guts",a); # Robot Masters
a[i++]!~$1;);}                                        # match and next
$0=a[i%8]                                             # output/catch loop

Java (JDK), 71 bytes

It seems splitting is shorter than regex here.

s->"Cut Bomb Ice Fire Oil Elec Time Guts Cut".split(s)[1].split(" ")[1]

Try it online!


Alternative solution (74 bytes) if lowercase is allowed in the output:

s->"CbombCBiceBIfireIFoilFOelecOEtimeETgutsTGcut".split(""+s.charAt(0))[1]

Try it online!

Google Sheets, 64 bytes 83 bytes 93 bytes

=regexextract("CutBombIceFireOilElecTimeGutsCut",A1&"(.[a-z]+)")

Using l4m2's regex approach.

The other way:

=let(a,split("Cut1Bomb1Ice1Fire1Oil1Elec1Time1Guts1Cut",1),index(a,match(A1,a,)+1))

screenshot

Kotlin, 81 bytes

{s->"Cut Bomb Ice Fire Oil Elec Time Guts Cut".split(" ").run{get(indexOf(s)+1)}}

Try it online!

or if you accept leading spaces:

Kotlin, 67 bytes

{s->"CutBomb IceFire OilElecTimeGutsCut".substringAfter(s).take(4)}

Try it online!

both of these use val f:(String)->String= as the header

APL+WIN, 58 bytes

Prompts for name.

↑(r⍳⊂⎕)⌽r←(+\(⎕av⍳r)>43)⊂r←'CutBombIceFireOilElecTimeGuts'

Try it online! Thanks to Dyalog Classic

05AB1E, 29 bytes

”GutsížÆÂ™ÄŠÄŠÙµÙ€º”#4δ£Dyk>è

Try it online or verify all test cases.

Explanation:

”GutsížÆÂ™ÄŠÄŠÙµÙ€º”
           # Push dictionary string "Guts Cut Bomb Ice Fire Oil Electricity Time"
 #         # Split it on spaces
   δ       # Map over each word:
  4 £      # Only keep the first 4 characters to fix "Electricity"→"Elec"
     D     # Duplicate this list
      Ik   # Get the index of the input in this list
        >  # Increase it by 1
         è # Modular index it into the list again
           # (after which the result is output implicitly)

See this 05AB1E tip of mine (section How to use the dictionary?) to understand why ”GutsížÆÂ™ÄŠÄŠÙµÙ€º” is "Guts Cut Bomb Ice Fire Oil Electricity Time".

JavaScript (Node.js), 61 bytes

x=>'CutGutsTimeElecOilFireIceBombCut'.match(`(.[a-z]*)`+x)[1]

Try it online!

-2B emanresu A

Bash + coreutils, 56

grep -Po $1\\K.[a-z]+<<<CutBombIceFireOilElecTimeGutsCut

Try it online!

Retina 0.8.2, 75 bytes

T`B-H\OITcel-obs`IB_T\OC-Gemit_c_
But
Bomb
ct
ce
em
ire
ii
lec
itm
uts
rm
l

Try it online! Link includes test cases. Explanation:

T`B-H\OITcel-obs`IB_T\OC-Gemit_c_

Transliterate as many letters as possible, including all of the upper case letters. This is enough to handle Elec to Time and Guts to Cut. (O normally means 13579 so it needs to be escaped. Other escaped letters are avoided by including them in a range.)

But
Bomb

Cut transliterates to But so fix it to become Bomb without changing Cut transliterated from Guts.

ct
ce

Bomb transliterates to Ict so fix it to become Ice without changing Guts or Cut.

em
ire

Ice transliterates to Fem so fix it to become Fire.

ii
lec

Oil transliterates to Eii to fix it to become Elec.

itm
uts

Time transliterates to Gitm to fix it to become Guts.

rm
l

Fire transliterates to Oirm to fix it to become Oil.

Python 3, 72 bytes

dict(zip(l:="Cut Bomb Ice Fire Oil Elec Time Guts".split()*2,l[1:])).get

Try it online!

Creates a dictionary whose keys in order are Cut, Bomb, ... (doubled), and whose corresponding values are those with the first item removed. The main function is the .get method of the dictionary; if the dictionary itself suffices, those 4 bytes can be cut.

Also 72 bytes, using id just for as the shortest predefined variable:

{id:(id:=x)for x in"Cut Bomb Ice Fire Oil Elec Time Guts".split()*2}.get

Try it online!

Python, 73 bytes

lambda s:l[l.index(s)-1]
l="Guts Time Elec Oil Fire Ice Bomb Cut".split()

Try it online!

Uses that indices wrap around into the negatives, so the index before 0 is -1 which selects the last element.

Python 3, 73 bytes

lambda s:"Guts Time Oil Cut Elec Fire | Ice Bomb".split()[ord(s[0])%25%9]

Try it online!

Only looks at the boss's letter (which are all distinct), and uses a mod chain to classify it. Bytestring input would save 5 bytes.