#------------------------------------------------------------------------
#  ZDOOM Source Port
#------------------------------------------------------------------------
#
#  Eureka DOOM Editor
#
#  Copyright (C) 2015-2019 Andrew Apted
#
#  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.
#
#------------------------------------------------------------------------
#
#  The action specials here were adapted (and condensed) from the
#  ZDoom config of SLADE, a map and resource editor by Simon Judd.
#
#------------------------------------------------------------------------

# Pull in the Boom/MBF definitions, but only when Hexen-style
# specials are not being used.

if $MAP_FORMAT not DOOM
  set $ALLOW_BOOM 0
  set $HEXEN_SPECIALS 1
endif

if $ALLOW_BOOM is 1
  include "mbf"
  feature friend_flag 0
endif


map_formats DOOM HEXEN UDMF

supported_games doom doom2 heretic hexen strife

udmf_namespace ZDoom

feature tx_start 1
feature medusa_fixed 1
feature tuttifrutti_fixed 1
feature lax_sprites 1
feature mix_textures_flats 1
feature neg_patch_offsets 1
feature extra_floors 7
feature slopes 28


#---- ZDOOM THINGS ------------

thing 4001 p - 16 PLAYA1 "Player 5 start"
thing 4002 p - 16 PLAYA1 "Player 6 start"
thing 4003 p - 16 PLAYA1 "Player 7 start"
thing 4004 p - 16 PLAYA1 "Player 8 start"

thing 1400 - nv 16 NULL "Sound Sequence 0"
thing 1401 - nv 16 NULL "Sound Sequence 1"
thing 1402 - nv 16 NULL "Sound Sequence 2"
thing 1403 - nv 16 NULL "Sound Sequence 3"
thing 1404 - nv 16 NULL "Sound Sequence 4"
thing 1405 - nv 16 NULL "Sound Sequence 5"
thing 1406 - nv 16 NULL "Sound Sequence 6"
thing 1407 - nv 16 NULL "Sound Sequence 7"
thing 1408 - nv 16 NULL "Sound Sequence 8"
thing 1409 - nv 16 NULL "Sound Sequence 9"
thing 1411 - nv 16 NULL "Sound Sequence arg"

thing 9300 - n  16 NULL "ZD: PolyObj Anchor"
thing 9301 - npv  16 NULL "ZD: PolyObject"
thing 9302 - npv  16 NULL "ZD: PolyObject /crush"
thing 9303 - npv  16 NULL "ZD: PolyObject /burn"

thing 1500 - n  16 NULL "ZD: Floor slope"
thing 1501 - n  16 NULL "ZD: Ceil slope"
thing 1504 - n  16 NULL "ZD: Floor vertex z"
thing 1505 - n  16 NULL "ZD: Ceil vertex z"
thing 9500 - n  16 NULL "ZD: Floor line"
thing 9501 - nc 16 NULL "ZD: Ceiling line"
thing 9502 - n  16 NULL "ZD: Floor tilt"
thing 9503 - nc 16 NULL "ZD: Ceiling tilt"
thing 9510 - n  16 NULL "ZD: Copy floor slope"
thing 9511 - nc 16 NULL "ZD: Copy ceiling slope"

thing 9027 - n  16 NULL "ZD: Red Fountain"
thing 9028 - n  16 NULL "ZD: Green Fountain"
thing 9029 - n  16 NULL "ZD: Blue Fountain"
thing 9030 - n  16 NULL "ZD: Yellow Fountain"
thing 9031 - n  16 NULL "ZD: Purple Fountain"
thing 9032 - n  16 NULL "ZD: Black Fountain"
thing 9033 - n  16 NULL "ZD: White Fountain"

thing 5004 - n  16 _MSP "ZD: FS_Mapspot"
thing 5006 - n  16 NULL "ZD: SkyCamCompat"
thing 5061 - n  16 NULL "ZD: InvisibleBridge /32"
thing 5064 - n  16 NULL "ZD: InvisibleBridge /16"
thing 5065 - n  16 NULL "ZD: InvisibleBridge /8"
thing 9990 - n  16 NULL "ZD: InvisibleBridge"
thing 9991 - n  16 NULL "ZD: CustomBridge"

