#------------------------------------------------------------------------
#  HERETIC definitions
#------------------------------------------------------------------------
#
#  Eureka DOOM Editor
#
#  Copyright (C) 2012-2018 Andrew Apted
#  Copyright (C) 1997-2003 André Majorel et al
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#------------------------------------------------------------------------
#
#  This game definition is derived partially from the Unofficial
#  Heretic Specs by John "DrSleep" Anderson, partially from the
#  Heretic source code, and partially from YADEX (which probably
#  used the other two sources anyway).
#
#------------------------------------------------------------------------

base_game heretic

player_size 16 56 41

sky_flat  F_SKY1

default_textures  SANDSQ2  FLOOR00  FLOOR30

# 10 = wand crystal
default_thing  10

# value 2 enables Heretic-specific checks
feature tag_666 2


#---- COLORS --------------------

color sky  199

color wall   6   35
color floor  68  94
color invis  2   12

color missing  244

color unknown_tex    205
color unknown_flat   222
color unknown_thing  173


#---- THING TYPES ---------------

thinggroup p 4F4 "Player"
thinggroup m F00 "Monster"
thinggroup w FA0 "Weapon"
thinggroup a 850 "Ammunition"
thinggroup h 280 "Health && Armor"
thinggroup b 280 "Bonus"
thinggroup k F0F "Key"
thinggroup d 66C "Decoration"
thinggroup l 66C "Light Source"
thinggroup s DAD "Sounds"
thinggroup - 0BD "OTHER"

thing  1 p - 16 PLAY "Player 1"
thing  2 p - 16 PLAY "Player 2"
thing  3 p - 16 PLAY "Player 3"
thing  4 p - 16 PLAY "Player 4"
thing 11 p t 16 PLAYF1 "Deathmatch start"
thing 14 p t 20 TELE "Teleport Spot"

thing 2005 w n 20 WGNT "Gauntlets"
thing 2001 w n 20 WBOW "Ethereal Crossbow"
thing   53 w n 20 WBLS "Dragon Claw"
thing 2004 w n 20 WSKL "Hellstaff"
thing 2003 w n 20 WPHX "Phoenix Rod"
thing 2002 w n 20 WMCE "Mace"

thing 10 a n 20 AMG1 "Wand Crystal"
thing 12 a n 20 AMG2 "Wand Geode"
thing 18 a n 20 AMC1 "Ethereal Arrows"
thing 19 a n 20 AMC2 "Ethereal Quiver"
thing 54 a n 20 AMB1 "Claw Orb"
thing 55 a n 20 AMB2 "Energy Orb"
thing 20 a n 20 AMS1 "Lesser Runes"
thing 21 a n 20 AMS2 "Greater Runes"
thing 22 a n 20 AMP1 "Flame Orb"
thing 23 a n 20 AMP2 "Inferno Orb"
thing 13 a n 20 AMM1 "Mace Spheres"
thing 16 a n 20 AMM2 "Pile of Mace Spheres"

thing 81 h n 20 PTN1 "Crystal Vial"
thing 82 h n 20 PTN2 "Quartz Flask"
thing 32 h n 20 SPHL "Mystic Urn"
thing 85 h n 20 SHLD "Shield (Silver)"
thing 31 h n 20 SHD2 "Shield (Enchanted)"

thing  8 b n  20 BAGH "Bag of Holding"
thing 30 b n  20 EGGC "Morph Ovum"
thing 34 b n  20 FBMB "Time Bomb"
thing 83 b n  20 SOAR "Wings of Wrath"
thing 75 b n  20 INVS "Shadowsphere"
thing 84 b nl 20 INVU "Ring of Invulnerability"
thing 35 b n  20 SPMP "Map Scroll"
thing 36 b n  20 ATLP "Chaos Device"
thing 86 b n  20 PWBK "Tome of Power"
thing 33 b nl 20 TRCH "Torch"

