Classes:Korax

From ZDoom Wiki

Jump to: navigation, search
Korax
Actor type Monster Game
DoomEd Number 10200 Class Name Korax

Classes: Korax

Korax, the middle brother of the three Serpent Riders, is far more powerful than his cadet D'Sparil. Within his castle, he uses the magic of the Chaos Sphere to summon hordes of phantasmal monsters (ettins, centaurs, and chaos serpents) and trigger all sorts of traps against his foe.

Contents

Using Korax in a map

Korax, like his brother and the death wyvern, is a monster that should not be used in a map without the proper accomodations. Korax will call several ACS scripts and these scripts require several reserved TIDs:

Korax Scripts

249: Started by A_KoraxChase when Korax's health is reduced to half its full value.
250: Control script that activate spikes
251: Control script that turns floors into lava
252: Control script that unleashes hordes of monsters
253: Control script that activates fireball spitters
254: Control script that summons phantasmal monsters, used when Korax is reduced to half its value (as determined by A_KoraxCommand)
255: Death script started by A_KoraxBonePop

Korax TIDs

245: Korax himself, used by script 249 and as the center point of the earthquake by all control scripts.
248: Initial teleport destination, used by A_KoraxChase when his health is lowered to one half.
249: Secondary teleport destinations, used by A_KoraxChase after the first teleportation

TIDs 250 to 255 are marked as reserved for the same-numbered scripts in the source code, but aren't actually used by the ACS in the map.

Korax codepointers

Simplified pseudo-code meant to explain what the action functions do. For the actual C++ code, consult the source in the subversion repository.

A_KoraxChase

If (health lower than half for the first time)
  StartScript 249
  teleport to TID 248
If (enemy targeted)
  if (random 30/255)
    Goto Missile state
  elseif (random 30/255)
    PlaySound ActiveSound
If (health lower than half)
  if (random 10/255)
    teleport to TID 249

A_KoraxDecide

If (random 220/255)
  Goto Attack state
else
  Goto Command state

A_KoraxBonePop

Spawns six KoraxSpirit sent at 60° angle intervals
StartScript 255

A_KoraxMissile

Choses randomly between WraithFX1, Demon1FX1, Demon2FX1, FireDemonMissile, CentaurFX and SerpentFX
PlaySound "KoraxAttack"
Throw a volley of six of the chosen missiles (one per arm)

A_KoraxCommand

PlaySound "KoraxCommand"
Spawns a KoraxBolt and throw it to the ceiling
If (health higher than half)
  Choses randomly between scripts 250, 251, 252 and 253
else
  Choses randomly between scripts 250, 251, 252, 253 and 254
StartScript chosen script

Korax scripts

This doesn't explain the exact details of what the scripts do in MAP40 of Hexen.wad, and instead merely overview quickly what type of effects they have so that a modder might provide equivalent scripts that will be activated by Korax.

249: Used by Korax to retreat to safety until all ettins are killed.
250: Activate a series of spikes.
251: Temporarily turns the floor to lava and spawns a number of fireballs.
252: Provokes an earthquake and opens doors to rooms fulls of chaos serpents and dark bishops.
253: Temporarily lowers four cross-shaped devices that throw a large number of fireballs.
254: Provokes an earthquake and spawn a randomly-chosen phantasmal monster on a randomly-chosen spawn point.
255: Provokes an earthquake and opens the door to the end of level.

DECORATE definition

ACTOR Korax 10200
{
  Game Hexen
  Health 5000
  Painchance 20
  Speed 10
  Radius 65
  Height 115
  Mass 2000
  Damage 15
  Monster
  +BOSS
  +FLOORCLIP
  +TELESTOMP
  +DONTMORPH
  +NOTARGET
  +NOICEDEATH
  SeeSound "KoraxSight"
  AttackSound "KoraxAttack"
  PainSound "KoraxPain"
  DeathSound "KoraxDeath"
  ActiveSound "KoraxActive"
  Obituary "$OB_KORAX" // "%o was swept from the board by Korax."

  action native A_KoraxChase();
  action native A_KoraxDecide();
  action native A_KoraxBonePop();
  action native A_KoraxMissile();
  action native A_KoraxCommand();
  action native A_KSpiritRoam();

  States
  {
  Spawn:
    KORX A 5 A_Look
    Loop
  See:
    KORX AAA 3 A_KoraxChase
    KORX B 3 A_Chase
    KORX BBB 3 A_KoraxChase
    KORX C 0 A_PlaySound("KoraxStep")
    KORX C 3 A_Chase
    KORX CCC 3 A_KoraxChase
    KORX D 3 A_Chase
    KORX DDD 3 A_KoraxChase
    KORX A 0 A_PlaySound("KoraxStep")
    KORX A 3 A_Chase
    Loop
  Pain:
    KORX H 5 A_Pain
    KORX H 5
    Goto See
  Missile:
    KORX E 2 Bright A_FaceTarget
    KORX E 5 Bright A_KoraxDecide
    Wait
  Death:
    KORX I 5
    KORX J 5 A_FaceTarget
    KORX K 5 A_Scream
    KORX LMNOP 5
    KORX Q 10
    KORX R 5 A_KoraxBonePop
    KORX S 5 A_NoBlocking
    KORX TU 5
    KORX V -1
    Stop
  Attack:
    KORX E 4 Bright A_FaceTarget
    KORX F 8 Bright A_KoraxMissile
    KORX E 8 Bright
    Goto See
  Command:
    KORX E 5 Bright A_FaceTarget
    KORX W 10 Bright A_FaceTarget
    KORX G 15 Bright A_KoraxCommand
    KORX W 10 Bright
    KORX E 5 Bright
    Goto See
  }
}
Personal tools