thing 9001 - n  16 _MSP "ZD: MapSpot"
thing 9013 - n  16 _MSP "ZD: MapSpot /gravity"
thing 9024 - n  16 _MSP "ZD: PatrolPoint"
thing 9025 - n  16 NULL "ZD: SecurityCamera"
thing 9026 - n  16 NULL "ZD: Spark"

thing 9037 - n  16 NULL "ZD: BetaSkull"
thing 9038 - n  16 NULL "ZD: ColorSetter"
thing 9039 - n  16 NULL "ZD: FadeSetter"
thing 9040 - n  16 NULL "ZD: MapMarker"
thing 9041 - n  16 NULL "ZD: SectorFlagSetter"
thing 9043 - n  16 NULL "ZD: TeleportDest3"
thing 9044 - n  16 NULL "ZD: TeleportDest2"
thing 9045 - n  16 NULL "ZD: WaterZone"
thing 9046 - n  16 NULL "ZD: SecretTrigger"
thing 9047 - n  16 NULL "ZD: PatrolSpecial"
thing 9048 - n  16 NULL "ZD: SoundEnvironment"
thing 9070 - n  16 NULL "ZD: InterpolationPoint"
thing 9071 - n  16 NULL "ZD: PathFollower"
thing 9072 - n  16 NULL "ZD: MovingCamera"
thing 9073 - n  16 NULL "ZD: AimingCamera"
thing 9074 - n  16 NULL "ZD: ActorMover"
thing 9075 - n  16 NULL "ZD: InterpolationSpecial"
thing 9076 - n  16 NULL "ZD: HateTarget"
thing 9077 - n  16 NULL "ZD: UpperStackLookOnly"
thing 9078 - n  16 NULL "ZD: LowerStackLookOnly"
thing 9080 - n  16 NULL "ZD: SkyViewpoint"
thing 9081 - n  16 NULL "ZD: SkyPicker"
thing 9082 - n  16 NULL "ZD: SectorSilencer"
thing 9083 - n  16 NULL "ZD: SkyCamCompat"
thing 9200 - n  16 NULL "ZD: Decal"
thing 9988 - n  16 NULL "ZD: CustomSprite"

thing 9982 - n  16 NULL "ZD: SecActEyesAboveC"
thing 9983 - n  16 NULL "ZD: SecActEyesBelowC"
thing 9989 - n  16 NULL "ZD: SecActHitFakeFloor"
thing 9992 - n  16 NULL "ZD: SecActEyesSurface"
thing 9993 - n  16 NULL "ZD: SecActEyesDive"
thing 9994 - n  16 NULL "ZD: SecActUseWall"
thing 9995 - n  16 NULL "ZD: SecActUse"
thing 9996 - n  16 NULL "ZD: SecActHitCeil"
thing 9997 - n  16 NULL "ZD: SecActExit"
thing 9998 - n  16 NULL "ZD: SecActEnter"
thing 9999 - n  16 NULL "ZD: SecActHitFloor"

# GZDoom dynamic lights
thing 9800 - ln  16 _LYT "ZD: PointLight"
thing 9810 - ln  16 _LYT "ZD: PointLight /add"
thing 9820 - ln  16 _LYT "ZD: PointLight /sub"
thing 9802 - ln  16 _LYT "ZD: PointLight /flick"
thing 9812 - ln  16 _LYT "ZD: PointLight /flick /add"
thing 9804 - ln  16 _LYT "ZD: PointLight /flick /rand"
thing 9814 - ln  16 _LYT "ZD: PointLight /flick /rand /add"
thing 9824 - ln  16 _LYT "ZD: PointLight /flick /rand /sub"
thing 9822 - ln  16 _LYT "ZD: PointLight /flick /sub"
thing 9801 - ln  16 _LYT "ZD: PointLight /pulse"
thing 9811 - ln  16 _LYT "ZD: PointLight /pulse /add"
thing 9821 - ln  16 _LYT "ZD: PointLight /pulse /sub"
thing 9803 - ln  16 _LYT "ZD: PointLight /sec"
thing 9813 - ln  16 _LYT "ZD: PointLight /sec /add"
thing 9823 - ln  16 _LYT "ZD: PointLight /sec /sub"