thing 73 k nl 20 AKYY "Green Key"
thing 79 k nl 20 BKYY "Blue Key"
thing 80 k nl 20 CKYY "Yellow Key"
thing 94 k -l 16 KGZB "Blue Key Statue"
thing 95 k -l 16 KGZG "Green Key Statue"
thing 96 k -l 16 KGZY "Yellow Key Statue"

thing 44 d -  12 BARL "Barrel"
thing 47 d -  14 BRPL "Brown Pillar"
thing 48 d nc 20 MOS1 "Moss 1"
thing 49 d nc 20 MOS2 "Moss 2"
thing 51 d -c  8 HCOR "Hanging Corpse"
thing 26 d nc 20 SKH4 "Hanging Skull 35"
thing 25 d nc 20 SKH3 "Hanging Skull 45"
thing 24 d nc 20 SKH2 "Hanging Skull 60"
thing 17 d nc 20 SKH1 "Hanging Skull 70"
thing 29 d -  16 SMPL "Small Pillar"
thing 37 d -   8 STGS "Stalagmite (small)"
thing 38 d -  12 STGL "Stalagmite (large)"
thing 39 d c   8 STCS "Stalactite (small)"
thing 40 d c  12 STCL "Stalactite (large)"

thing 87 d n- 12 VLCO "Volcano"
thing 74 d nl 20 TGLT "Teleport Glitter"
thing 52 d nl 20 TGLTF0 "Teleport Glitter (exit)"
thing 28 l nlc 20 CHDL "Chandelier"
thing 76 l -l 20 KFR1 "Fire Brazier"
thing 27 l -l 20 SRTC "Serpent Torch"
thing 50 l nl 20 WTRH "Wall Torch"

thing 2035 - - 16 PPOD "Pod"
thing 43   - n 20 NULL "Pod Generator"

thing 66 m - 20 IMPX "Gargoyle"
thing  5 m - 20 IMPX "Fire Gargoyle"
thing 68 m - 20 MUMM "Golem"
thing 69 m i 20 MUMM "Golem Ghost"
thing 45 m - 20 MUMMY1 "Nitro Golem"
thing 46 m i 20 MUMMY1 "Nitro Golem Ghost"
thing 64 m - 20 KNIG "Undead Warrior"
thing 65 m i 20 KNIG "Undead Warrior Ghost"
thing 15 m - 20 WZRD "Disciple"
thing 70 m - 20 BEAS "Weredragon"
thing 90 m - 20 CLNK "Sabreclaw"
thing  6 m - 20 HEAD "Ironlich"
thing  9 m - 20 MNTR "Maulotaur"
thing 92 m - 20 SNKE "Ophidian"
thing  7 m - 20 SRCR "D'Sparil"
thing 56 m t 20 SOR2H0 "D'Sparil Spot"

thing 1202 s nv 16 NULL "Sound: Waterdrip"
thing 1203 s nv 16 NULL "Sound: Slow Footsteps"
thing 1204 s nv 16 NULL "Sound: Heartbeat"
thing 1205 s nv 16 NULL "Sound: Bells"
thing 1208 s nv 16 NULL "Sound: Laughter"
thing 1209 s nv 16 NULL "Sound: Fast Footsteps"
thing 1200 s nv 16 NULL "Sound: Scream"
thing 1201 s nv 16 NULL "Sound: Squish"
thing 1206 s nv 16 NULL "Sound: Growl"
thing 1207 s nv 16 NULL "Sound: Magic"

thing 42 s nv 20 NULL "Env: Wind"
thing 41 s nv 20 NULL "Env: Waterfall"


#---- LINE TYPES ----------------

include "doom_groups"


line 0 - "-- NOTHING"

line 48 a "-- Scroll Left"
line 99 a "-- Scroll Right"

