From 552f094ec15bb0d5ed2348da50f8171565df182c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 17 Oct 2016 12:58:23 +0200 Subject: [PATCH] - converted the rest of Heretic's actors. - fixed: Boolean constants were not properly handled. --- src/scripting/zscript/zcc_compile.cpp | 6 +- wadsrc/static/actors/heretic/chicken.txt | 181 ------------- wadsrc/static/actors/heretic/dsparil.txt | 270 ------------------- wadsrc/static/actors/heretic/ironlich.txt | 175 ------------ wadsrc/static/actors/heretic/knight.txt | 118 -------- wadsrc/static/actors/heretic/wizard.txt | 96 ------- wadsrc/static/decorate.txt | 6 - wadsrc/static/zscript.txt | 3 - wadsrc/static/zscript/heretic/chicken.txt | 201 ++++++++++++++ wadsrc/static/zscript/heretic/dsparil.txt | 297 +++++++++++++++++++++ wadsrc/static/zscript/heretic/ironlich.txt | 191 +++++++++++++ wadsrc/static/zscript/heretic/knight.txt | 131 +++++++++ wadsrc/static/zscript/heretic/wizard.txt | 103 +++++++ 13 files changed, 928 insertions(+), 850 deletions(-) delete mode 100644 wadsrc/static/actors/heretic/chicken.txt delete mode 100644 wadsrc/static/actors/heretic/dsparil.txt delete mode 100644 wadsrc/static/actors/heretic/ironlich.txt delete mode 100644 wadsrc/static/actors/heretic/knight.txt delete mode 100644 wadsrc/static/actors/heretic/wizard.txt create mode 100644 wadsrc/static/zscript/heretic/chicken.txt create mode 100644 wadsrc/static/zscript/heretic/dsparil.txt create mode 100644 wadsrc/static/zscript/heretic/ironlich.txt create mode 100644 wadsrc/static/zscript/heretic/knight.txt create mode 100644 wadsrc/static/zscript/heretic/wizard.txt diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index 1992587c8..5511898f7 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -2385,6 +2385,10 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast) { return new FxConstant(cnst->IntVal, *ast); } + else if (cnst->Type->IsA(RUNTIME_CLASS(PBool))) + { + return new FxConstant(!!cnst->IntVal, *ast); + } else if (cnst->Type->IsA(RUNTIME_CLASS(PFloat))) { return new FxConstant(cnst->DoubleVal, *ast); @@ -2396,7 +2400,7 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast) else { // can there be other types? - Error(cnst, "Unknown constant type"); + Error(cnst, "Unknown constant type %s", cnst->Type->DescriptiveName()); return new FxConstant(0, *ast); } } diff --git a/wadsrc/static/actors/heretic/chicken.txt b/wadsrc/static/actors/heretic/chicken.txt deleted file mode 100644 index 8d3b1e71d..000000000 --- a/wadsrc/static/actors/heretic/chicken.txt +++ /dev/null @@ -1,181 +0,0 @@ - -// Beak puff ---------------------------------------------------------------- - -ACTOR BeakPuff : StaffPuff -{ - Mass 5 - Renderstyle Translucent - Alpha 0.4 - AttackSound "chicken/attack" - VSpeed 1 -} - -// Beak --------------------------------------------------------------------- - -ACTOR Beak : Weapon -{ - Weapon.SelectionOrder 10000 - +WEAPON.DONTBOB - +WEAPON.MELEEWEAPON - Weapon.YAdjust 15 - Weapon.SisterWeapon "BeakPowered" - - action native A_BeakRaise (); - action native A_BeakAttackPL1(); - - States - { - Ready: - BEAK A 1 A_WeaponReady - Loop - Deselect: - BEAK A 1 A_Lower - Loop - Select: - BEAK A 1 A_BeakRaise - Loop - Fire: - BEAK A 18 A_BeakAttackPL1 - Goto Ready - } -} - - -ACTOR BeakPowered : Beak -{ - +WEAPON.POWERED_UP - Weapon.SisterWeapon "Beak" - - action native A_BeakAttackPL2(); - - States - { - Fire: - BEAK A 12 A_BeakAttackPL2 - Goto Ready - } -} - -// Chicken player ----------------------------------------------------------- - -ACTOR ChickenPlayer : PlayerPawn native -{ - Health 30 - ReactionTime 0 - PainChance 255 - Radius 16 - Height 24 - Speed 1 - Gravity 0.125 - +NOSKIN - +CANSUPERMORPH - PainSound "chicken/pain" - DeathSound "chicken/death" - Player.JumpZ 1 - Player.Viewheight 21 - Player.ForwardMove 1.22, 1.22 - Player.SideMove 1.22, 1.22 - Player.SpawnClass "Chicken" - Player.SoundClass "Chicken" - Player.DisplayName "Chicken" - Player.MorphWeapon "Beak" - -PICKUP - States - { - Spawn: - CHKN A -1 - Stop - See: - CHKN ABAB 3 - Loop - Melee: - Missile: - CHKN C 12 - Goto Spawn - Pain: - CHKN D 4 A_Feathers - CHKN C 4 A_Pain - Goto Spawn - Death: - CHKN E 6 A_Scream - CHKN F 6 A_Feathers - CHKN G 6 - CHKN H 6 A_NoBlocking - CHKN IJK 6 - CHKN L -1 - Stop - } -} - - - -// Chicken (non-player) ----------------------------------------------------- - -ACTOR Chicken : MorphedMonster -{ - Health 10 - Radius 9 - Height 22 - Mass 40 - Speed 4 - Painchance 200 - Monster - -COUNTKILL - +WINDTHRUST - +DONTMORPH - +FLOORCLIP - SeeSound "chicken/pain" - AttackSound "chicken/attack" - PainSound "chicken/pain" - DeathSound "chicken/death" - ActiveSound "chicken/active" - Obituary "$OB_CHICKEN" - States - { - Spawn: - CHKN AB 10 A_Look - Loop - See: - CHKN AB 3 A_Chase - Loop - Pain: - CHKN D 5 A_Feathers - CHKN C 5 A_Pain - Goto See - Melee: - CHKN A 8 A_FaceTarget - CHKN C 10 A_CustomMeleeAttack(random[ChicAttack](1,2)) - Goto See - Death: - CHKN E 6 A_Scream - CHKN F 6 A_Feathers - CHKN G 6 - CHKN H 6 A_NoBlocking - CHKN IJK 6 - CHKN L -1 - Stop - } -} - - -// Feather ------------------------------------------------------------------ - -ACTOR Feather -{ - Radius 2 - Height 4 - +MISSILE +DROPOFF - +NOTELEPORT +CANNOTPUSH - +WINDTHRUST +DONTSPLASH - Gravity 0.125 - States - { - Spawn: - CHKN MNOPQPON 3 - Loop - Death: - CHKN N 6 - Stop - } -} - diff --git a/wadsrc/static/actors/heretic/dsparil.txt b/wadsrc/static/actors/heretic/dsparil.txt deleted file mode 100644 index 8b2f4dc5c..000000000 --- a/wadsrc/static/actors/heretic/dsparil.txt +++ /dev/null @@ -1,270 +0,0 @@ - -// Boss spot ---------------------------------------------------------------- - -ACTOR BossSpot : SpecialSpot -{ - +INVISIBLE -} - -// Sorcerer (D'Sparil on his serpent) --------------------------------------- - -ACTOR Sorcerer1 -{ - Health 2000 - Radius 28 - Height 100 - Mass 800 - Speed 16 - PainChance 56 - Monster - +BOSS - +DONTMORPH - +NORADIUSDMG - +NOTARGET - +NOICEDEATH - +FLOORCLIP - +DONTGIB - SeeSound "dsparilserpent/sight" - AttackSound "dsparilserpent/attack" - PainSound "dsparilserpent/pain" - DeathSound "dsparilserpent/death" - ActiveSound "dsparilserpent/active" - Obituary "$OB_DSPARIL1" - HitObituary "$OB_DSPARIL1HIT" - - action native A_Sor1Pain (); - action native A_Sor1Chase (); - action native A_Srcr1Attack (); - action native A_SorcererRise (); - - States - { - Spawn: - SRCR AB 10 A_Look - Loop - See: - SRCR ABCD 5 A_Sor1Chase - Loop - Pain: - SRCR Q 6 A_Sor1Pain - Goto See - Missile: - SRCR Q 7 A_FaceTarget - SRCR R 6 A_FaceTarget - SRCR S 10 A_Srcr1Attack - Goto See - Missile2: - SRCR S 10 A_FaceTarget - SRCR Q 7 A_FaceTarget - SRCR R 6 A_FaceTarget - SRCR S 10 A_Srcr1Attack - Goto See - Death: - SRCR E 7 - SRCR F 7 A_Scream - SRCR G 7 - SRCR HIJK 6 - SRCR L 25 A_PlaySound("dsparil/zap", CHAN_BODY, 1, false, ATTN_NONE) - SRCR MN 5 - SRCR O 4 - SRCR L 20 A_PlaySound("dsparil/zap", CHAN_BODY, 1, false, ATTN_NONE) - SRCR MN 5 - SRCR O 4 - SRCR L 12 - SRCR P -1 A_SorcererRise - } -} - - -// Sorcerer FX 1 ------------------------------------------------------------ - -ACTOR SorcererFX1 -{ - Radius 10 - Height 10 - Speed 20 - FastSpeed 28 - Damage 10 - DamageType Fire - Projectile - -ACTIVATEIMPACT - -ACTIVATEPCROSS - RenderStyle Add - States - { - Spawn: - FX14 ABC 6 BRIGHT - Loop - Death: - FX14 DEFGH 5 BRIGHT - Stop - } -} - - -// Sorcerer 2 (D'Sparil without his serpent) -------------------------------- - -ACTOR Sorcerer2 -{ - Health 3500 - Radius 16 - Height 70 - Mass 300 - Speed 14 - Painchance 32 - Monster - +DROPOFF - +BOSS - +DONTMORPH - +FULLVOLACTIVE - +NORADIUSDMG - +NOTARGET - +NOICEDEATH - +FLOORCLIP - +BOSSDEATH - SeeSound "dsparil/sight" - AttackSound "dsparil/attack" - PainSound "dsparil/pain" - ActiveSound "dsparil/active" - Obituary "$OB_DSPARIL2" - HitObituary "$OB_DSPARIL2HIT" - - action native A_Srcr2Decide (); - action native A_Srcr2Attack (); - action native A_Sor2DthInit (); - action native A_Sor2DthLoop (); - - States - { - Spawn: - SOR2 MN 10 A_Look - Loop - See: - SOR2 MNOP 4 A_Chase - Loop - Rise: - SOR2 AB 4 - SOR2 C 4 A_PlaySound("dsparil/rise", CHAN_BODY, 1, false, ATTN_NONE) - SOR2 DEF 4 - SOR2 G 12 A_PlaySound("dsparil/sight", CHAN_BODY, 1, false, ATTN_NONE) - Goto See - Pain: - SOR2 Q 3 - SOR2 Q 6 A_Pain - Goto See - Missile: - SOR2 R 9 A_Srcr2Decide - SOR2 S 9 A_FaceTarget - SOR2 T 20 A_Srcr2Attack - Goto See - Teleport: - SOR2 LKJIHG 6 - Goto See - Death: - SDTH A 8 A_Sor2DthInit - SDTH B 8 - SDTH C 8 A_PlaySound("dsparil/scream", CHAN_BODY, 1, false, ATTN_NONE) - DeathLoop: - SDTH DE 7 - SDTH F 7 A_Sor2DthLoop - SDTH G 6 A_PlaySound("dsparil/explode", CHAN_BODY, 1, false, ATTN_NONE) - SDTH H 6 - SDTH I 18 - SDTH J 6 A_NoBlocking - SDTH K 6 A_PlaySound("dsparil/bones", CHAN_BODY, 1, false, ATTN_NONE) - SDTH LMN 6 - SDTH O -1 A_BossDeath - Stop - } -} - - - -// Sorcerer 2 FX 1 ---------------------------------------------------------- - -ACTOR Sorcerer2FX1 -{ - Radius 10 - Height 6 - Speed 20 - FastSpeed 28 - Damage 1 - Projectile - -ACTIVATEIMPACT - -ACTIVATEPCROSS - RenderStyle Add - - action native A_BlueSpark (); - - States - { - Spawn: - FX16 ABC 3 BRIGHT A_BlueSpark - Loop - Death: - FX16 G 5 BRIGHT A_Explode(random[S2FX1](80,111)) - FX16 HIJKL 5 BRIGHT - Stop - } -} - -// Sorcerer 2 FX Spark ------------------------------------------------------ - -ACTOR Sorcerer2FXSpark -{ - Radius 20 - Height 16 - +NOBLOCKMAP - +NOGRAVITY - +NOTELEPORT - +CANNOTPUSH - RenderStyle Add - States - { - Spawn: - FX16 DEF 12 BRIGHT - Stop - } -} - -// Sorcerer 2 FX 2 ---------------------------------------------------------- - -ACTOR Sorcerer2FX2 -{ - Radius 10 - Height 6 - Speed 6 - Damage 10 - Projectile - -ACTIVATEIMPACT - -ACTIVATEPCROSS - RenderStyle Add - - action native A_GenWizard (); - - States - { - Spawn: - FX11 A 35 BRIGHT - FX11 A 5 BRIGHT A_GenWizard - FX11 B 5 BRIGHT - Goto Spawn+1 - Death: - FX11 CDEFG 5 BRIGHT - Stop - - } -} -// Sorcerer 2 Telefade ------------------------------------------------------ - -ACTOR Sorcerer2Telefade -{ - +NOBLOCKMAP - States - { - Spawn: - SOR2 GHIJKL 6 - Stop - } -} - diff --git a/wadsrc/static/actors/heretic/ironlich.txt b/wadsrc/static/actors/heretic/ironlich.txt deleted file mode 100644 index 43d7c16c5..000000000 --- a/wadsrc/static/actors/heretic/ironlich.txt +++ /dev/null @@ -1,175 +0,0 @@ - -// Ironlich ----------------------------------------------------------------- - -ACTOR Ironlich -{ - Health 700 - Radius 40 - Height 72 - Mass 325 - Speed 6 - Painchance 32 - Monster - +NOBLOOD - +DONTMORPH - +DONTSQUASH - +BOSSDEATH - SeeSound "ironlich/sight" - AttackSound "ironlich/attack" - PainSound "ironlich/pain" - DeathSound "ironlich/death" - ActiveSound "ironlich/active" - Obituary "$OB_IRONLICH" - HitObituary "$OB_IRONLICHHIT" - DropItem "BlasterAmmo", 84, 10 - DropItem "ArtiEgg", 51, 0 - - action native A_LichAttack (); - - States - { - Spawn: - LICH A 10 A_Look - Loop - See: - LICH A 4 A_Chase - Loop - Missile: - LICH A 5 A_FaceTarget - LICH B 20 A_LichAttack - Goto See - Pain: - LICH A 4 - LICH A 4 A_Pain - Goto See - Death: - LICH C 7 - LICH D 7 A_Scream - LICH EF 7 - LICH G 7 A_NoBlocking - LICH H 7 - LICH I -1 A_BossDeath - Stop - } -} - -// Head FX 1 ---------------------------------------------------------------- - -ACTOR HeadFX1 -{ - Radius 12 - Height 6 - Speed 13 - FastSpeed 20 - Damage 1 - Projectile - -ACTIVATEIMPACT - -ACTIVATEPCROSS - +THRUGHOST - RenderStyle Add - - action native A_LichIceImpact(); - - States - { - Spawn: - FX05 ABC 6 BRIGHT - Loop - Death: - FX05 D 5 BRIGHT A_LichIceImpact - FX05 EFG 5 BRIGHT - Stop - } -} - -// Head FX 2 ---------------------------------------------------------------- - -ACTOR HeadFX2 -{ - Radius 12 - Height 6 - Speed 8 - Damage 3 - Projectile - -ACTIVATEIMPACT - -ACTIVATEPCROSS - RenderStyle Add - States - { - Spawn: - FX05 HIJ 6 BRIGHT - Loop - Death: - FX05 DEFG 5 BRIGHT - Stop - } -} - - -// Head FX 3 ---------------------------------------------------------------- - -ACTOR HeadFX3 -{ - Radius 14 - Height 12 - Speed 10 - FastSpeed 18 - Damage 5 - Projectile - +WINDTHRUST - -ACTIVATEIMPACT - -ACTIVATEPCROSS - -NOBLOCKMAP - RenderStyle Add - - action native A_LichFireGrow (); - - States - { - Spawn: - FX06 ABC 4 BRIGHT A_LichFireGrow - Loop - NoGrow: - FX06 ABC 5 BRIGHT - Loop - Death: - FX06 DEFG 5 BRIGHT - Stop - } -} - - -// Whirlwind ---------------------------------------------------------------- - -ACTOR Whirlwind native -{ - Radius 16 - Height 74 - Speed 10 - Damage 1 - Projectile - -ACTIVATEIMPACT - -ACTIVATEMCROSS - +SEEKERMISSILE - +EXPLOCOUNT - +StepMissile - RenderStyle Translucent - DefThreshold 60 - Threshold 50 - Alpha 0.4 - - action native A_WhirlwindSeek(); - - States - { - Spawn: - FX07 DEFG 3 - FX07 ABC 3 A_WhirlwindSeek - Goto Spawn+4 - Death: - FX07 GFED 4 - Stop - } -} - - diff --git a/wadsrc/static/actors/heretic/knight.txt b/wadsrc/static/actors/heretic/knight.txt deleted file mode 100644 index 863c67b75..000000000 --- a/wadsrc/static/actors/heretic/knight.txt +++ /dev/null @@ -1,118 +0,0 @@ - -// Knight ------------------------------------------------------------------- - -ACTOR Knight -{ - Health 200 - Radius 24 - Height 78 - Mass 150 - Speed 12 - Painchance 100 - Monster - +FLOORCLIP - SeeSound "hknight/sight" - AttackSound "hknight/attack" - PainSound "hknight/pain" - DeathSound "hknight/death" - ActiveSound "hknight/active" - Obituary "$OB_BONEKNIGHT" - HitObituary "$OB_BONEKNIGHTHIT" - DropItem "CrossbowAmmo", 84, 5 - - action native A_KnightAttack (); - - States - { - Spawn: - KNIG AB 10 A_Look - Loop - See: - KNIG ABCD 4 A_Chase - Loop - Melee: - Missile: - KNIG E 10 A_FaceTarget - KNIG F 8 A_FaceTarget - KNIG G 8 A_KnightAttack - KNIG E 10 A_FaceTarget - KNIG F 8 A_FaceTarget - KNIG G 8 A_KnightAttack - Goto See - Pain: - KNIG H 3 - KNIG H 3 A_Pain - Goto See - Death: - KNIG I 6 - KNIG J 6 A_Scream - KNIG K 6 - KNIG L 6 A_NoBlocking - KNIG MN 6 - KNIG O -1 - Stop - } - -} - - -// Knight ghost ------------------------------------------------------------- - -ACTOR KnightGhost : Knight -{ - +SHADOW - +GHOST - RenderStyle Translucent - Alpha 0.4 -} - -// Knight axe --------------------------------------------------------------- - -ACTOR KnightAxe -{ - Radius 10 - Height 8 - Speed 9 - FastSpeed 18 - Damage 2 - Projectile - -NOBLOCKMAP - -ACTIVATEIMPACT - -ACTIVATEPCROSS - +WINDTHRUST - +THRUGHOST - DeathSound "hknight/hit" - States - { - Spawn: - SPAX A 3 BRIGHT A_PlaySound("hknight/axewhoosh") - SPAX BC 3 BRIGHT - Loop - Death: - SPAX DEF 6 BRIGHT - Stop - } -} - - -// Red axe ------------------------------------------------------------------ - -ACTOR RedAxe : KnightAxe -{ - +NOBLOCKMAP - -WINDTHRUST - Damage 7 - - action native A_DripBlood (); - - States - { - Spawn: - RAXE AB 5 BRIGHT A_DripBlood - Loop - Death: - RAXE CDE 6 BRIGHT - Stop - } -} - diff --git a/wadsrc/static/actors/heretic/wizard.txt b/wadsrc/static/actors/heretic/wizard.txt deleted file mode 100644 index 11ef0ad67..000000000 --- a/wadsrc/static/actors/heretic/wizard.txt +++ /dev/null @@ -1,96 +0,0 @@ - -// Wizard -------------------------------------------------------- - -ACTOR Wizard -{ - Health 180 - Radius 16 - Height 68 - Mass 100 - Speed 12 - Painchance 64 - Monster - +FLOAT - +NOGRAVITY - +DONTOVERLAP - SeeSound "wizard/sight" - AttackSound "wizard/attack" - PainSound "wizard/pain" - DeathSound "wizard/death" - ActiveSound "wizard/active" - Obituary "$OB_WIZARD" - HitObituary "$OB_WIZARDHIT" - DropItem "BlasterAmmo", 84, 10 - DropItem "ArtiTomeOfPower", 4, 0 - - action native A_GhostOff (); - action native A_WizAtk1 (); - action native A_WizAtk2 (); - action native A_WizAtk3 (); - - States - { - Spawn: - WZRD AB 10 A_Look - Loop - See: - WZRD A 3 A_Chase - WZRD A 4 A_Chase - WZRD A 3 A_Chase - WZRD A 4 A_Chase - WZRD B 3 A_Chase - WZRD B 4 A_Chase - WZRD B 3 A_Chase - WZRD B 4 A_Chase - Loop - Missile: - WZRD C 4 A_WizAtk1 - WZRD C 4 A_WizAtk2 - WZRD C 4 A_WizAtk1 - WZRD C 4 A_WizAtk2 - WZRD C 4 A_WizAtk1 - WZRD C 4 A_WizAtk2 - WZRD C 4 A_WizAtk1 - WZRD C 4 A_WizAtk2 - WZRD D 12 A_WizAtk3 - Goto See - Pain: - WZRD E 3 A_GhostOff - WZRD E 3 A_Pain - Goto See - Death: - WZRD F 6 A_GhostOff - WZRD G 6 A_Scream - WZRD HI 6 - WZRD J 6 A_NoBlocking - WZRD KL 6 - WZRD M -1 A_SetFloorClip - Stop - } -} - -// Projectile -------------------------------------------------------- - -ACTOR WizardFX1 -{ - Radius 10 - Height 6 - Speed 18 - FastSpeed 24 - Damage 3 - Projectile - -ACTIVATEIMPACT - -ACTIVATEPCROSS - RenderStyle Add - States - { - Spawn: - FX11 AB 6 BRIGHT - Loop - Death: - FX11 CDEFG 5 BRIGHT - Stop - } -} - - diff --git a/wadsrc/static/decorate.txt b/wadsrc/static/decorate.txt index 69b2fbb55..b8586d3ee 100644 --- a/wadsrc/static/decorate.txt +++ b/wadsrc/static/decorate.txt @@ -1,9 +1,3 @@ -#include "actors/heretic/knight.txt" -#include "actors/heretic/wizard.txt" -#include "actors/heretic/ironlich.txt" -#include "actors/heretic/dsparil.txt" -#include "actors/heretic/chicken.txt" - #include "actors/hexen/baseweapons.txt" #include "actors/hexen/korax.txt" #include "actors/hexen/fighterplayer.txt" diff --git a/wadsrc/static/zscript.txt b/wadsrc/static/zscript.txt index e65e49fea..8fef6819a 100644 --- a/wadsrc/static/zscript.txt +++ b/wadsrc/static/zscript.txt @@ -79,11 +79,8 @@ zscript/heretic/clink.txt zscript/heretic/beast.txt zscript/heretic/snake.txt zscript/heretic/hereticimp.txt -/* zscript/heretic/knight.txt zscript/heretic/wizard.txt zscript/heretic/ironlich.txt zscript/heretic/dsparil.txt zscript/heretic/chicken.txt -*/ - diff --git a/wadsrc/static/zscript/heretic/chicken.txt b/wadsrc/static/zscript/heretic/chicken.txt new file mode 100644 index 000000000..2e5ada81c --- /dev/null +++ b/wadsrc/static/zscript/heretic/chicken.txt @@ -0,0 +1,201 @@ + +// Beak puff ---------------------------------------------------------------- + +class BeakPuff : StaffPuff +{ + Default + { + Mass 5; + Renderstyle "Translucent"; + Alpha 0.4; + AttackSound "chicken/attack"; + VSpeed 1; + } +} + +// Beak --------------------------------------------------------------------- + +class Beak : Weapon +{ + Default + { + Weapon.SelectionOrder 10000; + +WEAPON.DONTBOB + +WEAPON.MELEEWEAPON + Weapon.YAdjust 15; + Weapon.SisterWeapon "BeakPowered"; + } + + action native void A_BeakRaise (); + action native void A_BeakAttackPL1(); + + States + { + Ready: + BEAK A 1 A_WeaponReady; + Loop; + Deselect: + BEAK A 1 A_Lower; + Loop; + Select: + BEAK A 1 A_BeakRaise; + Loop; + Fire: + BEAK A 18 A_BeakAttackPL1; + Goto Ready; + } +} + + +class BeakPowered : Beak +{ + Default + { + +WEAPON.POWERED_UP + Weapon.SisterWeapon "Beak"; + } + + action native void A_BeakAttackPL2(); + + States + { + Fire: + BEAK A 12 A_BeakAttackPL2; + Goto Ready; + } +} + +// Chicken player ----------------------------------------------------------- + +class ChickenPlayer : PlayerPawn native +{ + Default + { + Health 30; + ReactionTime 0; + PainChance 255; + Radius 16; + Height 24; + Speed 1; + Gravity 0.125; + +NOSKIN + +PLAYERPAWN.CANSUPERMORPH + PainSound "chicken/pain"; + DeathSound "chicken/death"; + Player.JumpZ 1; + Player.Viewheight 21; + Player.ForwardMove 1.22, 1.22; + Player.SideMove 1.22, 1.22; + Player.SpawnClass "Chicken"; + Player.SoundClass "Chicken"; + Player.DisplayName "Chicken"; + Player.MorphWeapon "Beak"; + -PICKUP + } + + States + { + Spawn: + CHKN A -1; + Stop; + See: + CHKN ABAB 3; + Loop; + Melee: + Missile: + CHKN C 12; + Goto Spawn; + Pain: + CHKN D 4 A_Feathers; + CHKN C 4 A_Pain; + Goto Spawn; + Death: + CHKN E 6 A_Scream; + CHKN F 6 A_Feathers; + CHKN G 6; + CHKN H 6 A_NoBlocking; + CHKN IJK 6; + CHKN L -1; + Stop; + } +} + + + +// Chicken (non-player) ----------------------------------------------------- + +class Chicken : MorphedMonster +{ + Default + { + Health 10; + Radius 9; + Height 22; + Mass 40; + Speed 4; + Painchance 200; + Monster; + -COUNTKILL + +WINDTHRUST + +DONTMORPH + +FLOORCLIP + SeeSound "chicken/pain"; + AttackSound "chicken/attack"; + PainSound "chicken/pain"; + DeathSound "chicken/death"; + ActiveSound "chicken/active"; + Obituary "$OB_CHICKEN"; + } + States + { + Spawn: + CHKN AB 10 A_Look; + Loop; + See: + CHKN AB 3 A_Chase; + Loop; + Pain: + CHKN D 5 A_Feathers; + CHKN C 5 A_Pain; + Goto See; + Melee: + CHKN A 8 A_FaceTarget; + CHKN C 10 A_CustomMeleeAttack(random[ChicAttack](1,2)); + Goto See; + Death: + CHKN E 6 A_Scream; + CHKN F 6 A_Feathers; + CHKN G 6; + CHKN H 6 A_NoBlocking; + CHKN IJK 6; + CHKN L -1; + Stop; + } +} + + +// Feather ------------------------------------------------------------------ + +class Feather : Actor +{ + Default + { + Radius 2; + Height 4; + +MISSILE +DROPOFF + +NOTELEPORT +CANNOTPUSH + +WINDTHRUST +DONTSPLASH + Gravity 0.125; + } + + States + { + Spawn: + CHKN MNOPQPON 3; + Loop; + Death: + CHKN N 6; + Stop; + } +} + diff --git a/wadsrc/static/zscript/heretic/dsparil.txt b/wadsrc/static/zscript/heretic/dsparil.txt new file mode 100644 index 000000000..ebf60eb47 --- /dev/null +++ b/wadsrc/static/zscript/heretic/dsparil.txt @@ -0,0 +1,297 @@ + +// Boss spot ---------------------------------------------------------------- + +class BossSpot : SpecialSpot +{ + Default + { + +INVISIBLE + } +} + +// Sorcerer (D'Sparil on his serpent) --------------------------------------- + +class Sorcerer1 : Actor +{ + Default + { + Health 2000; + Radius 28; + Height 100; + Mass 800; + Speed 16; + PainChance 56; + Monster; + +BOSS + +DONTMORPH + +NORADIUSDMG + +NOTARGET + +NOICEDEATH + +FLOORCLIP + +DONTGIB + SeeSound "dsparilserpent/sight"; + AttackSound "dsparilserpent/attack"; + PainSound "dsparilserpent/pain"; + DeathSound "dsparilserpent/death"; + ActiveSound "dsparilserpent/active"; + Obituary "$OB_DSPARIL1"; + HitObituary "$OB_DSPARIL1HIT"; + } + + action native void A_Sor1Pain (); + action native void A_Sor1Chase (); + action native void A_Srcr1Attack (); + action native void A_SorcererRise (); + + States + { + Spawn: + SRCR AB 10 A_Look; + Loop; + See: + SRCR ABCD 5 A_Sor1Chase; + Loop; + Pain: + SRCR Q 6 A_Sor1Pain; + Goto See; + Missile: + SRCR Q 7 A_FaceTarget; + SRCR R 6 A_FaceTarget; + SRCR S 10 A_Srcr1Attack; + Goto See; + Missile2: + SRCR S 10 A_FaceTarget; + SRCR Q 7 A_FaceTarget; + SRCR R 6 A_FaceTarget; + SRCR S 10 A_Srcr1Attack; + Goto See; + Death: + SRCR E 7; + SRCR F 7 A_Scream; + SRCR G 7; + SRCR HIJK 6; + SRCR L 25 A_PlaySound("dsparil/zap", CHAN_BODY, 1, false, ATTN_NONE); + SRCR MN 5; + SRCR O 4; + SRCR L 20 A_PlaySound("dsparil/zap", CHAN_BODY, 1, false, ATTN_NONE); + SRCR MN 5; + SRCR O 4; + SRCR L 12; + SRCR P -1 A_SorcererRise; + } +} + + +// Sorcerer FX 1 ------------------------------------------------------------ + +class SorcererFX1 : Actor +{ + Default + { + Radius 10; + Height 10; + Speed 20; + FastSpeed 28; + Damage 10; + DamageType "Fire"; + Projectile; + -ACTIVATEIMPACT + -ACTIVATEPCROSS + RenderStyle "Add"; + } + + States + { + Spawn: + FX14 ABC 6 BRIGHT; + Loop; + Death: + FX14 DEFGH 5 BRIGHT; + Stop; + } +} + + +// Sorcerer 2 (D'Sparil without his serpent) -------------------------------- + +class Sorcerer2 : Actor +{ + Default + { + Health 3500; + Radius 16; + Height 70; + Mass 300; + Speed 14; + Painchance 32; + Monster; + +DROPOFF + +BOSS + +DONTMORPH + +FULLVOLACTIVE + +NORADIUSDMG + +NOTARGET + +NOICEDEATH + +FLOORCLIP + +BOSSDEATH + SeeSound "dsparil/sight"; + AttackSound "dsparil/attack"; + PainSound "dsparil/pain"; + ActiveSound "dsparil/active"; + Obituary "$OB_DSPARIL2"; + HitObituary "$OB_DSPARIL2HIT"; + } + + action native void A_Srcr2Decide (); + action native void A_Srcr2Attack (); + action native void A_Sor2DthInit (); + action native void A_Sor2DthLoop (); + + States + { + Spawn: + SOR2 MN 10 A_Look; + Loop; + See: + SOR2 MNOP 4 A_Chase; + Loop; + Rise: + SOR2 AB 4; + SOR2 C 4 A_PlaySound("dsparil/rise", CHAN_BODY, 1, false, ATTN_NONE); + SOR2 DEF 4; + SOR2 G 12 A_PlaySound("dsparil/sight", CHAN_BODY, 1, false, ATTN_NONE); + Goto See; + Pain: + SOR2 Q 3; + SOR2 Q 6 A_Pain; + Goto See; + Missile: + SOR2 R 9 A_Srcr2Decide; + SOR2 S 9 A_FaceTarget; + SOR2 T 20 A_Srcr2Attack; + Goto See; + Teleport: + SOR2 LKJIHG 6; + Goto See; + Death: + SDTH A 8 A_Sor2DthInit; + SDTH B 8; + SDTH C 8 A_PlaySound("dsparil/scream", CHAN_BODY, 1, false, ATTN_NONE); + DeathLoop: + SDTH DE 7; + SDTH F 7 A_Sor2DthLoop; + SDTH G 6 A_PlaySound("dsparil/explode", CHAN_BODY, 1, false, ATTN_NONE); + SDTH H 6; + SDTH I 18; + SDTH J 6 A_NoBlocking; + SDTH K 6 A_PlaySound("dsparil/bones", CHAN_BODY, 1, false, ATTN_NONE); + SDTH LMN 6; + SDTH O -1 A_BossDeath; + Stop; + } +} + + + +// Sorcerer 2 FX 1 ---------------------------------------------------------- + +class Sorcerer2FX1 : Actor +{ + Default + { + Radius 10; + Height 6; + Speed 20; + FastSpeed 28; + Damage 1; + Projectile; + -ACTIVATEIMPACT + -ACTIVATEPCROSS + RenderStyle "Add"; + } + + action native void A_BlueSpark (); + + States + { + Spawn: + FX16 ABC 3 BRIGHT A_BlueSpark; + Loop; + Death: + FX16 G 5 BRIGHT A_Explode(random[S2FX1](80,111)); + FX16 HIJKL 5 BRIGHT; + Stop; + } +} + +// Sorcerer 2 FX Spark ------------------------------------------------------ + +class Sorcerer2FXSpark : Actor +{ + Default + { + Radius 20; + Height 16; + +NOBLOCKMAP + +NOGRAVITY + +NOTELEPORT + +CANNOTPUSH + RenderStyle "Add"; + } + + States + { + Spawn: + FX16 DEF 12 BRIGHT; + Stop; + } +} + +// Sorcerer 2 FX 2 ---------------------------------------------------------- + +class Sorcerer2FX2 : Actor +{ + Default + { + Radius 10; + Height 6; + Speed 6; + Damage 10; + Projectile; + -ACTIVATEIMPACT + -ACTIVATEPCROSS + RenderStyle "Add"; + } + + action native void A_GenWizard (); + + States + { + Spawn: + FX11 A 35 BRIGHT; + FX11 A 5 BRIGHT A_GenWizard; + FX11 B 5 BRIGHT; + Goto Spawn+1; + Death: + FX11 CDEFG 5 BRIGHT; + Stop; + + } +} +// Sorcerer 2 Telefade ------------------------------------------------------ + +class Sorcerer2Telefade : Actor +{ + Default + { + +NOBLOCKMAP + } + + States + { + Spawn: + SOR2 GHIJKL 6; + Stop; + } +} + diff --git a/wadsrc/static/zscript/heretic/ironlich.txt b/wadsrc/static/zscript/heretic/ironlich.txt new file mode 100644 index 000000000..9b66bcb0d --- /dev/null +++ b/wadsrc/static/zscript/heretic/ironlich.txt @@ -0,0 +1,191 @@ + +// Ironlich ----------------------------------------------------------------- + +class Ironlich : Actor +{ + Default + { + Health 700; + Radius 40; + Height 72; + Mass 325; + Speed 6; + Painchance 32; + Monster; + +NOBLOOD + +DONTMORPH + +DONTSQUASH + +BOSSDEATH + SeeSound "ironlich/sight"; + AttackSound "ironlich/attack"; + PainSound "ironlich/pain"; + DeathSound "ironlich/death"; + ActiveSound "ironlich/active"; + Obituary "$OB_IRONLICH"; + HitObituary "$OB_IRONLICHHIT"; + DropItem "BlasterAmmo", 84, 10; + DropItem "ArtiEgg", 51, 0; + } + + action native void A_LichAttack (); + + States + { + Spawn: + LICH A 10 A_Look; + Loop; + See: + LICH A 4 A_Chase; + Loop; + Missile: + LICH A 5 A_FaceTarget; + LICH B 20 A_LichAttack; + Goto See; + Pain: + LICH A 4; + LICH A 4 A_Pain; + Goto See; + Death: + LICH C 7; + LICH D 7 A_Scream; + LICH EF 7; + LICH G 7 A_NoBlocking; + LICH H 7; + LICH I -1 A_BossDeath; + Stop; + } +} + +// Head FX 1 ---------------------------------------------------------------- + +class HeadFX1 : Actor +{ + Default + { + Radius 12; + Height 6; + Speed 13; + FastSpeed 20; + Damage 1; + Projectile; + -ACTIVATEIMPACT + -ACTIVATEPCROSS + +THRUGHOST + RenderStyle "Add"; + } + + action native void A_LichIceImpact(); + + States + { + Spawn: + FX05 ABC 6 BRIGHT; + Loop; + Death: + FX05 D 5 BRIGHT A_LichIceImpact; + FX05 EFG 5 BRIGHT; + Stop; + } +} + +// Head FX 2 ---------------------------------------------------------------- + +class HeadFX2 : Actor +{ + Default + { + Radius 12; + Height 6; + Speed 8; + Damage 3; + Projectile; + -ACTIVATEIMPACT + -ACTIVATEPCROSS + RenderStyle "Add"; + } + + States + { + Spawn: + FX05 HIJ 6 BRIGHT; + Loop; + Death: + FX05 DEFG 5 BRIGHT; + Stop; + } +} + + +// Head FX 3 ---------------------------------------------------------------- + +class HeadFX3 : Actor +{ + Default + { + Radius 14; + Height 12; + Speed 10; + FastSpeed 18; + Damage 5; + Projectile; + +WINDTHRUST + -ACTIVATEIMPACT + -ACTIVATEPCROSS + -NOBLOCKMAP + RenderStyle "Add"; + } + + action native void A_LichFireGrow (); + + States + { + Spawn: + FX06 ABC 4 BRIGHT A_LichFireGrow; + Loop; + NoGrow: + FX06 ABC 5 BRIGHT; + Loop; + Death: + FX06 DEFG 5 BRIGHT; + Stop; + } +} + + +// Whirlwind ---------------------------------------------------------------- + +class Whirlwind : Actor native +{ + Default + { + Radius 16; + Height 74; + Speed 10; + Damage 1; + Projectile; + -ACTIVATEIMPACT + -ACTIVATEMCROSS + +SEEKERMISSILE + +EXPLOCOUNT + +StepMissile + RenderStyle "Translucent"; + DefThreshold 60; + Threshold 50; + Alpha 0.4; + } + + action native void A_WhirlwindSeek(); + + States + { + Spawn: + FX07 DEFG 3; + FX07 ABC 3 A_WhirlwindSeek; + Goto Spawn+4; + Death: + FX07 GFED 4; + Stop; + } +} + + diff --git a/wadsrc/static/zscript/heretic/knight.txt b/wadsrc/static/zscript/heretic/knight.txt new file mode 100644 index 000000000..f8b84b9aa --- /dev/null +++ b/wadsrc/static/zscript/heretic/knight.txt @@ -0,0 +1,131 @@ + +// Knight ------------------------------------------------------------------- + +class Knight : Actor +{ + Default + { + Health 200; + Radius 24; + Height 78; + Mass 150; + Speed 12; + Painchance 100; + Monster; + +FLOORCLIP + SeeSound "hknight/sight"; + AttackSound "hknight/attack"; + PainSound "hknight/pain"; + DeathSound "hknight/death"; + ActiveSound "hknight/active"; + Obituary "$OB_BONEKNIGHT"; + HitObituary "$OB_BONEKNIGHTHIT"; + DropItem "CrossbowAmmo", 84, 5; + } + + action native void A_KnightAttack (); + + States + { + Spawn: + KNIG AB 10 A_Look; + Loop; + See: + KNIG ABCD 4 A_Chase; + Loop; + Melee: + Missile: + KNIG E 10 A_FaceTarget; + KNIG F 8 A_FaceTarget; + KNIG G 8 A_KnightAttack; + KNIG E 10 A_FaceTarget; + KNIG F 8 A_FaceTarget; + KNIG G 8 A_KnightAttack; + Goto See; + Pain: + KNIG H 3; + KNIG H 3 A_Pain; + Goto See; + Death: + KNIG I 6; + KNIG J 6 A_Scream; + KNIG K 6; + KNIG L 6 A_NoBlocking; + KNIG MN 6; + KNIG O -1; + Stop; + } + +} + + +// Knight ghost ------------------------------------------------------------- + +class KnightGhost : Knight +{ + Default + { + +SHADOW + +GHOST + RenderStyle "Translucent"; + Alpha 0.4; + } +} + +// Knight axe --------------------------------------------------------------- + +class KnightAxe : Actor +{ + Default + { + Radius 10; + Height 8; + Speed 9; + FastSpeed 18; + Damage 2; + Projectile; + -NOBLOCKMAP + -ACTIVATEIMPACT + -ACTIVATEPCROSS + +WINDTHRUST + +THRUGHOST + DeathSound "hknight/hit"; + } + + States + { + Spawn: + SPAX A 3 BRIGHT A_PlaySound("hknight/axewhoosh"); + SPAX BC 3 BRIGHT; + Loop; + Death: + SPAX DEF 6 BRIGHT; + Stop; + } +} + + +// Red axe ------------------------------------------------------------------ + +class RedAxe : KnightAxe +{ + Default + { + +NOBLOCKMAP + -WINDTHRUST + Damage 7; + } + + action native void A_DripBlood (); + + States + { + Spawn: + RAXE AB 5 BRIGHT A_DripBlood; + Loop; + Death: + RAXE CDE 6 BRIGHT; + Stop; + } +} + diff --git a/wadsrc/static/zscript/heretic/wizard.txt b/wadsrc/static/zscript/heretic/wizard.txt new file mode 100644 index 000000000..3599354ad --- /dev/null +++ b/wadsrc/static/zscript/heretic/wizard.txt @@ -0,0 +1,103 @@ + +// Wizard -------------------------------------------------------- + +class Wizard : Actor +{ + Default + { + Health 180; + Radius 16; + Height 68; + Mass 100; + Speed 12; + Painchance 64; + Monster; + +FLOAT + +NOGRAVITY + +DONTOVERLAP + SeeSound "wizard/sight"; + AttackSound "wizard/attack"; + PainSound "wizard/pain"; + DeathSound "wizard/death"; + ActiveSound "wizard/active"; + Obituary "$OB_WIZARD"; + HitObituary "$OB_WIZARDHIT"; + DropItem "BlasterAmmo", 84, 10; + DropItem "ArtiTomeOfPower", 4, 0; + } + + action native void A_GhostOff (); + action native void A_WizAtk1 (); + action native void A_WizAtk2 (); + action native void A_WizAtk3 (); + + States + { + Spawn: + WZRD AB 10 A_Look; + Loop; + See: + WZRD A 3 A_Chase; + WZRD A 4 A_Chase; + WZRD A 3 A_Chase; + WZRD A 4 A_Chase; + WZRD B 3 A_Chase; + WZRD B 4 A_Chase; + WZRD B 3 A_Chase; + WZRD B 4 A_Chase; + Loop; + Missile: + WZRD C 4 A_WizAtk1; + WZRD C 4 A_WizAtk2; + WZRD C 4 A_WizAtk1; + WZRD C 4 A_WizAtk2; + WZRD C 4 A_WizAtk1; + WZRD C 4 A_WizAtk2; + WZRD C 4 A_WizAtk1; + WZRD C 4 A_WizAtk2; + WZRD D 12 A_WizAtk3; + Goto See; + Pain: + WZRD E 3 A_GhostOff; + WZRD E 3 A_Pain; + Goto See; + Death: + WZRD F 6 A_GhostOff; + WZRD G 6 A_Scream; + WZRD HI 6; + WZRD J 6 A_NoBlocking; + WZRD KL 6; + WZRD M -1 A_SetFloorClip; + Stop; + } +} + +// Projectile -------------------------------------------------------- + +class WizardFX1 : Actor +{ + Default + { + Radius 10; + Height 6; + Speed 18; + FastSpeed 24; + Damage 3; + Projectile; + -ACTIVATEIMPACT + -ACTIVATEPCROSS + RenderStyle "Add"; + } + + States + { + Spawn: + FX11 AB 6 BRIGHT; + Loop; + Death: + FX11 CDEFG 5 BRIGHT; + Stop; + } +} + +