#
#---- HEXEN STYLE SPECIALS --------------
#

if $HEXEN_SPECIALS is 1

clear lines sectors

feature tag_666 0
feature strife_flags 0
feature gen_lines 0
feature gen_sectors zdoom

include "hexen_groups"
include "hexen_sectors"

special 0 - "NOTHING"

# Floors
special  22 f "Floor_LowerToNearest"       :tag  speed
special  21 f "Floor_LowerToLowest"        :tag  speed
special 241 f "Floor_LowerToLowestTxTy"    :tag  speed
special 242 f "Floor_LowerToHighest"       :tag  speed  lip  adjust?
special  20 f "Floor_LowerByValue"         :tag  speed  dist
special  36 f "Floor_LowerByValueTimes8"   :tag  speed  dist_x8
special  66 f "Floor_LowerInstant"         :tag  -  dist_x8
special  25 f "Floor_RaiseToNearest"       :tag  speed
special  24 f "Floor_RaiseToHighest"       :tag  speed
special 238 f "Floor_RaiseToLowestCeiling" :tag  speed
special  23 f "Floor_RaiseByValue"         :tag  speed  dist
special  35 f "Floor_RaiseByValueTimes8"   :tag  speed  dist_x8
special 239 f "Floor_RaiseByValueTxTy"     :tag  speed  dist
special 240 f "Floor_RaiseByTexture"       :tag  speed
special  67 f "Floor_RaiseInstant"         :tag  -  dist_x8
special  28 f "Floor_RaiseAndCrush"        :tag  speed  damage  crush_mode
special  99 f "Floor_RaiseAndCrushDoom"    :tag  speed  damage  crush_mode
special  46 f "Floor_CrushStop"            :tag
special  37 f "Floor_MoveToValue"          :tag  speed  dist  negate?
special  68 f "Floor_MoveToValueTimes8"    :tag  speed  dist_x8  negate?
special 250 f "Floor_Donut"                :tag  speed  speed
special 138 f "Floor_Waggle"               :tag  amp  speed  offset  time
special 235 f "Floor_TransferTrigger"      :tag
special 236 f "Floor_TransferNumeric"      :tag

# Ceilings
special 169 c "Generic_Crusher2"             :tag  down_speed  up_speed  silent?   damage
special 253 c "Ceiling_LowerToLowest"        :tag  speed
special 254 c "Ceiling_LowerToFloor"         :tag  speed
special 192 c "Ceiling_LowerToHighestFloor"  :tag  speed
special  40 c "Ceiling_LowerByValue"         :tag  speed  dist
special 199 c "Ceiling_LowerByValueTimes8"   :tag  speed  dist_x8
special 193 c "Ceiling_LowerInstant"         :tag  -  dist_x8
special 252 c "Ceiling_RaiseToNearest"       :tag  speed
special  41 c "Ceiling_RaiseByValue"         :tag  speed  dist
special 198 c "Ceiling_RaiseByValueTimes8"   :tag  speed  dist_x8
special 194 c "Ceiling_RaiseInstant"         :tag  -  dist_x8
special  47 c "Ceiling_MoveToValue"          :tag  speed  dist  negate?
special  69 c "Ceiling_MoveToValueTimes8"    :tag  speed  dist_x8  negate?
special  38 c "Ceiling_Waggle"               :tag  amp  speed  offset  time
special  43 c "Ceiling_LowerAndCrush"        :tag  speed  damage  crush_mode
special  97 c "Ceiling_LowerAndCrushDist"    :tag  speed  damage  height  crush_mode
special  42 c "Ceiling_CrushAndRaise"        :tag  speed  damage  crush_mode
special 196 c "Ceiling_CrushAndRaiseA"       :tag  down_speed  up_speed  damage  crush_mode
special 197 c "Ceiling_CrushAndRaiseSilentA" :tag  down_speed  up_speed  damage  crush_mode
special 168 c "Ceiling_CrushAndRaiseDist"    :tag  height  speed  damage  crush_mode
special 104 c "Ceiling_CrushAndRaiseSilentDist" :tag  height  speed  damage  crush_mode
special  45 c "Ceiling_CrushRaiseAndStay"    :tag  speed  damage  crush_mode
special 195 c "Ceiling_CrushRaiseAndStayA"   :tag  speed  speed  damage  crush_mode
special 255 c "Ceiling_CrushRaiseAndStaySilA"  :tag  speed  speed  damage  crush_mode
special  44 c "Ceiling_CrushStop"            :tag