line  31 d "D1 Open door (stays open)"
line   1 d "DR Open door"
line  46 d "GR Open door (stays open)"  :tag
line  50 d "S1 Close door"  :tag
line 103 d "S1 Open door (stays open)"  :tag
line  29 d "S1 Open door"   :tag
line  42 d "SR Close door"  :tag
line  61 d "SR Open door (stays open)"  :tag
line  63 d "SR Open door"   :tag
line   3 d "W1 Close door"  :tag
line  16 d "W1 Close door for 30 seconds"   :tag
line   2 d "W1 Open door (stays open)"  :tag
line   4 d "W1 Open door"   :tag
line  75 d "WR Close door"  :tag
line  76 d "WR Close door for 30 seconds"   :tag
line  86 d "WR Open door (stays open)"  :tag
line  90 d "WR Open door"   :tag
line 100 d "WR Open door (turbo)"   :tag

line  32 k "D1 Open blue door (stays open)"
line  26 k "DR Open blue door"
line  34 k "D1 Open yellow door (stays open)"
line  27 k "DR Open yellow door"
line  33 k "D1 Open green door (stays open)"
line  28 k "DR Open green door"

# the "S1" and "W1" are lowercase here to inhibit the map checking
# functions complaining about missing tag numbers.
line  11 e "s1 Exit level"
line  51 e "s1 Secret exit"
line  52 e "w1 Exit level"
line 105 e "w1 Secret exit"

line  71 f "S1 Lower turbo floor to HEF + 8"    :tag
line 102 f "S1 Lower floor to HEF"  :tag
line  23 f "S1 Lower floor to LEF"  :tag
line  70 f "SR Lower turbo floor to HEF + 8"    :tag
line  45 f "SR Lower floor to HEF"  :tag
line  60 f "SR Lower floor to LEF"  :tag
line  36 f "W1 Lower turbo floor to HEF + 8"    :tag
line  37 f "W1 Lower floor to LEF (NXP)"    :tag
line  19 f "W1 Lower floor to HEF"  :tag
line  38 f "W1 Lower floor to LEF"  :tag
line  98 f "WR Lower turbo floor to HEF + 8"    :tag
line  84 f "WR Lower floor to LEF (NXP)"    :tag
line  83 f "WR Lower floor to HEF"  :tag
line  82 f "WR Lower floor to LEF"  :tag

line  21 p "S1 Lower lift"  :tag
line  62 p "SR Lower lift"  :tag
line  10 p "W1 Lower lift"  :tag
line  88 p "WR Lower lift"  :tag

line  53 m "W1 Start Moving Floor"  :tag
line  54 m "W1 Stop  Moving Floor"  :tag
line  87 m "WR Start Moving Floor"  :tag
line  89 m "WR Stop  Moving Floor"  :tag

line   7 s "S1 Raise stairs by 8"   :tag
line 107 s "S1 Raise stairs by 16"  :tag
line   8 s "W1 Raise stairs by 8"   :tag
line 106 s "W1 Raise stairs by 16"  :tag

line  39 - "W1 Teleport"    :tag
line  97 - "WR Teleport"    :tag

line   6 h "W1 Crusher" :tag
line  77 h "WR Crusher" :tag
line  25 h "W1 Crusher /slow"   :tag
line  73 h "WR Crusher /slow"   :tag
line  57 h "W1 Stop Crusher"    :tag
line  74 h "WR Stop Crusher"    :tag

line  47 g "G1 Raise floor to nhEF (TX)"    :tag
line  24 g "G1 Raise floor to LIC"  :tag
line  55 g "S1 Raise floor to LIC - 8, crush"   :tag
line 101 g "S1 Raise floor to LIC"  :tag
line  18 g "S1 Raise floor to nhEF" :tag
line  20 g "S1 Raise floor to nhEF (TX)"    :tag
line  15 g "S1 Raise floor by 24 (TX)"  :tag
line  14 g "S1 Raise floor by 32 (TX)"  :tag
line  65 g "SR Raise floor to LIC - 8, crush"   :tag
line  69 g "SR Raise floor to nhEF" :tag
line  64 g "SR Raise floor to LIC"  :tag
line  66 g "SR Raise floor by 24 (TX)"  :tag
line  67 g "SR Raise floor by 32 (TX)"  :tag
line  68 g "SR Raise floor to nhEF (TX)"    :tag
line  59 g "W1 Raise floor by 24 (TXP)" :tag
line  58 g "W1 Raise floor by 24"   :tag
line   5 g "W1 Raise floor to LIC"  :tag
line  30 g "W1 Raise floor by ShortestLowerTexture" :tag
line  22 g "W1 Raise floor to nhEF (TX)"    :tag
line  56 g "W1 Raise floor to LIC - 8, crush"   :tag
line  93 g "WR Raise floor by 24 (TXP)" :tag
line  94 g "WR Raise floor to LIC - 8, crush"   :tag
line  95 g "WR Raise floor to nhEF (TX)"    :tag
line  92 g "WR Raise floor by 24"   :tag
line  91 g "WR Raise floor to LIC"  :tag
line  96 g "WR Raise floor by ShortestLowerTexture" :tag

