diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index 3d42059ca2..317694e206 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -1748,7 +1748,8 @@ PClassPointer::PClassPointer() PClassPointer::PClassPointer(PClass *restrict) : PPointer(RUNTIME_CLASS(PClass)), ClassRestriction(restrict) { - mDescriptiveName.Format("ClassPointer<%s>", restrict->TypeName.GetChars()); + if (restrict) mDescriptiveName.Format("ClassPointer<%s>", restrict->TypeName.GetChars()); + else mDescriptiveName = "ClassPointer"; } //========================================================================== diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index 9b8a87eedb..d7a3a56b0d 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -1123,6 +1123,18 @@ FxExpression *FxTypeCast::Resolve(FCompileContext &ctx) delete this; return x; } + else if (ValueType == TypeState) + { + // Right now this only supports string constants. There should be an option to pass a string variable, too. + if (basex->isConstant() && (basex->ValueType == TypeString || basex->ValueType == TypeName)) + { + FxExpression *x = new FxMultiNameState(static_cast(basex)->GetValue().GetString(), basex->ScriptPosition); + x = x->Resolve(ctx); + basex = nullptr; + delete this; + return x; + } + } else if (ValueType->IsKindOf(RUNTIME_CLASS(PClassPointer))) { FxExpression *x = new FxClassTypeCast(static_cast(ValueType), basex); @@ -4624,45 +4636,10 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx) { for (unsigned i = 0; i < ArgList->Size(); i++) { - if ((*ArgList)[i]->isConstant()) - { - if (i + implicit < argtypes.Size()) - { - auto type = static_cast((*ArgList)[i])->ValueType; - // temporary hack to add the casts which get used by the internal definitions - if (argtypes[i + implicit] == TypeState && type == TypeString) - { - ScriptPosition.Message(MSG_WARNING, "Converting %s to state", static_cast((*ArgList)[i])->GetValue().GetString()); - auto statenode = new FxMultiNameState(static_cast((*ArgList)[i])->GetValue().GetString(), ScriptPosition); - delete (*ArgList)[i]; - (*ArgList)[i] = statenode; - } - if (argtypes[i + implicit] == TypeSound && type == TypeString) - { - ScriptPosition.Message(MSG_WARNING, "Converting %s to sound", static_cast((*ArgList)[i])->GetValue().GetString()); - auto statenode = new FxConstant(FSoundID(static_cast((*ArgList)[i])->GetValue().GetString()), ScriptPosition); - delete (*ArgList)[i]; - (*ArgList)[i] = statenode; - } - if (argtypes[i + implicit] == TypeSInt32 && type == TypeFloat64) - { - ScriptPosition.Message(MSG_WARNING, "Converting %f to int", static_cast((*ArgList)[i])->GetValue().GetFloat()); - auto statenode = new FxConstant(static_cast((*ArgList)[i])->GetValue().GetInt(), ScriptPosition); - delete (*ArgList)[i]; - (*ArgList)[i] = statenode; - } - if (argtypes[i + implicit] == TypeFloat64 && type == TypeSInt32) - { - ScriptPosition.Message(MSG_WARNING, "Converting %d to float", static_cast((*ArgList)[i])->GetValue().GetInt()); - auto statenode = new FxConstant(static_cast((*ArgList)[i])->GetValue().GetFloat(), ScriptPosition); - delete (*ArgList)[i]; - (*ArgList)[i] = statenode; - } - } - } - - (*ArgList)[i] = (*ArgList)[i]->Resolve(ctx); - if ((*ArgList)[i] == NULL) failed = true; + FxExpression *x = new FxTypeCast((*ArgList)[i], argtypes[i + implicit], false); + x = x->Resolve(ctx); + failed |= (x == nullptr); + (*ArgList)[i] = x; } } if (failed) @@ -5592,7 +5569,7 @@ FxExpression *FxClassTypeCast::Resolve(FCompileContext &ctx) if (basex->ValueType != TypeName && basex->ValueType != TypeString) { - ScriptPosition.Message(MSG_ERROR, "Cannot convert to class type"); + ScriptPosition.Message(MSG_ERROR, "Cannot convert %s to class type", basex->ValueType->DescriptiveName()); delete this; return NULL; } @@ -5855,7 +5832,7 @@ FxMultiNameState::FxMultiNameState(const char *_statestring, const FScriptPositi } else { - scopename = NULL; + scopename = NAME_None; } names = MakeStateNameList(statestring); names.Insert(0, scopename); diff --git a/src/scripting/codegeneration/codegen.h b/src/scripting/codegeneration/codegen.h index 7d6465e75d..ce4f11bb13 100644 --- a/src/scripting/codegeneration/codegen.h +++ b/src/scripting/codegeneration/codegen.h @@ -174,6 +174,7 @@ struct ExpVal FName GetName() const { + if (Type == TypeString) return FName(*(FString *)&pointer); return Type == TypeName ? ENamedName(Int) : NAME_None; } }; @@ -338,8 +339,9 @@ public: FxConstant(PClass *val, const FScriptPosition &pos) : FxExpression(pos) { value.pointer = (void*)val; - ValueType = val; - value.Type = NewClassPointer(RUNTIME_CLASS(AActor)); + if (val != nullptr) ValueType = NewClassPointer(val); + else ValueType = NewClassPointer(RUNTIME_CLASS(DObject)); + value.Type = NewClassPointer(RUNTIME_CLASS(DObject)); isresolved = true; } diff --git a/wadsrc/static/actors/heretic/hereticammo.txt b/wadsrc/static/actors/heretic/hereticammo.txt deleted file mode 100644 index 35f404274e..0000000000 --- a/wadsrc/static/actors/heretic/hereticammo.txt +++ /dev/null @@ -1,204 +0,0 @@ - -// Wimpy ammo --------------------------------------------------------------- - -ACTOR GoldWandAmmo : Ammo -{ - Inventory.PickupMessage "$TXT_AMMOGOLDWAND1" - Inventory.Amount 10 - Inventory.MaxAmount 100 - Ammo.BackpackAmount 10 - Ammo.BackpackMaxAmount 200 - Inventory.Icon "INAMGLD" - States - { - Spawn: - AMG1 A -1 - Stop - } -} - -// Hefty ammo --------------------------------------------------------------- - -ACTOR GoldWandHefty : GoldWandAmmo -{ - Inventory.PickupMessage "$TXT_AMMOGOLDWAND2" - Inventory.Amount 50 - States - { - Spawn: - AMG2 ABC 4 - Loop - } -} -// Wimpy ammo --------------------------------------------------------------- - -ACTOR CrossbowAmmo : Ammo -{ - Inventory.PickupMessage "$TXT_AMMOCROSSBOW1" - Inventory.Amount 5 - Inventory.MaxAmount 50 - Ammo.BackpackAmount 5 - Ammo.BackpackMaxAmount 100 - Inventory.Icon "INAMBOW" - States - { - Spawn: - AMC1 A -1 - Stop - } -} - -// Hefty ammo --------------------------------------------------------------- - -ACTOR CrossbowHefty : CrossbowAmmo -{ - Inventory.PickupMessage "$TXT_AMMOCROSSBOW2" - Inventory.Amount 20 - States - { - Spawn: - AMC2 ABC 5 - Loop - } -} -// Wimpy ammo --------------------------------------------------------------- - -ACTOR MaceAmmo : Ammo -{ - Inventory.PickupMessage "$TXT_AMMOMACE1" - Inventory.Amount 20 - Inventory.MaxAmount 150 - Ammo.BackpackAmount 20 - Ammo.BackpackMaxAmount 300 - Inventory.Icon "INAMLOB" - States - { - Spawn: - AMM1 A -1 - Stop - } -} - -// Hefty ammo --------------------------------------------------------------- - -ACTOR MaceHefty : MaceAmmo -{ - Inventory.PickupMessage "$TXT_AMMOMACE2" - Inventory.Amount 100 - States - { - Spawn: - AMM2 A -1 - Stop - } -} - -// Wimpy ammo --------------------------------------------------------------- - -ACTOR BlasterAmmo : Ammo -{ - Inventory.PickupMessage "$TXT_AMMOBLASTER1" - Inventory.Amount 10 - Inventory.MaxAmount 200 - Ammo.BackpackAmount 10 - Ammo.BackpackMaxAmount 400 - Inventory.Icon "INAMBST" - States - { - Spawn: - AMB1 ABC 4 - Loop - } -} - -// Hefty ammo --------------------------------------------------------------- - -ACTOR BlasterHefty : BlasterAmmo -{ - Inventory.PickupMessage "$TXT_AMMOBLASTER2" - Inventory.Amount 25 - States - { - Spawn: - AMB2 ABC 4 - Loop - } -} - -// Wimpy ammo --------------------------------------------------------------- - -ACTOR SkullRodAmmo : Ammo -{ - Inventory.PickupMessage "$TXT_AMMOSKULLROD1" - Inventory.Amount 20 - Inventory.MaxAmount 200 - Ammo.BackpackAmount 20 - Ammo.BackpackMaxAmount 400 - Inventory.Icon "INAMRAM" - States - { - Spawn: - AMS1 AB 5 - Loop - } -} - -// Hefty ammo --------------------------------------------------------------- - -ACTOR SkullRodHefty : SkullRodAmmo -{ - Inventory.PickupMessage "$TXT_AMMOSKULLROD2" - Inventory.Amount 100 - States - { - Spawn: - AMS2 AB 5 - Loop - } -} - -// Wimpy ammo --------------------------------------------------------------- - -ACTOR PhoenixRodAmmo : Ammo -{ - Inventory.PickupMessage "$TXT_AMMOPHOENIXROD1" - Inventory.Amount 1 - Inventory.MaxAmount 20 - Ammo.BackpackAmount 1 - Ammo.BackpackMaxAmount 40 - Inventory.Icon "INAMPNX" - States - { - Spawn: - AMP1 ABC 4 - Loop - } -} -// Hefty ammo --------------------------------------------------------------- - -ACTOR PhoenixRodHefty : PhoenixRodAmmo -{ - Inventory.PickupMessage "$TXT_AMMOPHOENIXROD2" - Inventory.Amount 10 - States - { - Spawn: - AMP2 ABC 4 - Loop - } -} - -// --- Bag of holding ------------------------------------------------------- - -ACTOR BagOfHolding : BackpackItem -{ - Inventory.PickupMessage "$TXT_ITEMBAGOFHOLDING" - +COUNTITEM - +FLOATBOB - States - { - Spawn: - BAGH A -1 - Stop - } -} diff --git a/wadsrc/static/actors/heretic/hereticarmor.txt b/wadsrc/static/actors/heretic/hereticarmor.txt deleted file mode 100644 index 91684cc0e4..0000000000 --- a/wadsrc/static/actors/heretic/hereticarmor.txt +++ /dev/null @@ -1,35 +0,0 @@ - -// Silver Shield (Shield1) -------------------------------------------------- - -Actor SilverShield : BasicArmorPickup -{ - +FLOATBOB - Inventory.Pickupmessage "$TXT_ITEMSHIELD1" - Inventory.Icon "SHLDA0" - Armor.Savepercent 50 - Armor.Saveamount 100 - States - { - Spawn: - SHLD A -1 - stop - } -} - -// Enchanted shield (Shield2) ----------------------------------------------- - -Actor EnchantedShield : BasicArmorPickup -{ - +FLOATBOB - Inventory.Pickupmessage "$TXT_ITEMSHIELD2" - Inventory.Icon "SHD2A0" - Armor.Savepercent 75 - Armor.Saveamount 200 - States - { - Spawn: - SHD2 A -1 - stop - } -} - diff --git a/wadsrc/static/actors/heretic/hereticartifacts.txt b/wadsrc/static/actors/heretic/hereticartifacts.txt deleted file mode 100644 index 9555415fda..0000000000 --- a/wadsrc/static/actors/heretic/hereticartifacts.txt +++ /dev/null @@ -1,103 +0,0 @@ -// Super map ---------------------------------------------------------------- - -ACTOR SuperMap : MapRevealer -{ - +COUNTITEM - +INVENTORY.ALWAYSPICKUP - +FLOATBOB - Inventory.MaxAmount 0 - Inventory.PickupMessage "$TXT_ITEMSUPERMAP" - States - { - Spawn: - SPMP A -1 - Stop - } -} - - -// Invisibility ------------------------------------------------------------- - -ACTOR ArtiInvisibility : PowerupGiver -{ - +COUNTITEM - +FLOATBOB - +INVENTORY.PICKUPFLASH - RenderStyle Translucent - Alpha 0.4 - Inventory.RespawnTics 4230 - Inventory.Icon ARTIINVS - Powerup.Type Ghost - Inventory.PickupMessage "$TXT_ARTIINVISIBILITY" - Tag "$TAG_ARTIINVISIBILITY" - States - { - Spawn: - INVS A 350 Bright - Loop - } -} - - -// Tome of power ------------------------------------------------------------ - -ACTOR ArtiTomeOfPower : PowerupGiver native -{ - +COUNTITEM - +FLOATBOB - +INVENTORY.PICKUPFLASH - Inventory.Icon "ARTIPWBK" - Powerup.Type Weaponlevel2 - Inventory.PickupMessage "$TXT_ARTITOMEOFPOWER" - Tag "$TAG_ARTITOMEOFPOWER" - States - { - Spawn: - PWBK A 350 - Loop - } -} - - -// Time bomb ---------------------------------------------------------------- - -ACTOR ActivatedTimeBomb -{ - +NOGRAVITY - RenderStyle Translucent - Alpha 0.4 - DeathSound "misc/timebomb" - - action native A_Timebomb(); - - States - { - Spawn: - FBMB ABCD 10 - FBMB E 6 A_Scream - XPL1 A 4 BRIGHT A_Timebomb - XPL1 BCDEF 4 BRIGHT - Stop - } -} - - -ACTOR ArtiTimeBomb : Inventory native -{ - +COUNTITEM - +FLOATBOB - +INVENTORY.PICKUPFLASH - +INVENTORY.INVBAR - +INVENTORY.FANCYPICKUPSOUND - Inventory.Icon "ARTIFBMB" - Inventory.PickupSound "misc/p_pkup" - Inventory.PickupMessage "$TXT_ARTIFIREBOMB" - Tag "$TAG_ARTIFIREBOMB" - Inventory.DefMaxAmount - States - { - Spawn: - FBMB E 350 - Loop - } -} diff --git a/wadsrc/static/actors/heretic/hereticdecorations.txt b/wadsrc/static/actors/heretic/hereticdecorations.txt deleted file mode 100644 index 032ee33a1d..0000000000 --- a/wadsrc/static/actors/heretic/hereticdecorations.txt +++ /dev/null @@ -1,248 +0,0 @@ -ACTOR SkullHang70 -{ - Radius 20 - Height 70 - +SPAWNCEILING - +NOGRAVITY - States - { - Spawn: - SKH1 A -1 - Stop - } -} - -ACTOR SkullHang60 -{ - Radius 20 - Height 60 - +SPAWNCEILING - +NOGRAVITY - States - { - Spawn: - SKH2 A -1 - Stop - } -} - -ACTOR SkullHang45 -{ - Radius 20 - Height 45 - +SPAWNCEILING - +NOGRAVITY - States - { - Spawn: - SKH3 A -1 - Stop - } -} - -ACTOR SkullHang35 -{ - Radius 20 - Height 35 - +SPAWNCEILING - +NOGRAVITY - States - { - Spawn: - SKH4 A -1 - Stop - } -} - -ACTOR Chandelier -{ - Radius 20 - Height 60 - +SPAWNCEILING - +NOGRAVITY - States - { - Spawn: - CHDL ABC 4 - Loop - } -} - -ACTOR SerpentTorch -{ - Radius 12 - Height 54 - +SOLID - States - { - Spawn: - SRTC ABC 4 - Loop - } -} - -ACTOR SmallPillar -{ - Radius 16 - Height 34 - +SOLID - States - { - Spawn: - SMPL A -1 - Stop - } -} - -ACTOR StalagmiteSmall -{ - Radius 8 - Height 32 - +SOLID - States - { - Spawn: - STGS A -1 - Stop - } -} - -ACTOR StalagmiteLarge -{ - Radius 12 - Height 64 - +SOLID - States - { - Spawn: - STGL A -1 - Stop - } -} - -ACTOR StalactiteSmall -{ - Radius 8 - Height 36 - +SOLID - +SPAWNCEILING - +NOGRAVITY - States - { - Spawn: - STCS A -1 - Stop - } -} - -ACTOR StalactiteLarge -{ - Radius 12 - Height 68 - +SOLID - +SPAWNCEILING - +NOGRAVITY - States - { - Spawn: - STCL A -1 - Stop - } -} - -ACTOR FireBrazier -{ - Radius 16 - Height 44 - +SOLID - States - { - Spawn: - KFR1 ABCDEFGH 3 Bright - Loop - } -} - -ACTOR Barrel -{ - Radius 12 - Height 32 - +SOLID - States - { - Spawn: - BARL A -1 - Stop - } -} - -ACTOR BrownPillar -{ - Radius 14 - Height 128 - +SOLID - States - { - Spawn: - BRPL A -1 - Stop - } -} - -ACTOR Moss1 -{ - Radius 20 - Height 23 - +SPAWNCEILING - +NOGRAVITY - States - { - Spawn: - MOS1 A -1 - Stop - } -} - -ACTOR Moss2 -{ - Radius 20 - Height 27 - +SPAWNCEILING - +NOGRAVITY - States - { - Spawn: - MOS2 A -1 - Stop - } -} - -ACTOR WallTorch -{ - Radius 6 - Height 16 - +NOGRAVITY - +FIXMAPTHINGPOS - States - { - Spawn: - WTRH ABC 6 Bright - Loop - } -} - -ACTOR HangingCorpse -{ - Radius 8 - Height 104 - +SOLID - +SPAWNCEILING - +NOGRAVITY - States - { - Spawn: - HCOR A -1 - Stop - } -} - diff --git a/wadsrc/static/actors/heretic/heretickeys.txt b/wadsrc/static/actors/heretic/heretickeys.txt deleted file mode 100644 index 1bda24dcc5..0000000000 --- a/wadsrc/static/actors/heretic/heretickeys.txt +++ /dev/null @@ -1,144 +0,0 @@ - -ACTOR HereticKey : Key -{ - +NOTDMATCH - Radius 20 - Height 16 -} - -// Green key ------------------------------------------------------------ - -ACTOR KeyGreen : HereticKey -{ - Inventory.PickupMessage "$TXT_GOTGREENKEY" - Inventory.Icon "GKEYICON" - States - { - Spawn: - AKYY ABCDEFGHIJ 3 Bright - Loop - } -} - -// Blue key ----------------------------------------------------------------- - -ACTOR KeyBlue : HereticKey -{ - Inventory.PickupMessage "$TXT_GOTBLUEKEY" - Inventory.Icon "BKEYICON" - States - { - Spawn: - BKYY ABCDEFGHIJ 3 Bright - Loop - } -} - -// Yellow key --------------------------------------------------------------- - -ACTOR KeyYellow : HereticKey -{ - Inventory.PickupMessage "$TXT_GOTYELLOWKEY" - Inventory.Icon "YKEYICON" - States - { - Spawn: - CKYY ABCDEFGHI 3 Bright - Loop - } -} - - -// --- Blue Key gizmo ----------------------------------------------------------- - -ACTOR KeyGizmoBlue -{ - Radius 16 - Height 50 - +SOLID - States - { - Spawn: - KGZ1 A 1 - KGZ1 A 1 A_SpawnItemEx("KeyGizmoFloatBlue", 0, 0, 60) - KGZ1 A -1 - Stop - } -} - -ACTOR KeyGizmoFloatBlue -{ - Radius 16 - Height 16 - +SOLID - +NOGRAVITY - States - { - Spawn: - KGZB A -1 Bright - Stop - } -} - -// --- Green Key gizmo ----------------------------------------------------------- - -ACTOR KeyGizmoGreen -{ - Radius 16 - Height 50 - +SOLID - States - { - Spawn: - KGZ1 A 1 - KGZ1 A 1 A_SpawnItemEx("KeyGizmoFloatGreen", 0, 0, 60) - KGZ1 A -1 - Stop - } -} - -ACTOR KeyGizmoFloatGreen -{ - Radius 16 - Height 16 - +SOLID - +NOGRAVITY - States - { - Spawn: - KGZG A -1 Bright - Stop - } -} - -// --- Yellow Key gizmo ----------------------------------------------------------- - -ACTOR KeyGizmoYellow -{ - Radius 16 - Height 50 - +SOLID - States - { - Spawn: - KGZ1 A 1 - KGZ1 A 1 A_SpawnItemEx("KeyGizmoFloatYellow", 0, 0, 60) - KGZ1 A -1 - Stop - } -} - -ACTOR KeyGizmoFloatYellow -{ - Radius 16 - Height 16 - +SOLID - +NOGRAVITY - States - { - Spawn: - KGZY A -1 Bright - Stop - } -} - diff --git a/wadsrc/static/actors/heretic/hereticmisc.txt b/wadsrc/static/actors/heretic/hereticmisc.txt deleted file mode 100644 index 9b000ede32..0000000000 --- a/wadsrc/static/actors/heretic/hereticmisc.txt +++ /dev/null @@ -1,229 +0,0 @@ - -// Pod ---------------------------------------------------------------------- - -ACTOR Pod -{ - Health 45 - Radius 16 - Height 54 - Painchance 255 - +SOLID +NOBLOOD +SHOOTABLE +DROPOFF - +WINDTHRUST +PUSHABLE +SLIDESONWALLS - +CANPASS +TELESTOMP +DONTMORPH - +NOBLOCKMONST +DONTGIB +OLDRADIUSDMG - DeathSound "world/podexplode" - PushFactor 0.5 - - action native A_PodPain (class podtype = "PodGoo"); - action native A_RemovePod (); - - States - { - Spawn: - PPOD A 10 - Loop - Pain: - PPOD B 14 A_PodPain - Goto Spawn - Death: - PPOD C 5 BRIGHT A_RemovePod - PPOD D 5 BRIGHT A_Scream - PPOD E 5 BRIGHT A_Explode - PPOD F 10 BRIGHT - Stop - Grow: - PPOD IJKLMNOP 3 - Goto Spawn - } -} - - -// Pod goo (falls from pod when damaged) ------------------------------------ - -ACTOR PodGoo -{ - Radius 2 - Height 4 - Gravity 0.125 - +NOBLOCKMAP +MISSILE +DROPOFF - +NOTELEPORT +CANNOTPUSH - States - { - Spawn: - PPOD GH 8 - Loop - Death: - PPOD G 10 - Stop - } -} - -// Pod generator ------------------------------------------------------------ - -ACTOR PodGenerator -{ - +NOBLOCKMAP - +NOSECTOR - +DONTSPLASH - AttackSound "world/podgrow" - - action native A_MakePod (class podtype = "Pod"); - - States - { - Spawn: - TNT1 A 35 A_MakePod - Loop - } -} - - -// Teleglitter generator 1 -------------------------------------------------- - -ACTOR TeleGlitterGenerator1 -{ - +NOBLOCKMAP - +NOGRAVITY - +DONTSPLASH - +MOVEWITHSECTOR - States - { - Spawn: - TNT1 A 8 A_SpawnItemEx("TeleGlitter1", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25) - Loop - } -} - -// Teleglitter generator 2 -------------------------------------------------- - -ACTOR TeleGlitterGenerator2 -{ - +NOBLOCKMAP - +NOGRAVITY - +DONTSPLASH - +MOVEWITHSECTOR - States - { - Spawn: - TNT1 A 8 A_SpawnItemEx("TeleGlitter2", random[TeleGlitter2](0,31)-16, random[TeleGlitter2](0,31)-16, 0, 0,0,0.25) - Loop - } -} - - -// Teleglitter 1 ------------------------------------------------------------ - -ACTOR TeleGlitter1 -{ - +NOBLOCKMAP +NOGRAVITY +MISSILE - RenderStyle Add - Damage 0 - - action native A_AccTeleGlitter (); - - States - { - Spawn: - TGLT A 2 BRIGHT - TGLT B 2 BRIGHT A_AccTeleGlitter - TGLT C 2 BRIGHT - TGLT D 2 BRIGHT A_AccTeleGlitter - TGLT E 2 BRIGHT - Loop - } -} - -// Teleglitter 2 ------------------------------------------------------------ - -ACTOR TeleGlitter2 : TeleGlitter1 -{ - States - { - Spawn: - TGLT F 2 BRIGHT - TGLT G 2 BRIGHT A_AccTeleGlitter - TGLT H 2 BRIGHT - TGLT I 2 BRIGHT A_AccTeleGlitter - TGLT J 2 BRIGHT - Loop - } -} - - -// --- Volcano -------------------------------------------------------------- - -ACTOR Volcano -{ - Radius 12 - Height 20 - +SOLID - - action native A_VolcanoSet (); - action native A_VolcanoBlast (); - - States - { - Spawn: - VLCO A 350 - VLCO A 35 A_VolcanoSet - VLCO BCDBCD 3 - VLCO E 10 A_VolcanoBlast - Goto Spawn+1 - } - -} - -// Volcano blast ------------------------------------------------------------ - -ACTOR VolcanoBlast -{ - Radius 8 - Height 8 - Speed 2 - Damage 2 - DamageType Fire - Gravity 0.125 - +NOBLOCKMAP +MISSILE +DROPOFF - +NOTELEPORT - DeathSound "world/volcano/blast" - - action native A_VolcBallImpact (); - - States - { - Spawn: - VFBL AB 4 BRIGHT A_SpawnItemEx("Puffy", random2[BeastPuff]()*0.015625, random2[BeastPuff]()*0.015625, random2[BeastPuff]()*0.015625, - 0,0,0,0,SXF_ABSOLUTEPOSITION, 64) - Loop - - Death: - XPL1 A 4 BRIGHT A_VolcBallImpact - XPL1 BCDEF 4 BRIGHT - Stop - } -} - -// Volcano T Blast ---------------------------------------------------------- - -ACTOR VolcanoTBlast -{ - Radius 8 - Height 6 - Speed 2 - Damage 1 - DamageType Fire - Gravity 0.125 - +NOBLOCKMAP +MISSILE +DROPOFF - +NOTELEPORT - States - { - Spawn: - VTFB AB 4 BRIGHT - Loop - Death: - SFFI CBABCDE 4 BRIGHT - Stop - } -} - - diff --git a/wadsrc/static/actors/heretic/hereticplayer.txt b/wadsrc/static/actors/heretic/hereticplayer.txt deleted file mode 100644 index 5a3e437729..0000000000 --- a/wadsrc/static/actors/heretic/hereticplayer.txt +++ /dev/null @@ -1,129 +0,0 @@ -ACTOR HereticPlayer : PlayerPawn -{ - Health 100 - Radius 16 - Height 56 - Mass 100 - Painchance 255 - Speed 1 - Player.DisplayName "Corvus" - Player.StartItem "GoldWand" - Player.StartItem "Staff" - Player.StartItem "GoldWandAmmo", 50 - Player.WeaponSlot 1, Staff, Gauntlets - Player.WeaponSlot 2, GoldWand - Player.WeaponSlot 3, Crossbow - Player.WeaponSlot 4, Blaster - Player.WeaponSlot 5, SkullRod - Player.WeaponSlot 6, PhoenixRod - Player.WeaponSlot 7, Mace - - Player.ColorRange 225, 240 - Player.Colorset 0, "Green", 225, 240, 238 - Player.Colorset 1, "Yellow", 114, 129, 127 - Player.Colorset 2, "Red", 145, 160, 158 - Player.Colorset 3, "Blue", 190, 205, 203 - // Doom Legacy additions - Player.Colorset 4, "Brown", 67, 82, 80 - Player.Colorset 5, "Light Gray", 9, 24, 22 - Player.Colorset 6, "Light Brown", 74, 89, 87 - Player.Colorset 7, "Light Red", 150, 165, 163 - Player.Colorset 8, "Light Blue", 192, 207, 205 - Player.Colorset 9, "Beige", 95, 110, 108 - - States - { - Spawn: - PLAY A -1 - Stop - See: - PLAY ABCD 4 - Loop - Melee: - Missile: - PLAY F 6 BRIGHT - PLAY E 12 - Goto Spawn - Pain: - PLAY G 4 - PLAY G 4 A_Pain - Goto Spawn - Death: - PLAY H 6 A_PlayerSkinCheck("AltSkinDeath") - PLAY I 6 A_PlayerScream - PLAY JK 6 - PLAY L 6 A_NoBlocking - PLAY MNO 6 - PLAY P -1 - Stop - XDeath: - PLAY Q 0 A_PlayerSkinCheck("AltSkinXDeath") - PLAY Q 5 A_PlayerScream - PLAY R 0 A_NoBlocking - PLAY R 5 A_SkullPop - PLAY STUVWX 5 - PLAY Y -1 - Stop - Burn: - FDTH A 5 BRIGHT A_PlaySound("*burndeath") - FDTH B 4 BRIGHT - FDTH C 5 BRIGHT - FDTH D 4 BRIGHT A_PlayerScream - FDTH E 5 BRIGHT - FDTH F 4 BRIGHT - FDTH G 5 BRIGHT A_PlaySound("*burndeath") - FDTH H 4 BRIGHT - FDTH I 5 BRIGHT - FDTH J 4 BRIGHT - FDTH K 5 BRIGHT - FDTH L 4 BRIGHT - FDTH M 5 BRIGHT - FDTH N 4 BRIGHT - FDTH O 5 BRIGHT A_NoBlocking - FDTH P 4 BRIGHT - FDTH Q 5 BRIGHT - FDTH R 4 BRIGHT - ACLO E 35 A_CheckPlayerDone - Wait - AltSkinDeath: - PLAY H 10 - PLAY I 10 A_PlayerScream - PLAY J 10 A_NoBlocking - PLAY KLM 10 - PLAY N -1 - Stop - AltSkinXDeath: - PLAY O 5 - PLAY P 5 A_XScream - PLAY Q 5 A_NoBlocking - PLAY RSTUV 5 - PLAY W -1 - Stop - } -} - -// The player's skull ------------------------------------------------------- - -ACTOR BloodySkull : PlayerChunk -{ - Radius 4 - Height 4 - +NOBLOCKMAP - +DROPOFF - +LOWGRAVITY - +CANNOTPUSH - +SKYEXPLODE - +NOBLOCKMONST - +NOSKIN - States - { - Spawn: - BSKL A 0 - BSKL ABCDE 5 A_CheckFloor("Hit") - Goto Spawn+1 - Hit: - BSKL F 16 A_CheckPlayerDone - Wait - } -} - diff --git a/wadsrc/static/decorate.txt b/wadsrc/static/decorate.txt index 1ae7d73288..960b28558d 100644 --- a/wadsrc/static/decorate.txt +++ b/wadsrc/static/decorate.txt @@ -5,13 +5,13 @@ #include "actors/raven/ravenambient.txt" #include "actors/raven/minotaur.txt" -#include "actors/heretic/hereticplayer.txt" -#include "actors/heretic/hereticammo.txt" -#include "actors/heretic/hereticarmor.txt" -#include "actors/heretic/hereticartifacts.txt" -#include "actors/heretic/heretickeys.txt" -#include "actors/heretic/hereticdecorations.txt" -#include "actors/heretic/hereticmisc.txt" +//#include "actors/heretic/hereticplayer.txt" +//#include "actors/heretic/hereticammo.txt" +//#include "actors/heretic/hereticarmor.txt" +//#include "actors/heretic/hereticartifacts.txt" +//#include "actors/heretic/heretickeys.txt" +//#include "actors/heretic/hereticdecorations.txt" +//#include "actors/heretic/hereticmisc.txt" #include "actors/heretic/hereticweaps.txt" #include "actors/heretic/mummy.txt" #include "actors/heretic/clink.txt" diff --git a/wadsrc/static/zscript.txt b/wadsrc/static/zscript.txt index a349d7ed5b..decf9241c5 100644 --- a/wadsrc/static/zscript.txt +++ b/wadsrc/static/zscript.txt @@ -59,5 +59,24 @@ zscript/doom/doomweapons.txt zscript/doom/stealthmonsters.txt zscript/doom/scriptedmarine.txt +zscript/heretic/hereticplayer.txt +zscript/heretic/hereticammo.txt +zscript/heretic/hereticarmor.txt +zscript/heretic/hereticartifacts.txt +zscript/heretic/heretickeys.txt +zscript/heretic/hereticdecorations.txt +zscript/heretic/hereticmisc.txt +/* +zscript/heretic/hereticweaps.txt +zscript/heretic/mummy.txt +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/doom/doomimp.txt b/wadsrc/static/zscript/doom/doomimp.txt index 244ae70eaa..318e81471a 100644 --- a/wadsrc/static/zscript/doom/doomimp.txt +++ b/wadsrc/static/zscript/doom/doomimp.txt @@ -55,7 +55,8 @@ class DoomImp : Actor TROO U -1; Stop; Raise: - TROO MLKJI 8; + TROO ML 8; + TROO KJI 6; Goto See; } } diff --git a/wadsrc/static/zscript/heretic/beast.txt b/wadsrc/static/zscript/heretic/beast.txt new file mode 100644 index 0000000000..209b2da565 --- /dev/null +++ b/wadsrc/static/zscript/heretic/beast.txt @@ -0,0 +1,118 @@ + +// Beast -------------------------------------------------------------------- + +class Beast : Actor +{ + Default + { + Health 220; + Radius 32; + Height 74; + Mass 200; + Speed 14; + Painchance 100; + Monster; + +FLOORCLIP + SeeSound "beast/sight"; + AttackSound "beast/attack"; + PainSound "beast/pain"; + DeathSound "beast/death"; + ActiveSound "beast/active"; + Obituary "$OB_BEAST"; + DropItem "CrossbowAmmo", 84, 10; + } + States + { + Spawn: + BEAS AB 10 A_Look; + Loop; + See: + BEAS ABCDEF 3 A_Chase; + Loop; + Missile: + BEAS H 10 A_FaceTarget; + BEAS I 10 A_CustomComboAttack("BeastBall", 32, random[BeastAttack](1,8)*3, "beast/attack"); + Goto See; + Pain: + BEAS G 3; + BEAS G 3 A_Pain; + Goto See; + Death: + BEAS R 6; + BEAS S 6 A_Scream; + BEAS TUV 6; + BEAS W 6 A_NoBlocking; + BEAS XY 6; + BEAS Z -1; + Stop; + XDeath: + BEAS J 5; + BEAS K 6 A_Scream; + BEAS L 5; + BEAS M 6; + BEAS N 5; + BEAS O 6 A_NoBlocking; + BEAS P 5; + BEAS Q -1; + Stop; + } +} + +// Beast ball --------------------------------------------------------------- + +class BeastBall : Actor +{ + Default + { + Radius 9; + Height 8; + Speed 12; + FastSpeed 20; + Damage 4; + Projectile; + -ACTIVATEIMPACT + -ACTIVATEPCROSS + -NOBLOCKMAP + +WINDTHRUST + +SPAWNSOUNDSOURCE + RenderStyle "Add"; + SeeSound "beast/attack"; + } + States + { + Spawn: + FRB1 AABBCC 2 A_SpawnItemEx("Puffy", random2[BeastPuff]()*0.015625, random2[BeastPuff]()*0.015625, random2[BeastPuff]()*0.015625, + 0,0,0,0,SXF_ABSOLUTEPOSITION, 64); + Loop; + Death: + FRB1 DEFGH 4; + Stop; + } +} + +// Puffy -------------------------------------------------------------------- + +class Puffy : Actor +{ + Default + { + Radius 6; + Height 8; + Speed 10; + +NOBLOCKMAP + +NOGRAVITY + +MISSILE + +NOTELEPORT + +DONTSPLASH + RenderStyle "Add"; + } + States + { + Spawn: + FRB1 DEFGH 4; + Stop; + } +} + + + diff --git a/wadsrc/static/zscript/heretic/hereticammo.txt b/wadsrc/static/zscript/heretic/hereticammo.txt new file mode 100644 index 0000000000..cf1e50a3d7 --- /dev/null +++ b/wadsrc/static/zscript/heretic/hereticammo.txt @@ -0,0 +1,243 @@ + +// Wimpy ammo --------------------------------------------------------------- + +Class GoldWandAmmo : Ammo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOGOLDWAND1"; + Inventory.Amount 10; + Inventory.MaxAmount 100; + Ammo.BackpackAmount 10; + Ammo.BackpackMaxAmount 200; + Inventory.Icon "INAMGLD"; + } + States + { + Spawn: + AMG1 A -1; + Stop; + } +} + +// Hefty ammo --------------------------------------------------------------- + +Class GoldWandHefty : GoldWandAmmo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOGOLDWAND2"; + Inventory.Amount 50; + } + States + { + Spawn: + AMG2 ABC 4; + Loop; + } +} +// Wimpy ammo --------------------------------------------------------------- + +Class CrossbowAmmo : Ammo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOCROSSBOW1"; + Inventory.Amount 5; + Inventory.MaxAmount 50; + Ammo.BackpackAmount 5; + Ammo.BackpackMaxAmount 100; + Inventory.Icon "INAMBOW"; + } + States + { + Spawn: + AMC1 A -1; + Stop; + } +} + +// Hefty ammo --------------------------------------------------------------- + +Class CrossbowHefty : CrossbowAmmo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOCROSSBOW2"; + Inventory.Amount 20; + } + States + { + Spawn: + AMC2 ABC 5; + Loop; + } +} +// Wimpy ammo --------------------------------------------------------------- + +Class MaceAmmo : Ammo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOMACE1"; + Inventory.Amount 20; + Inventory.MaxAmount 150; + Ammo.BackpackAmount 20; + Ammo.BackpackMaxAmount 300; + Inventory.Icon "INAMLOB"; + } + States + { + Spawn: + AMM1 A -1; + Stop; + } +} + +// Hefty ammo --------------------------------------------------------------- + +Class MaceHefty : MaceAmmo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOMACE2"; + Inventory.Amount 100; + } + States + { + Spawn: + AMM2 A -1; + Stop; + } +} + +// Wimpy ammo --------------------------------------------------------------- + +Class BlasterAmmo : Ammo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOBLASTER1"; + Inventory.Amount 10; + Inventory.MaxAmount 200; + Ammo.BackpackAmount 10; + Ammo.BackpackMaxAmount 400; + Inventory.Icon "INAMBST"; + } + States + { + Spawn: + AMB1 ABC 4; + Loop; + } +} + +// Hefty ammo --------------------------------------------------------------- + +Class BlasterHefty : BlasterAmmo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOBLASTER2"; + Inventory.Amount 25; + } + States + { + Spawn: + AMB2 ABC 4; + Loop; + } +} + +// Wimpy ammo --------------------------------------------------------------- + +Class SkullRodAmmo : Ammo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOSKULLROD1"; + Inventory.Amount 20; + Inventory.MaxAmount 200; + Ammo.BackpackAmount 20; + Ammo.BackpackMaxAmount 400; + Inventory.Icon "INAMRAM"; + } + States + { + Spawn: + AMS1 AB 5; + Loop; + } +} + +// Hefty ammo --------------------------------------------------------------- + +Class SkullRodHefty : SkullRodAmmo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOSKULLROD2"; + Inventory.Amount 100; + } + States + { + Spawn: + AMS2 AB 5; + Loop; + } +} + +// Wimpy ammo --------------------------------------------------------------- + +Class PhoenixRodAmmo : Ammo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOPHOENIXROD1"; + Inventory.Amount 1; + Inventory.MaxAmount 20; + Ammo.BackpackAmount 1; + Ammo.BackpackMaxAmount 40; + Inventory.Icon "INAMPNX"; + } + States + { + Spawn: + AMP1 ABC 4; + Loop; + } +} +// Hefty ammo --------------------------------------------------------------- + +Class PhoenixRodHefty : PhoenixRodAmmo +{ + Default + { + Inventory.PickupMessage "$TXT_AMMOPHOENIXROD2"; + Inventory.Amount 10; + } + States + { + Spawn: + AMP2 ABC 4; + Loop; + } +} + +// --- Bag of holding ------------------------------------------------------- + +Class BagOfHolding : BackpackItem +{ + Default + { + Inventory.PickupMessage "$TXT_ITEMBAGOFHOLDING"; + +COUNTITEM + +FLOATBOB + } + States + { + Spawn: + BAGH A -1; + Stop; + } +} diff --git a/wadsrc/static/zscript/heretic/hereticarmor.txt b/wadsrc/static/zscript/heretic/hereticarmor.txt new file mode 100644 index 0000000000..8cbcb9fbcf --- /dev/null +++ b/wadsrc/static/zscript/heretic/hereticarmor.txt @@ -0,0 +1,41 @@ + +// Silver Shield (Shield1) -------------------------------------------------- + +Class SilverShield : BasicArmorPickup +{ + Default + { + +FLOATBOB + Inventory.Pickupmessage "$TXT_ITEMSHIELD1"; + Inventory.Icon "SHLDA0"; + Armor.Savepercent 50; + Armor.Saveamount 100; + } + States + { + Spawn: + SHLD A -1; + stop; + } +} + +// Enchanted shield (Shield2) ----------------------------------------------- + +Class EnchantedShield : BasicArmorPickup +{ + Default + { + +FLOATBOB + Inventory.Pickupmessage "$TXT_ITEMSHIELD2"; + Inventory.Icon "SHD2A0"; + Armor.Savepercent 75; + Armor.Saveamount 200; + } + States + { + Spawn: + SHD2 A -1; + stop; + } +} + diff --git a/wadsrc/static/zscript/heretic/hereticartifacts.txt b/wadsrc/static/zscript/heretic/hereticartifacts.txt new file mode 100644 index 0000000000..e04426f053 --- /dev/null +++ b/wadsrc/static/zscript/heretic/hereticartifacts.txt @@ -0,0 +1,118 @@ +// Super map ---------------------------------------------------------------- + +Class SuperMap : MapRevealer +{ + Default + { + +COUNTITEM + +INVENTORY.ALWAYSPICKUP + +FLOATBOB + Inventory.MaxAmount 0; + Inventory.PickupMessage "$TXT_ITEMSUPERMAP"; + } + States + { + Spawn: + SPMP A -1; + Stop; + } +} + + +// Invisibility ------------------------------------------------------------- + +Class ArtiInvisibility : PowerupGiver +{ + Default + { + +COUNTITEM + +FLOATBOB + Inventory.PickupFlash "PickupFlash"; + RenderStyle "Translucent"; + Alpha 0.4; + Inventory.RespawnTics 4230; + Inventory.Icon "ARTIINVS"; + Powerup.Type "Ghost"; + Inventory.PickupMessage "$TXT_ARTIINVISIBILITY"; + Tag "$TAG_ARTIINVISIBILITY"; + } + States + { + Spawn: + INVS A 350 Bright; + Loop; + } +} + + +// Tome of power ------------------------------------------------------------ + +Class ArtiTomeOfPower : PowerupGiver native +{ + Default + { + +COUNTITEM + +FLOATBOB + Inventory.PickupFlash "PickupFlash"; + Inventory.Icon "ARTIPWBK"; + Powerup.Type "Weaponlevel2"; + Inventory.PickupMessage "$TXT_ARTITOMEOFPOWER"; + Tag "$TAG_ARTITOMEOFPOWER"; + } + States + { + Spawn: + PWBK A 350; + Loop; + } +} + + +// Time bomb ---------------------------------------------------------------- + +Class ActivatedTimeBomb : Actor +{ + Default + { + +NOGRAVITY + RenderStyle "Translucent"; + Alpha 0.4; + DeathSound "misc/timebomb"; + } + + action native void A_Timebomb(); + + States + { + Spawn: + FBMB ABCD 10; + FBMB E 6 A_Scream; + XPL1 A 4 BRIGHT A_Timebomb; + XPL1 BCDEF 4 BRIGHT; + Stop; + } +} + + +Class ArtiTimeBomb : Inventory native +{ + Default + { + +COUNTITEM + +FLOATBOB + Inventory.PickupFlash "PickupFlash"; + +INVENTORY.INVBAR + +INVENTORY.FANCYPICKUPSOUND + Inventory.Icon "ARTIFBMB"; + Inventory.PickupSound "misc/p_pkup"; + Inventory.PickupMessage "$TXT_ARTIFIREBOMB"; + Tag "$TAG_ARTIFIREBOMB"; + Inventory.DefMaxAmount; + } + States + { + Spawn: + FBMB E 350; + Loop; + } +} diff --git a/wadsrc/static/zscript/heretic/hereticdecorations.txt b/wadsrc/static/zscript/heretic/hereticdecorations.txt new file mode 100644 index 0000000000..d38f47a394 --- /dev/null +++ b/wadsrc/static/zscript/heretic/hereticdecorations.txt @@ -0,0 +1,302 @@ +Class SkullHang70 : Actor +{ + Default + { + Radius 20; + Height 70; + +SPAWNCEILING + +NOGRAVITY + } + States + { + Spawn: + SKH1 A -1; + Stop; + } +} + +Class SkullHang60 : Actor +{ + Default + { + Radius 20; + Height 60; + +SPAWNCEILING + +NOGRAVITY + } + States + { + Spawn: + SKH2 A -1; + Stop; + } +} + +Class SkullHang45 : Actor +{ + Default + { + Radius 20; + Height 45; + +SPAWNCEILING + +NOGRAVITY + } + States + { + Spawn: + SKH3 A -1; + Stop; + } +} + +Class SkullHang35 : Actor +{ + Default + { + Radius 20; + Height 35; + +SPAWNCEILING + +NOGRAVITY + } + States + { + Spawn: + SKH4 A -1; + Stop; + } +} + +Class Chandelier : Actor +{ + Default + { + Radius 20; + Height 60; + +SPAWNCEILING + +NOGRAVITY + } + States + { + Spawn: + CHDL ABC 4; + Loop; + } +} + +Class SerpentTorch : Actor +{ + Default + { + Radius 12; + Height 54; + +SOLID + } + States + { + Spawn: + SRTC ABC 4; + Loop; + } +} + +Class SmallPillar : Actor +{ + Default + { + Radius 16; + Height 34; + +SOLID + } + States + { + Spawn: + SMPL A -1; + Stop; + } +} + +Class StalagmiteSmall : Actor +{ + Default + { + Radius 8; + Height 32; + +SOLID + } + States + { + Spawn: + STGS A -1; + Stop; + } +} + +Class StalagmiteLarge : Actor +{ + Default + { + Radius 12; + Height 64; + +SOLID + } + States + { + Spawn: + STGL A -1; + Stop; + } +} + +Class StalactiteSmall : Actor +{ + Default + { + Radius 8; + Height 36; + +SOLID + +SPAWNCEILING + +NOGRAVITY + } + States + { + Spawn: + STCS A -1; + Stop; + } +} + +Class StalactiteLarge : Actor +{ + Default + { + Radius 12; + Height 68; + +SOLID + +SPAWNCEILING + +NOGRAVITY + } + States + { + Spawn: + STCL A -1; + Stop; + } +} + +Class FireBrazier : Actor +{ + Default + { + Radius 16; + Height 44; + +SOLID + } + States + { + Spawn: + KFR1 ABCDEFGH 3 Bright; + Loop; + } +} + +Class Barrel : Actor +{ + Default + { + Radius 12; + Height 32; + +SOLID + } + States + { + Spawn: + BARL A -1; + Stop; + } +} + +Class BrownPillar : Actor +{ + Default + { + Radius 14; + Height 128; + +SOLID + } + States + { + Spawn: + BRPL A -1; + Stop; + } +} + +Class Moss1 : Actor +{ + Default + { + Radius 20; + Height 23; + +SPAWNCEILING + +NOGRAVITY + } + States + { + Spawn: + MOS1 A -1; + Stop; + } +} + +Class Moss2 : Actor +{ + Default + { + Radius 20; + Height 27; + +SPAWNCEILING + +NOGRAVITY + } + States + { + Spawn: + MOS2 A -1; + Stop; + } +} + +Class WallTorch : Actor +{ + Default + { + Radius 6; + Height 16; + +NOGRAVITY + +FIXMAPTHINGPOS + } + States + { + Spawn: + WTRH ABC 6 Bright; + Loop; + } +} + +Class HangingCorpse : Actor +{ + Default + { + Radius 8; + Height 104; + +SOLID + +SPAWNCEILING + +NOGRAVITY + } + States + { + Spawn: + HCOR A -1; + Stop; + } +} + diff --git a/wadsrc/static/zscript/heretic/heretickeys.txt b/wadsrc/static/zscript/heretic/heretickeys.txt new file mode 100644 index 0000000000..d5532ce016 --- /dev/null +++ b/wadsrc/static/zscript/heretic/heretickeys.txt @@ -0,0 +1,174 @@ + +Class HereticKey : Key +{ + Default + { + +NOTDMATCH + Radius 20; + Height 16; + } +} + +// Green key ------------------------------------------------------------ + +Class KeyGreen : HereticKey +{ + Default + { + Inventory.PickupMessage "$TXT_GOTGREENKEY"; + Inventory.Icon "GKEYICON"; + } + States + { + Spawn: + AKYY ABCDEFGHIJ 3 Bright; + Loop; + } +} + +// Blue key ----------------------------------------------------------------- + +Class KeyBlue : HereticKey +{ + Default + { + Inventory.PickupMessage "$TXT_GOTBLUEKEY"; + Inventory.Icon "BKEYICON"; + } + States + { + Spawn: + BKYY ABCDEFGHIJ 3 Bright; + Loop; + } +} + +// Yellow key --------------------------------------------------------------- + +Class KeyYellow : HereticKey +{ + Default + { + Inventory.PickupMessage "$TXT_GOTYELLOWKEY"; + Inventory.Icon "YKEYICON"; + } + States + { + Spawn: + CKYY ABCDEFGHI 3 Bright; + Loop; + } +} + + +// --- Blue Key gizmo ----------------------------------------------------------- + +Class KeyGizmoBlue : Actor +{ + Default + { + Radius 16; + Height 50; + +SOLID + } + States + { + Spawn: + KGZ1 A 1; + KGZ1 A 1 A_SpawnItemEx("KeyGizmoFloatBlue", 0, 0, 60); + KGZ1 A -1; + Stop; + } +} + +Class KeyGizmoFloatBlue : Actor +{ + Default + { + Radius 16; + Height 16; + +SOLID + +NOGRAVITY + } + States + { + Spawn: + KGZB A -1 Bright; + Stop; + } +} + +// --- Green Key gizmo ----------------------------------------------------------- + +Class KeyGizmoGreen : Actor +{ + Default + { + Radius 16; + Height 50; + +SOLID + } + States + { + Spawn: + KGZ1 A 1; + KGZ1 A 1 A_SpawnItemEx("KeyGizmoFloatGreen", 0, 0, 60); + KGZ1 A -1; + Stop; + } +} + +Class KeyGizmoFloatGreen : Actor +{ + Default + { + Radius 16; + Height 16; + +SOLID + +NOGRAVITY + } + States + { + Spawn: + KGZG A -1 Bright; + Stop; + } +} + +// --- Yellow Key gizmo ----------------------------------------------------------- + +Class KeyGizmoYellow : Actor +{ + Default + { + Radius 16; + Height 50; + +SOLID + } + States + { + Spawn: + KGZ1 A 1; + KGZ1 A 1 A_SpawnItemEx("KeyGizmoFloatYellow", 0, 0, 60); + KGZ1 A -1; + Stop; + } +} + +Class KeyGizmoFloatYellow : Actor +{ + Default + { + Radius 16; + Height 16; + +SOLID + +NOGRAVITY + } + States + { + Spawn: + KGZY A -1 Bright; + Stop; + } +} + diff --git a/wadsrc/static/zscript/heretic/hereticmisc.txt b/wadsrc/static/zscript/heretic/hereticmisc.txt new file mode 100644 index 0000000000..0b90208b9f --- /dev/null +++ b/wadsrc/static/zscript/heretic/hereticmisc.txt @@ -0,0 +1,255 @@ + +// Pod ---------------------------------------------------------------------- + +class Pod : Actor +{ + Default + { + Health 45; + Radius 16; + Height 54; + Painchance 255; + +SOLID +NOBLOOD +SHOOTABLE +DROPOFF + +WINDTHRUST +PUSHABLE +SLIDESONWALLS + +CANPASS +TELESTOMP +DONTMORPH + +NOBLOCKMONST +DONTGIB +OLDRADIUSDMG + DeathSound "world/podexplode"; + PushFactor 0.5; + } + action native void A_PodPain (class podtype = "PodGoo"); + action native void A_RemovePod (); + + States + { + Spawn: + PPOD A 10; + Loop; + Pain: + PPOD B 14 A_PodPain; + Goto Spawn; + Death: + PPOD C 5 BRIGHT A_RemovePod; + PPOD D 5 BRIGHT A_Scream; + PPOD E 5 BRIGHT A_Explode; + PPOD F 10 BRIGHT; + Stop; + Grow: + PPOD IJKLMNOP 3; + Goto Spawn; + } +} + + +// Pod goo (falls from pod when damaged) ------------------------------------ + +class PodGoo : Actor +{ + Default + { + Radius 2; + Height 4; + Gravity 0.125; + +NOBLOCKMAP +MISSILE +DROPOFF + +NOTELEPORT +CANNOTPUSH + } + States + { + Spawn: + PPOD GH 8; + Loop; + Death: + PPOD G 10; + Stop; + } +} + +// Pod generator ------------------------------------------------------------ + +class PodGenerator : Actor +{ + Default + { + +NOBLOCKMAP + +NOSECTOR + +DONTSPLASH + AttackSound "world/podgrow"; + } + + action native void A_MakePod (class podtype = "Pod"); + + States + { + Spawn: + TNT1 A 35 A_MakePod; + Loop; + } +} + + +// Teleglitter generator 1 -------------------------------------------------- + +class TeleGlitterGenerator1 : Actor +{ + Default + { + +NOBLOCKMAP + +NOGRAVITY + +DONTSPLASH + +MOVEWITHSECTOR + } + States + { + Spawn: + TNT1 A 8 A_SpawnItemEx("TeleGlitter1", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25); + Loop; + } +} + +// Teleglitter generator 2 -------------------------------------------------- + +class TeleGlitterGenerator2 : Actor +{ + Default + { + +NOBLOCKMAP + +NOGRAVITY + +DONTSPLASH + +MOVEWITHSECTOR + } + States + { + Spawn: + TNT1 A 8 A_SpawnItemEx("TeleGlitter2", random[TeleGlitter2](0,31)-16, random[TeleGlitter2](0,31)-16, 0, 0,0,0.25); + Loop; + } +} + + +// Teleglitter 1 ------------------------------------------------------------ + +class TeleGlitter1 : Actor +{ + Default + { + +NOBLOCKMAP +NOGRAVITY +MISSILE + RenderStyle "Add"; + Damage 0; + } + + action native void A_AccTeleGlitter (); + + States + { + Spawn: + TGLT A 2 BRIGHT; + TGLT B 2 BRIGHT A_AccTeleGlitter; + TGLT C 2 BRIGHT; + TGLT D 2 BRIGHT A_AccTeleGlitter; + TGLT E 2 BRIGHT; + Loop; + } +} + +// Teleglitter 2 ------------------------------------------------------------ + +class TeleGlitter2 : TeleGlitter1 +{ + States + { + Spawn: + TGLT F 2 BRIGHT; + TGLT G 2 BRIGHT A_AccTeleGlitter; + TGLT H 2 BRIGHT; + TGLT I 2 BRIGHT A_AccTeleGlitter; + TGLT J 2 BRIGHT; + Loop; + } +} + + +// --- Volcano -------------------------------------------------------------- + +class Volcano : Actor +{ + Default + { + Radius 12; + Height 20; + +SOLID + } + + action native void A_VolcanoSet (); + action native void A_VolcanoBlast (); + + States + { + Spawn: + VLCO A 350; + VLCO A 35 A_VolcanoSet; + VLCO BCDBCD 3; + VLCO E 10 A_VolcanoBlast; + Goto Spawn+1; + } + +} + +// Volcano blast ------------------------------------------------------------ + +class VolcanoBlast : Actor +{ + Default + { + Radius 8; + Height 8; + Speed 2; + Damage 2; + DamageType "Fire"; + Gravity 0.125; + +NOBLOCKMAP +MISSILE +DROPOFF + +NOTELEPORT + DeathSound "world/volcano/blast"; + } + + action native void A_VolcBallImpact (); + + States + { + Spawn: + VFBL AB 4 BRIGHT A_SpawnItemEx("Puffy", random2[BeastPuff]()*0.015625, random2[BeastPuff]()*0.015625, random2[BeastPuff]()*0.015625, + 0,0,0,0,SXF_ABSOLUTEPOSITION, 64); + Loop; + + Death: + XPL1 A 4 BRIGHT A_VolcBallImpact; + XPL1 BCDEF 4 BRIGHT; + Stop; + } +} + +// Volcano T Blast ---------------------------------------------------------- + +class VolcanoTBlast : Actor +{ + Default + { + Radius 8; + Height 6; + Speed 2; + Damage 1; + DamageType "Fire"; + Gravity 0.125; + +NOBLOCKMAP +MISSILE +DROPOFF + +NOTELEPORT + } + States + { + Spawn: + VTFB AB 4 BRIGHT; + Loop; + Death: + SFFI CBABCDE 4 BRIGHT; + Stop; + } +} + + diff --git a/wadsrc/static/zscript/heretic/hereticplayer.txt b/wadsrc/static/zscript/heretic/hereticplayer.txt new file mode 100644 index 0000000000..26ff684f33 --- /dev/null +++ b/wadsrc/static/zscript/heretic/hereticplayer.txt @@ -0,0 +1,135 @@ +class HereticPlayer : PlayerPawn +{ + Default + { + Health 100; + Radius 16; + Height 56; + Mass 100; + Painchance 255; + Speed 1; + Player.DisplayName "Corvus"; + Player.StartItem "GoldWand"; + Player.StartItem "Staff"; + Player.StartItem "GoldWandAmmo", 50; + Player.WeaponSlot 1, "Staff", "Gauntlets"; + Player.WeaponSlot 2, "GoldWand"; + Player.WeaponSlot 3, "Crossbow"; + Player.WeaponSlot 4, "Blaster"; + Player.WeaponSlot 5, "SkullRod"; + Player.WeaponSlot 6, "PhoenixRod"; + Player.WeaponSlot 7, "Mace"; + + Player.ColorRange 225, 240; + Player.Colorset 0, "Green", 225, 240, 238; + Player.Colorset 1, "Yellow", 114, 129, 127; + Player.Colorset 2, "Red", 145, 160, 158; + Player.Colorset 3, "Blue", 190, 205, 203; + // Doom Legacy additions + Player.Colorset 4, "Brown", 67, 82, 80; + Player.Colorset 5, "Light Gray", 9, 24, 22; + Player.Colorset 6, "Light Brown", 74, 89, 87; + Player.Colorset 7, "Light Red", 150, 165, 163; + Player.Colorset 8, "Light Blue", 192, 207, 205; + Player.Colorset 9, "Beige", 95, 110, 108; + } + + States + { + Spawn: + PLAY A -1; + Stop; + See: + PLAY ABCD 4; + Loop; + Melee: + Missile: + PLAY F 6 BRIGHT; + PLAY E 12; + Goto Spawn; + Pain: + PLAY G 4; + PLAY G 4 A_Pain; + Goto Spawn; + Death: + PLAY H 6 A_PlayerSkinCheck("AltSkinDeath"); + PLAY I 6 A_PlayerScream; + PLAY JK 6; + PLAY L 6 A_NoBlocking; + PLAY MNO 6; + PLAY P -1; + Stop; + XDeath: + PLAY Q 0 A_PlayerSkinCheck("AltSkinXDeath"); + PLAY Q 5 A_PlayerScream; + PLAY R 0 A_NoBlocking; + PLAY R 5 A_SkullPop; + PLAY STUVWX 5; + PLAY Y -1; + Stop; + Burn: + FDTH A 5 BRIGHT A_PlaySound("*burndeath"); + FDTH B 4 BRIGHT; + FDTH C 5 BRIGHT; + FDTH D 4 BRIGHT A_PlayerScream; + FDTH E 5 BRIGHT; + FDTH F 4 BRIGHT; + FDTH G 5 BRIGHT A_PlaySound("*burndeath"); + FDTH H 4 BRIGHT; + FDTH I 5 BRIGHT; + FDTH J 4 BRIGHT; + FDTH K 5 BRIGHT; + FDTH L 4 BRIGHT; + FDTH M 5 BRIGHT; + FDTH N 4 BRIGHT; + FDTH O 5 BRIGHT A_NoBlocking; + FDTH P 4 BRIGHT; + FDTH Q 5 BRIGHT; + FDTH R 4 BRIGHT; + ACLO E 35 A_CheckPlayerDone; + Wait; + AltSkinDeath: + PLAY H 10; + PLAY I 10 A_PlayerScream; + PLAY J 10 A_NoBlocking; + PLAY KLM 10; + PLAY N -1; + Stop; + AltSkinXDeath: + PLAY O 5; + PLAY P 5 A_XScream; + PLAY Q 5 A_NoBlocking; + PLAY RSTUV 5; + PLAY W -1; + Stop; + } +} + +// The player's skull ------------------------------------------------------- + +class BloodySkull : PlayerChunk +{ + Default + { + Radius 4; + Height 4; + Gravity 0.125; + +NOBLOCKMAP + +DROPOFF + +CANNOTPUSH + +SKYEXPLODE + +NOBLOCKMONST + +NOSKIN + } + States + { + Spawn: + BSKL A 0; + BSKL ABCDE 5 A_CheckFloor("Hit"); + Goto Spawn+1; + Hit: + BSKL F 16 A_CheckPlayerDone; + Wait; + } +} +