# Doors
special  12 d "Door_Raise"            :tag  speed  delay  light_tag:tag
special  13 d "Door_LockedRaise"      :tag  speed  delay  lock  light_tag:tag
special  11 d "Door_Open"             :tag  speed  light_tag:tag
special  10 d "Door_Close"            :tag  speed  light_tag:tag
special 105 d "Door_WaitRaise"        :tag  speed  delay  wait  light_tag:tag
special 106 d "Door_WaitClose"        :tag  speed  delay  wait  light_tag:tag
special 249 d "Door_CloseWaitOpen"    :tag  speed  delay  light_tag:tag
special  14 d "Door_Animated"         :tag  speed  delay  lock

# Lifts
special  62 g "Plat_DownWaitUpStay"          :tag  speed  delay
special 206 g "Plat_DownWaitUpStayLip"       :tag  speed  delay  lip  sound_type
special  63 g "Plat_DownByValue"             :tag  speed  delay  dist_x8
special  64 g "Plat_UpWaitDownStay"          :tag  speed  delay
special 172 g "Plat_UpNearestWaitDownStay"   :tag  speed  delay
special  65 g "Plat_UpByValue"               :tag  speed  delay  dist_x8
special 230 g "Plat_UpByValueStayTx"         :tag  speed  dist_x8
special 228 g "Plat_RaiseAndStayTx0"         :tag  speed  lockout
special  60 g "Plat_PerpetualRaise"          :tag  speed  delay
special 207 g "Plat_PerpetualRaiseLip"       :tag  speed  delay  lip
special 231 g "Plat_ToggleCeiling"           :tag
special  61 g "Plat_Stop"                    :tag

# Elevators & Pillars
special  95 e "Elevator_Lower"             :tag  speed  dist
special  96 e "Elevator_Raise"             :tag  speed  dist
special 251 e "FloorAndCeiling_LowerRaise" :tag  floor_speed  ceil_speed
special 247 e "Elevator_LowerToNearest"    :tag  speed
special 245 e "Elevator_RaiseToNearest"    :tag  speed
special 246 e "Elevator_MoveToFloor"       :tag  speed
special  30 e "Pillar_Open"                :tag  speed  floor_dist  ceil_dist
special  29 e "Pillar_Build"               :tag  speed  dist
special  94 e "Pillar_BuildAndCrush"       :tag  speed  dist  damage  crush_mode

# Stairs
special  26 q "Stairs_BuildDown"           :tag  speed  height  delay  reset_delay
special  31 q "Stairs_BuildDownSync"       :tag  speed  height  reset_delay
special  27 q "Stairs_BuildUp"             :tag  speed  height  delay  reset_delay
special  32 q "Stairs_BuildUpSync"         :tag  speed  height  reset_delay
special 217 q "Stairs_BuildUpDoom"         :tag  speed  height  delay  reset_delay

# Sector
special 181 s "Plane_Align"                floor_side  ceil_side  line_id:self_line_id
special 118 s "Plane_Copy"                 front_floor_tag:tag  front_ceil_tag:tag  back_floor_tag:tag  back_ceil_tag:tag  share_flags
special 160 s "Sector_Set3DFloor"          :tag  type  flags  opacity  :tag_hi
special  51 s "Sector_SetLink"             control_tag:tag  :tag  ceiling?  move_flags
special 190 s "Static_Init"                :tag  property  ceil_flip?  move_flags
special  54 s "Sector_ChangeFlags"         :tag  set_flags  clear_flags
special 140 s "Sector_ChangeSound"         :tag  sound_seq
special 185 s "Sector_SetRotation"         :tag  floor_angle  ceil_angle
special 187 s "Sector_SetFloorPanning"     :tag  x_offset  y_offset  x_frac  y_frac
special 186 s "Sector_SetCeilingPanning"   :tag  x_offset  y_offset  x_frac  y_frac
special 189 s "Sector_SetFloorScale"       :tag  x_scale  x_frac  y_scale  y_frac
special 188 s "Sector_SetCeilingScale"     :tag  x_scale  x_frac  y_scale  y_frac
special 184 s "Line_AlignFloor"            :line_id  alignback?
special 183 s "Line_AlignCeiling"          :line_id  alignback?
special 212 s "Sector_SetColor"            :tag  red  green  blue  desat
special 213 s "Sector_SetFade"             :tag  red  green  blue
special 214 s "Sector_SetDamage"           :tag  damage  death_type
special 216 s "Sector_SetGravity"          :tag  grav_mul  grav_mul_frac
special 218 s "Sector_SetWind"             :tag  strength  angle  use_line_angle?
special 219 s "Sector_SetFriction"         :tag  friction
special 220 s "Sector_SetCurrent"          :tag  strength  angle  use_line_angle?
special 227 s "PointPush_SetForce"         :tag  :tid  strength  use_line_angle?