line  13 l "W1 Light level goes to 255" :tag
line  35 l "W1 Light level goes to 35"  :tag
line  12 l "W1 Light level goes to HE"  :tag
line 104 l "W1 Light level goes to LE"  :tag
line  81 l "WR Light level goes to 255" :tag
line  79 l "WR Light level goes to 35"  :tag
line  80 l "WR Light level goes to HE"  :tag
line  17 l "W1 Lignt blinking 1 Hz" :tag

line  49 c "S1 Lower ceiling to floor + 8"  :tag
line  41 c "S1 Lower ceiling to floor"  :tag
line  43 c "SR Lower ceiling to floor"  :tag
line  44 c "W1 Lower ceiling to floor + 8"  :tag
line  40 c "W1 Raise ceiling to HEC, floor to LEF"  :tag
line  72 c "WR Lower ceiling to floor + 8"  :tag

line   9 - "S1 Donut (lower outer, raise inner)"    :tag


#---- SECTOR TYPES -----------

sector  0 "NOTHING"

sector  1 "Light: Flickering"
sector  2 "Light: Fast Strobe"
sector  3 "Light: Slow Strobe"
sector  8 "Light: Glowing"
sector 12 "Light: Synch (Slow)"
sector 13 "Light: Synch (Fast)"

sector  6 "Ceiling Crush & Raise"
sector 14 "Door: Raise in 5 min"
sector 10 "Door: Close in 30 sec"
sector 15 "Low Friction"
sector  9 "Secret Area"

sector  7 "Damage: Sludge"
sector  4 "Damage: Lava Flow"
sector  5 "Damage: Lava (Light)"
sector 16 "Damage: Lava (Heavy)"

sector 21 "Scroll: East (slow)"
sector 22 "Scroll: East (normal)"
sector 23 "Scroll: East (fast)"
sector 26 "Scroll: North (slow)"
sector 27 "Scroll: North (normal)"
sector 28 "Scroll: North (fast)"
sector 31 "Scroll: South (slow)"
sector 32 "Scroll: South (normal)"
sector 33 "Scroll: South (fast)"
sector 36 "Scroll: West (slow)"
sector 37 "Scroll: West (normal)"
sector 38 "Scroll: West (fast)"

sector 40 "Wind: East (weak)"
sector 41 "Wind: East (normal)"
sector 42 "Wind: East (strong)"
sector 43 "Wind: North (weak)"
sector 44 "Wind: North (normal)"
sector 45 "Wind: North (strong)"
sector 46 "Wind: South (weak)"
sector 47 "Wind: South (normal)"
sector 48 "Wind: South (strong)"
sector 49 "Wind: West (weak)"
sector 50 "Wind: West (normal)"
sector 51 "Wind: West (strong)"


#---- TEXTURE CATEGORIES -----------

texturegroup c "Castle"
texturegroup d "Door && Metal"
texturegroup g "Grating"
texturegroup l "Liquid"
texturegroup m "Magic"
texturegroup v "Village"
texturegroup - "OTHER"

texture c BANNER1
texture c BANNER2
texture c BANNER3
texture c BANNER4
texture c BANNER5
texture c BANNER6
texture c BANNER7
texture c BANNER8

