# AsteriskCraft — enemy Terran build order.
#
# Lines run top-to-bottom. Edit this file (or override it from your own datapack at
# data/<namespace>/build_scripts/terran.txt) and run /reload to change how the enemy plays.
#
# Commands:
#   Workers: N            keep at least N SCVs alive from here on (trains more when short)
#   Defence: <units>      train these units; they patrol and defend the base
#   Wave: <units>         train these units, then send the whole group to attack once complete
#   Wait S                pause S seconds before the next command
#   Repeat N              loop the previous N commands endlessly (put it last)
#
#   <units> = comma list of "Qty Unit", e.g. "3 Marine". Qty may be a range "3-5".
#   Units: Marine (ranged infantry), Firebat (short-range flamethrower), Ghost (long-range
#          marksman that cloaks when hit), Wraith (cloaking fighter, needs a Starport standing),
#          Goliath (walking mech, hits air hard, also needs a Starport), Science Vessel (unarmed
#          flying detector that poisons and shields, also needs a Starport), SCV (worker).
#
# The Terran open with counts and close with a mix. A Marine is the cheapest combat unit in the mod,
# comes out in 24 seconds, and dies to almost anything on its own — so the early waves below grow in
# size. A Firebat costs twice as much, in both resources rather than either, and burns everything in
# a cone two blocks in front of it: it is worthless alone and vicious against a wall of Zerglings, so
# it arrives once the waves are big enough for a human to be massing something to meet them with.
#
# Two Marines are already standing on every Command Center at world start (RaceProfile.baseDefences),
# so the opening Defence below is reinforcement, not the first guard.
#
# The AI waits until it can afford each unit, so a wave only leaves once fully trained.

Workers: 9

# Opening: post a squad while the economy ramps up. Rifles only — a Firebat this early is two
# Marines' worth of resources that cannot shoot back at anything holding its ground.
Defence: 3 Marine
Wait 70

# Escalating pushes. The first one is small enough to be turned away by a Zealot or a Sunken; by the
# third, massed rifles out-range anything melee and the answer has to be static defence or numbers.
Wave: 4 Marine
Wait 170
Wave: 6 Marine
Wait 200

# The mix starts here, and it is what the race did not have before. A defender who has answered the
# waves above by massing cheap melee is now walking that mass into a flamethrower.
Defence: 2 Marine, 1 Firebat
Wave: 5-10 Marine, 2 Firebat
Wait 200

# The Ghost arrives last and in ones, which is what its price says it should: 50 seconds and the
# only iron the race spends. It out-ranges everything the waves above walk into, and it cloaks the
# moment something reaches it — so a defender with no detector loses whichever Ghost got shot at
# first, rather than killing it.
Wave: 5-10 Marine, 2 Firebat, 1 Ghost
Wait 200

# The Wraith arrives after the Ghost and for a steeper price still: 50 seconds, 150 wood, 100
# cobblestone and 2 iron out of a Starport, which every computer Command Center is planted with
# (RaceProfile.techBuildings) — raze it and no wave from here on has anything in the air. Two of them
# are what finally lets the race answer a Mutalisk flock or a Scout, since nothing else it fields
# reaches a flyer holding altitude except a turret bolted to the floor. Against ground troops a
# Wraith is nearly harmless (2.5 a shot), so it is escort, not a push on its own.
Wave: 5-10 Marine, 2 Firebat, 1 Ghost, 2 Wraith
Wait 200

# The Goliath comes out of the same Starport, and it is what stops a defender simply massing air.
# A Wraith is nearly harmless to anything on the ground; a Goliath is the opposite bargain — six a
# shot at anything walking and ten at anything flying, on legs, from four blocks under whatever it
# is shooting at. Two of them in a wave means the push no longer stops for a Mutalisk flock, and
# they are cheap enough (no iron, 40 seconds) to arrive in pairs rather than in ones.
Wave: 5-10 Marine, 2 Firebat, 1 Ghost, 2 Wraith, 2 Goliath
Wait 200

# The Science Vessel is the last thing off the Starport and the most expensive unit the race fields:
# 100 cobblestone, 225 wood and 80 seconds for something that cannot shoot at all. What it buys is
# the hole the closing comment below used to describe — it carries a 10-block detection bubble at
# the front of the push, so a Dark Templar ambush or a dug-in Lurker is lit up for everything
# escorting it. Every 45 seconds it also poisons whatever is nearest, or, seeing nothing, throws a
# defensive matrix over one of the units around it. One per wave: it is an enabler, and two of them
# is 450 wood not spent on the army they are enabling.
Wave: 5-10 Marine, 2 Firebat, 1 Ghost, 2 Wraith, 2 Goliath, 1 Science Vessel
Wait 200

# Endless combined pushes from here on: rifles to hold the range, Firebats to break whatever closes
# on them, a Ghost or two behind both, Wraiths overhead, Goliaths under them covering both, and a
# Science Vessel over the lot of it. That last one closes the hole this comment used to describe:
# until it, nothing a Terran army carried into the field saw a Dark Templar or a burrowed Lurker,
# so both walked straight through every push above. They no longer do — but the Vessel is one
# unarmed unit with 100 HP flying in the open, so killing it re-opens the hole for the rest of the
# wave, which is the trade this build order is now making.
Wave: 10-14 Marine, 3-4 Firebat, 1-2 Ghost, 2-3 Wraith, 2-3 Goliath, 1-2 Science Vessel
Wait 220
Repeat 2