## andrewj: I have omitted special 161 "Sector_SetContents", since the
## ZDoom Wiki page for it says "this function is left undocumented at
## Graf Zahl's request" -- so it seems abandoned or deprecated.

# Lighting
special 233 l "Light_MinNeighbor"      :tag
special 111 l "Light_LowerByValue"     :tag  light
special 234 l "Light_MaxNeighbor"      :tag
special 110 l "Light_RaiseByValue"     :tag  light
special 112 l "Light_ChangeToValue"    :tag  light
special 113 l "Light_Fade"             :tag  light  time
special 114 l "Light_Glow"             :tag  high  low  time
special 115 l "Light_Flicker"          :tag  high  low
special 116 l "Light_Strobe"           :tag  high  low  high_time  low_time
special 232 l "Light_StrobeDoom"       :tag  high_time  low_time
special 117 l "Light_Stop"             :tag

special 109 l "Force_Lightning"        mode

# Teleporters
special  70 u "Teleport"               :tid  :tag  no_fog?
special  71 u "Teleport_NoFog"         :tid  set_angle?  :tag
special  76 u "TeleportOther"          :tid  :tid  fog?
special  77 u "TeleportGroup"          group_tid:tid  source_tid:tid  dest_tid:tid  move_source?   fog?
special  78 u "TeleportInSector"       :tag  source_tid:tid  dest_tid:tid  fog?  group_tid:tid
special 154 u "Teleport_NoStop"        dest_tid:tid  :tag  no_fog?
special 215 u "Teleport_Line"          source_line_id:self_line_id  dest_line_id:line_id  flip_180?
special  39 u "Teleport_ZombieChanger" :tid  :tag

# Things
special 130 t "Thing_Activate"         :tid
special 131 t "Thing_Deactivate"       :tid
special  17 t "Thing_Raise"            :tid
special 135 t "Thing_Spawn"            :tid  type_id  angle  new_id
special 137 t "Thing_SpawnNoFog"       :tid  type_id  angle  new_id
special 139 t "Thing_SpawnFacing"      :tid  type_id  no_fog?  new_id
special 134 t "Thing_Projectile"       :tid  type_id  angle  speed  up_speed
special 136 t "Thing_ProjectileGravity" :tid  type_id  angle  speed  up_speed
special 178 t "Thing_ProjectileAimed"  :tid  type_id  speed  target_tid:tid  new_tid
special 175 t "Thing_ProjectileIntercept" :tid  type_id  speed  target_tid:tid  new_tid

special 248 t "HealThing"              :tid  health
special  73 t "DamageThing"             damage  death_type
special 119 t "Thing_Damage"           :tid  damage  death_type
special 133 t "Thing_Destroy"          :tid  extreme_damage? :tag
special 132 t "Thing_Remove"           :tid
special 125 t "Thing_Move"             :tid  dest_tid:tid  no_fog?
special  72 t "ThrustThing"             angle  thrust  unlimited? :tid
special 128 t "ThrustThingZ"           :tid  thrust  down?  additive?
special  19 t "Thing_Stop"             :tid
special  79 t "Thing_SetConversation"  :tid  conversation_id
special 127 t "Thing_SetSpecial"       :tid  special  arg1  arg2  arg3
special 176 t "Thing_ChangeTID"        :tid  new_tid
special 177 t "Thing_Hate"             :tid  target_tid:tid  hate_type
special 180 t "Thing_SetTranslation"   :tid  translation
special 229 t "Thing_SetGoal"          :tid  goal_tid  delay  no_stray?