texture c CHAINSD
texture c CSTLMOSS
texture c CSTLRCK
texture c GRNBLOK1
texture c GRNBLOK2
texture c GRNBLOK3
texture c GRNBLOK4
texture c GRSTNPB
texture c GRSTNPBV
texture c GRSTNPBW

texture c LOOSERCK
texture c MOSSRCK1
texture c ORNGRAY
texture c REDWALL
texture c SANDSQ2
texture c SNDBLCKS
texture c SNDCHNKS
texture c SNDPLAIN
texture c SPINE1
texture c SPINE2
texture c SQPEB1
texture c SQPEB2
texture c TRISTON1
texture c TRISTON2
texture c WOODWL

texture d CHAINMAN
texture d DMNMSK
texture d DOORWOOD
texture d DOOREXIT
texture d DOORSTON
texture d GRSKULL1
texture d GRSKULL2
texture d GRSKULL3
texture d HORSES1
texture d SKULLSB1
texture d SKULLSB2

texture d SAINT1
texture d METL1
texture d METL2
texture d SW1OFF
texture d SW1ON
texture d SW2OFF
texture d SW2ON

texture g GATMETL
texture g GATMETL2
texture g GATMETL3
texture g GATMETL4
texture g GATMETL5
texture g WDGAT64
texture g WEB1_B
texture g WEB1_F
texture g WEB2_B
texture g WEB2_F
texture g WEB3_M
texture g STNGLS1
texture g STNGLS2
texture g STNGLS3

texture l LAVA1
texture l LAVAFL1
texture l LAVAFL2
texture l LAVAFL3
texture l WATRWAL1
texture l WATRWAL2
texture l WATRWAL3

texture v BRWNRCKS
texture v CELTIC
texture v CTYSTCI1
texture v CTYSTCI2
texture v CTYSTCI4
texture v CTYSTUC1
texture v CTYSTUC2
texture v CTYSTUC3
texture v CTYSTUC4
texture v CTYSTUC5

texture v DRIPWALL
texture v RCKSNMUD
texture v ROOTWALL
texture v TMBSTON1
texture v TMBSTON2

texture v BLUEFRAG
texture v MOSAIC1
texture v MOSAIC2
texture v MOSAIC3
texture v MOSAIC4
texture v MOSAIC5

texture - OLDSKY2
texture - OLDSKY3
texture - SKY1
texture - SKY2
texture - SKY3
texture - SKY5

flat c FLAT500
flat c FLAT503
flat c FLAT504
flat c FLAT520
flat c FLAT521
flat c FLAT522
flat c FLAT523
flat c FLOOR00
flat c FLOOR01
flat c FLOOR03
flat c FLOOR06
flat c FLOOR07
flat c FLOOR09
flat c FLOOR18
flat c FLOOR19
flat c FLOOR20

flat l FLATHUH1
flat l FLATHUH2
flat l FLATHUH3
flat l FLATHUH4
flat l FLTFLWW1
flat l FLTFLWW2
flat l FLTFLWW3
flat l FLTLAVA1
flat l FLTLAVA2
flat l FLTLAVA3
flat l FLTLAVA4
flat l FLTSLUD1
flat l FLTSLUD2
flat l FLTSLUD3
flat l FLTWAWA1
flat l FLTWAWA2
flat l FLTWAWA3
flat l FLAT517

flat v FLAT502
flat v FLAT506
flat v FLAT507
flat v FLAT508
flat v FLAT509
flat v FLAT510
flat v FLAT512
flat v FLAT513
flat v FLAT516

flat v FLOOR04
flat v FLOOR05
flat v FLOOR10
flat v FLOOR11
flat v FLOOR12
flat v FLOOR16
flat v FLOOR17
flat v FLOOR25
flat v FLOOR27

flat m FLTTELE1
flat m FLTTELE2
flat m FLTTELE3
flat m FLTTELE4

flat - F_SKY1

flat - FLOOR08
flat - FLOOR21
flat - FLOOR22
flat - FLOOR23
flat - FLOOR24
flat - FLOOR26
flat - FLOOR28
flat - FLOOR29
flat - FLOOR30