# Lines
special 121 - "Line_SetIdent"           line_id:self_line_id  flags  -  - line_id_hi:self_line_id_hi
special  55 - "Line_SetBlocking"       :line_id  set_flags  clear_flags
special 156 - "Line_SetPortal"          target_id:line_id  this_id:self_line_id  type  anchor
special 107 - "Line_SetPortalTarget"    source_id:line_id  target_id:line_id
special  33 - "ForceField"
special  34 - "ClearForceField"        :tag
special  48 - "Attach3dMidtex"         :line_id :tag  ceiling?
special  49 - "GlassBreak"              no_shards?

# Animated
special 102 a "Scroll_Texture_Up"       speed  tex_flags
special 103 a "Scroll_Texture_Down"     speed  tex_flags
special 100 a "Scroll_Texture_Left"     speed  tex_flags
special 101 a "Scroll_Texture_Right"    speed  tex_flags
special 221 a "Scroll_Texture_Both"    :line_id  left_speed  right_speed  down_speed  up_speed
special  52 a "Scroll_Wall"            :line_id  x_speed  y_speed  back?  tex_flags
special 225 a "Scroll_Texture_Offsets"  tex_flags
special 222 a "Scroll_Texture_Model"   :line_id  flags
special 223 a "Scroll_Floor"           :tag  tex_flags  push?  x_speed  y_speed
special 224 a "Scroll_Ceiling"         :tag  tex_flags  -  x_speed  y_speed
special  58 a "Sector_CopyScroller"    :tag  flags

# PolyObjects
special   1 p "PolyObject Start Line"  :po  mirror_po:po  sound_seq
special   5 p "Polyobj_ExplicitLine"   :po  render_order  mirror_po:po  sound_seq line_id:self_line_id
special   2 p "Polyobj_RotateLeft"     :po  speed  angle
special  90 p "Polyobj_OR_RotateLeft"  :po  speed  angle
special   3 p "Polyobj_RotateRight"    :po  speed  angle
special  91 p "Polyobj_OR_RotateRight" :po  speed  angle
special   4 p "Polyobj_Move"           :po  speed  angle  dist
special  92 p "Polyobj_OR_Move"        :po  speed  angle  dist
special   6 p "Polyobj_MoveTimes8"     :po  speed  angle  dist_x8
special  93 p "Polyobj_OR_MoveTimes8"  :po  speed  angle  dist_x8
special   7 p "Polyobj_DoorSwing"      :po  speed  angle  delay
special   8 p "Polyobj_DoorSlide"      :po  speed  angle  dist  delay
special  86 p "Polyobj_MoveToSpot"     :po  speed :tid
special  59 p "Polyobj_OR_MoveToSpot"  :po  speed :tid
special  87 p "Polyobj_Stop"           :po

## andrewj: leaving out specials 88/89 "Polyobj_MoveTo" because they
## seem designed for scripts -- when used in a map the target X/Y
## coordinates will be limited to the range 0-255.

# Exits
special 243 x "Exit_Normal"             pos_arg0
special 244 x "Exit_Secret"             pos_arg0
special  74 x "Exit_ToMap"              map  pos_arg0  keep_angle?
special  75 x "End_Game"

# Renderer
special   9 r "Line_Horizon"
special 182 r "Line_Mirror"
special  16 r "Transfer_WallLight"     :line_id  flags
special 210 r "Transfer_FloorLight"    :tag
special 211 r "Transfer_CeilingLight"  :tag
special  50 r "ExtraFloor_LightOnly"   :tag  light_type
special  57 r "Sector_SetPortal"       :tag  portal_type  plane  misc  opacity
special  98 r "Sector_SetTranslucent"  :tag  ceiling?  opacity
special 157 r "SetGlobalFogParameter (OpenGL)"       property  value
special 159 r "Sector_SetPlaneReflection (OpenGL)"  :tag  floor  ceiling
special 208 r "TranslucentLine"        :line_id  opacity  additive?  extra_flags
special 209 r "Transfer_Heights"       :tag  flags

# Scripting
special  80 k "ACS_Execute"             script  map  param1  param2  param3
special  83 k "ACS_LockedExecute"       script  map  param1  param2  lock
special  85 k "ACS_LockedExecuteDoor"   script  map  param1  param2  lock
special  84 k "ACS_ExecuteWithResult"   script  param1  param2  param3
special 226 k "ACS_ExecuteAlways"       script  map  param1  param2  param3
special  81 k "ACS_Suspend"             script  map
special  82 k "ACS_Terminate"           script  map
special 158 k "FraggleScript"           script  front_only?  lock  remote_msg?

# Boom Compatibility
special 200 f "Generic_Floor"          :tag  speed  dist  target_type  flags
special 201 c "Generic_Ceiling"        :tag  speed  dist  target_type  flags
special 202 d "Generic_Door"           :tag  speed  door_kind  delay  lock
special 203 g "Generic_Lift"           :tag  speed  delay_octics  lift_type  type0_height
special 204 q "Generic_Stairs"         :tag  speed  height  flags  reset_delay
special 205 c "Generic_Crusher"        :tag  down_speed  up_speed  silent?   damage

# Miscellaneous
special 191 - "SetPlayerProperty"       all_players?  turn_on?  property
special 237 - "ChangeCamera"           :tid  all_players?  move_cancels?
special  15 - "Autosave"
special 179 - "ChangeSkill"             skill
special  18 - "StartConversation"      :tid  face_talker?
special 120 - "Earthquake"              intensity  duration  damrad  tremrad :tid
special 129 - "UsePuzzleItem"           item  script  param1  param2  param3
special 173 - "NoiseAlert"              target_tid:tid  emitter_tid:tid
special 174 - "SendToCommunicator"      voc_id  front_only?  show_sender?  no_log?

# ZDoom sector specials

sector 65 "ZD: Light Flicker"
sector 66 "ZD: Light Strobe /fast"
sector 67 "ZD: Light Strobe /slow"
sector 68 "ZD: Light Strobe_/hurt"
sector 72 "ZD: Light Glow"
sector 76 "ZD: Light Strobe /slow /sync"
sector 77 "ZD: Light Strobe /fast /sync"
sector 81 "ZD: Light FireFlicker"

sector 69 "ZD: Damage Hellslime"
sector 80 "ZD: Damage Super Hellslime"
sector 71 "ZD: Damage Nukage"
sector 75 "ZD: Damage End"
sector 82 "ZD: Damage Lava (Wimpy)"
sector 83 "ZD: Damage Lava (Hefty)"
sector 85 "ZD: Damage Sludge"

sector 74 "ZD: Close after 30 sec"
sector 78 "ZD: Open after 5 min"
sector 84 "ZD: Scroll_E /damage"
sector 87 "ZD: Outside"

sector 195 "ZD: Hidden"
sector 196 "ZD: Healing"
sector 200 "ZD: Sky2"

else

#
#---- DOOM STYLE SPECIALS ----------
#

# most specials come from the game definition.
# additional specials come from the MBF port.

# Scripting
line 273 n "WR FraggleScript Exec"
line 274 n "W1 FraggleScript Exec"
line 275 n "W1 FraggleScript Exec /front"
line 276 n "SR FraggleScript Exec"
line 277 n "S1 FraggleScript Exec"
line 278 n "GR FraggleScript Exec"
line 279 n "G1 FraggleScript Exec"

# Renderer
line 336 r "-- ZD: Line Mirror"
line 337 r "-- ZD: Line Horizon"

line 280 r "-- ZD: Transfer Heights /swim" :tag
line 350 r "-- ZD: Transfer_Heights"       :tag
line 351 r "-- ZD: Transfer_Heights /clip" :tag

line 284 r "-- LEG: Translucent 50%"            :line_id
line 285 r "-- LEG: Translucent 75%"            :line_id
line 286 r "-- LEG: Translucent 25%"            :line_id
line 287 r "-- LEG: Translucent 50% /additive"  :line_id
line 288 r "-- LEG: Translucent FX1"            :line_id

line 409 r "-- EDGE: Translucent 80%"           :line_id
line 410 r "-- EDGE: Translucent 60%"           :line_id
line 411 r "-- EDGE: Translucent 40%"           :line_id
line 412 r "-- EDGE: Translucent 20%"           :line_id

# Animated
line 338 a "W1 ZD: Floor_Waggle /24"    :tag
line 339 a "W1 ZD: Floor_Waggle /12"    :tag

line 352 a "-- ZD: Copy scroller /ceil"     :tag
line 353 a "-- ZD: Copy scroller /floor"    :tag
line 354 a "-- ZD: Copy scroller /carry"    :tag

line 422 a "-- EDGE: Scroll right"
line 423 a "-- EDGE: Scroll up"
line 424 a "-- EDGE: Scroll down"
line 425 a "-- EDGE: Scroll left/up"
line 426 a "-- EDGE: Scroll left/down"
line 427 a "-- EDGE: Scroll right/up"
line 428 a "-- EDGE: Scroll right/down"

# 3D Floors
line 281 y "-- LEG: 3D Floor"               :tag
line 289 y "-- LEG: 3D Floor /unlit"        :tag
line 300 y "-- LEG: 3D Floor 50%"           :tag
line 301 y "-- LEG: 3D Floor 50% /swim"     :tag
line 302 y "-- LEG: 3D Floor 50% /fog"      :tag
line 303 y "-- LEG: 3D Floor /invis"        :tag
line 304 y "-- LEG: 3D Floor /swim"         :tag
line 305 y "-- LEG: 3D Floor /invis"        :tag
line 306 y "-- LEG: 3D Floor /solid /invis" :tag

line 400 y "-- EDGE: 3D Floor"              :tag
line 401 y "-- EDGE: 3D Floor /upper"       :tag
line 402 y "-- EDGE: 3D Floor /lower"       :tag

line 403 y "-- EDGE: Liquid"        :tag
line 404 y "-- EDGE: Liquid 80%"    :tag
line 405 y "-- EDGE: Liquid 60%"    :tag
line 406 y "-- EDGE: Liquid 40%"    :tag
line 407 y "-- EDGE: Liquid 20%"    :tag
line 408 y "-- EDGE: Liquid  0%"    :tag

line 413 y "-- EDGE: Thin 3D floor"     :tag
line 414 y "-- EDGE: Thin 3D floor 80%" :tag
line 415 y "-- EDGE: Thin 3D floor 60%" :tag
line 416 y "-- EDGE: Thin 3D floor 40%" :tag
line 417 y "-- EDGE: Thin 3D floor 20%" :tag

# Sector Effects
line 282 - "-- ZD: Set Light & Fog /rgb"    :tag
line 334 - "-- ZD: Set Light & Fog /rgb"    :tag
line 333 - "-- ZD: Set Gravity /length"     :tag
line 335 - "-- ZD: Set Damage /length"      :tag

# Slopes
line 340 s "-- ZD: Slope front floor"
line 341 s "-- ZD: Slope front ceiling"
line 342 s "-- ZD: Slope front floor and ceiling"
line 343 s "-- ZD: Slope back floor"
line 344 s "-- ZD: Slope back ceiling"
line 345 s "-- ZD: Slope back floor and ceiling"
line 346 s "-- ZD: Slope back floor and front ceiling"
line 347 s "-- ZD: Slope front floor and back ceiling"

# Other
line 348 - "W1 ZD: Autosave"
line 349 - "S1 ZD: Autosave"

## andrewj: omitted the EDGE "Floor up 2" (types 434-439), as they
## have no practical use outside of EDGE's RTS scripting.

# ZDoom DOOM sector specials

if $BASE_GAME is Doom Doom2
  sector 15 "ZD: Friction Low"
  sector 18 "ZD: Damage Lava (light)"
  sector 19 "ZD: Damage Lava (heavy)"
  sector 20 "ZD: Scroll East"

  sector 21 "ZD: Light Phased"
  sector 22 "ZD: Light Seq Start"
  sector 23 "ZD: Light Seq Next 1"
  sector 24 "ZD: Light Seq Next 2"
endif

endif
