Initial 1.1 development setup.

This commit is contained in:
Mari the Deer 2021-09-01 09:55:32 +02:00
commit dc4bd4d45d
144 changed files with 2487 additions and 165 deletions

View file

@ -0,0 +1,306 @@
// All DLC weapon ammo pickups
Class SparksterBAmmo : Ammo
{
Mixin SWWMAmmo;
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Default
{
//$Title Sparkster Blue Ammo
//$Group Ammo
//$Sprite graphics/HUD/Icons/A_SparkBAmmo.png
//$Icon ammo
Tag "$T_SPARKBAMMO";
Inventory.PickupMessage "$T_SPARKBAMMO";
Stamina 16000;
Inventory.Icon "graphics/HUD/Icons/A_SparkBAmmo.png";
Inventory.Amount 1;
Inventory.MaxAmount 8;
Ammo.BackpackAmount 1;
Ammo.BackpackMaxAmount 24;
Ammo.DropAmount 1;
+FLOATBOB;
FloatBobStrength 0.25;
Accuracy 70;
}
override void ModifyDropAmount( int dropamount )
{
Super.ModifyDropAmount(dropamount);
Amount = min(Amount,1);
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}
Class SparksterRAmmo : Ammo
{
Mixin SWWMAmmo;
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Default
{
//$Title Sparkster Red Ammo
//$Group Ammo
//$Sprite graphics/HUD/Icons/A_SparkRAmmo.png
//$Icon ammo
Tag "$T_SPARKRAMMO";
Inventory.PickupMessage "$T_SPARKRAMMO";
Stamina 18000;
Inventory.Icon "graphics/HUD/Icons/A_SparkRAmmo.png";
Inventory.Amount 1;
Inventory.MaxAmount 8;
Ammo.BackpackAmount 1;
Ammo.BackpackMaxAmount 24;
Ammo.DropAmount 1;
+FLOATBOB;
FloatBobStrength 0.25;
Accuracy 75;
}
override void ModifyDropAmount( int dropamount )
{
Super.ModifyDropAmount(dropamount);
Amount = min(Amount,1);
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}
Class SparksterAmmoBundleSpawn : SWWMAmmoSpawner
{
override void SpawnAmmo()
{
int bnd = Random[Bundle](2,3);
for ( int i=0; i<bnd; i++ )
{
let a = Spawn(Random[Bundle](0,2)?"SparksterBAmmo":"SparksterRAmmo",Vec3Angle(6,i*(360/bnd)));
a.angle = i*(360/bnd);
SWWMUtility.TransferItemProp(self,a,true);
}
}
}
Class SparksterBigAmmoBundleSpawn : SWWMAmmoSpawner
{
override void SpawnAmmo()
{
int bnd = Random[Bundle](3,6);
for ( int i=0; i<bnd; i++ )
{
let a = Spawn(Random[Bundle](0,2)?"SparksterBAmmo":"SparksterRAmmo",Vec3Angle(8,i*(360/bnd)));
a.angle = i*(360/bnd);
SWWMUtility.TransferItemProp(self,a,true);
}
let a = Spawn(Random[Bundle](0,2)?"SparksterBAmmo":"SparksterRAmmo",pos);
a.angle = angle;
SWWMUtility.TransferItemProp(self,a,true);
}
}
Class MisterRound : MagAmmo
{
Default
{
//$Title Mortal Rifle Round
//$Group Ammo
//$Sprite graphics/HUD/Icons/A_MRRound.png
//$Icon ammo
Tag "$T_MRROUND";
Inventory.PickupMessage "$T_MRROUND";
Inventory.Icon "graphics/HUD/Icons/A_MRRound.png";
MagAmmo.ParentAmmo "MisterAmmo";
MagAmmo.ClipSize 30;
Inventory.MaxAmount 40;
+FLOATBOB;
FloatBobStrength 0.25;
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}
Class MisterRoundBundleSpawn : SWWMAmmoSpawner
{
override void SpawnAmmo()
{
int bnd = Random[Bundle](5,10);
for ( int i=0; i<bnd; i++ )
{
let a = Spawn("MisterRound",Vec3Angle(6,i*(360/bnd)));
a.angle = i*(360/bnd);
SWWMUtility.TransferItemProp(self,a,true);
}
}
}
Class MisterAmmo : Ammo
{
Mixin SWWMAmmo;
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Default
{
//$Title Mortal Rifle Mag
//$Group Ammo
//$Sprite graphics/HUD/Icons/A_MRAmmo.png
//$Icon ammo
Tag "$T_MRAMMO";
Inventory.PickupMessage "$T_MRAMMO";
Stamina 120000;
Inventory.Icon "graphics/HUD/Icons/A_MRAmmo.png";
Inventory.Amount 1;
Inventory.MaxAmount 2;
Ammo.BackpackAmount 0;
Ammo.BackpackMaxAmount 6;
Ammo.DropAmount 1;
+FLOATBOB;
FloatBobStrength 0.25;
Accuracy 90;
}
override void ModifyDropAmount( int dropamount )
{
Super.ModifyDropAmount(dropamount);
Amount = min(Amount,1);
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}
Class MisterGAmmo : Ammo
{
Mixin SWWMShellAmmo;
Mixin SWWMAmmo;
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Default
{
//$Title Mortal Rifle Grenade
//$Group Ammo
//$Sprite graphics/HUD/Icons/A_MRGrenade.png
//$Icon ammo
Tag "$T_MRGRENADE";
Stamina 90000;
Inventory.Icon "graphics/HUD/Icons/A_MRGrenade.png";
Inventory.Amount 1;
Inventory.MaxAmount 3;
Ammo.BackpackAmount 0;
Ammo.BackpackMaxAmount 9;
Ammo.DropAmount 1;
+FLOATBOB;
FloatBobStrength 0.25;
Accuracy 90;
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}
Class MisterGAmmo2 : MisterGAmmo
{
Default
{
//$Title 2x Mortal Rifle Grenades
//$Group Ammo
//$Sprite graphics/HUD/Icons/A_MRGrenade.png
//$Icon ammo
Inventory.Amount 2;
}
}
Class MisterGAmmo3 : MisterGAmmo
{
Default
{
//$Title 3x Mortal Rifle Grenades
//$Group Ammo
//$Sprite graphics/HUD/Icons/A_MRGrenade.png
//$Icon ammo
Inventory.Amount 3;
}
}
Class UltimatePod : MagAmmo
{
Default
{
//$Title Ultimate Pod
//$Group Ammo
//$Sprite graphics/HUD/Icons/A_UltimatePod.png
//$Icon ammo
Tag "$T_ULTIMATEPOD";
Inventory.PickupMessage "$T_ULTIMATEPOD";
Inventory.Icon "graphics/HUD/Icons/A_UltimatePod.png";
MagAmmo.ParentAmmo "UltimateAmmo";
MagAmmo.ClipSize 4;
Inventory.MaxAmount 6;
+FLOATBOB;
FloatBobStrength 0.25;
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}
Class UltimateAmmo : Ammo
{
Mixin SWWMAmmo;
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Default
{
//$Title Ultimate Mag
//$Group Ammo
//$Sprite graphics/HUD/Icons/A_UltimateAmmo.png
//$Icon ammo
Tag "$T_ULTIMATEAMMO";
Inventory.PickupMessage "$T_ULTIMATEAMMO";
Stamina 2000000;
Inventory.Icon "graphics/HUD/Icons/A_UltimateAmmo.png";
Inventory.Amount 1;
Inventory.MaxAmount 1;
Ammo.BackpackAmount 0;
Ammo.BackpackMaxAmount 5;
Ammo.DropAmount 1;
+FLOATBOB;
FloatBobStrength 0.25;
}
override void ModifyDropAmount( int dropamount )
{
Super.ModifyDropAmount(dropamount);
Amount = min(Amount,1);
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}

View file

@ -0,0 +1,41 @@
// Tach-Engine & Nekuratek Sparkster x3 (from UnSX 2)
// Slot 6, spawns shared with Hellblazer
Class ModernSparkster : SWWMWeapon
{
int clipcount, clipcount2;
bool chambered, chambered2;
Property ClipCount : clipcount;
Property ClipCount2 : clipcount2;
Default
{
//$Title Sparkster x3
//$Group Weapons
//$Sprite graphics/HUD/Icons/W_NewSparkster.png
//$Icon weapon
Tag "$T_NEWSPARKSTER";
Inventory.PickupMessage "$I_NEWSPARKSTER";
Obituary "$O_NEWSPARKSTER";
Inventory.Icon "graphics/HUD/Icons/W_NewSparkster.png";
Weapon.SlotNumber 6;
Weapon.SlotPriority 3.;
Weapon.SelectionOrder 625;
Weapon.AmmoType1 "SparksterBAmmo";
Weapon.AmmoGive1 1;
Weapon.AmmoType2 "SparksterRAmmo";
Weapon.AmmoGive2 1;
SWWMWeapon.DropAmmoType "RocketAmmo";
ModernSparkster.ClipCount 3;
ModernSparkster.ClipCount2 3;
Stamina 160000;
+SWWMWEAPON.NOFIRSTGIVE;
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}

View file

@ -0,0 +1 @@
// Sparkster Carbine projectiles and effects

View file

@ -0,0 +1,28 @@
// Unissix Crafts Hand Of Divine (from Total Madness, the reboot not the original)
// Slot 1, spawns shared with Pusher
Class FistGun : SWWMWeapon
{
Default
{
//$Title Hand of Divine
//$Group Weapons
//$Sprite graphics/HUD/Icons/W_FistGun.png
//$Icon weapon
Tag "$T_FISTGUN";
Inventory.PickupMessage "$T_FISTGUN";
Obituary "$O_FISTGUN";
Inventory.Icon "graphics/HUD/Icons/W_FistGun.png";
Weapon.SlotNumber 1;
Weapon.SlotPriority 4.;
Weapon.SelectionOrder 1150;
Stamina 15000;
+WEAPON.MELEEWEAPON;
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}

View file

@ -0,0 +1 @@
// Hand of Divine projectiles and effects

View file

@ -0,0 +1,41 @@
// Plutoni Inc. Mortal Rifle (from UnSX 2)
// Slot 9, spawns shared with Candy Gun
Class MisterRifle : SWWMWeapon
{
int clipcount;
bool chambered, gchambered;
Property ClipCount : clipcount;
Default
{
//$Title Mortal Rifle
//$Group Weapons
//$Sprite graphics/HUD/Icons/W_MortalRifle.png
//$Icon weapon
Tag "$T_MORTALRIFLE";
Inventory.PickupMessage "$T_MORTALRIFLE";
Obituary "$O_MORTALRIFLE";
Inventory.Icon "graphics/HUD/Icons/W_MortalRifle.png";
Weapon.SlotNumber 9;
Weapon.SlotPriority 3.;
Weapon.SelectionOrder 725;
Weapon.AmmoType1 "MisterAmmo";
Weapon.AmmoGive1 1;
Weapon.AmmoType2 "MisterGAmmo";
Weapon.AmmoGive2 1;
SWWMWeapon.DropAmmoType "MisterAmmo";
MisterRifle.ClipCount 30;
Stamina 2100000;
+SWWMWEAPON.NOFIRSTGIVE;
+WEAPON.EXPLOSIVE;
+WEAPON.BFG;
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}

View file

@ -0,0 +1 @@
// Mortal Rifle projectiles and effects

View file

@ -0,0 +1,39 @@
// Nekuratek Rafan-Kos aka "The Ultimate Weapon" (from UnSX 4)
// Slot 0, spawns shared with Ynykron Artifact
Class RafanKos : SWWMWeapon
{
int clipcount;
bool chambered;
Property ClipCount : clipcount;
Default
{
//$Title Rafan-Kos
//$Group Weapons
//$Sprite graphics/HUD/Icons/W_RafanKos.png
//$Icon weapon
Tag "$T_RAFANKOS";
Inventory.PickupMessage "$T_RAFANKOS";
Obituary "$O_RAFANKOS";
Inventory.Icon "graphics/HUD/Icons/W_RafanKos.png";
Weapon.SlotNumber 0;
Weapon.SlotPriority 3.;
Weapon.SelectionOrder 7975;
Weapon.AmmoType1 "UltimateAmmo";
Weapon.AmmoGive1 1;
SWWMWeapon.DropAmmoType "UltimateAmmo";
RafanKos.ClipCount 4;
Stamina 5000000;
+SWWMWEAPON.NOFIRSTGIVE;
+WEAPON.EXPLOSIVE;
+WEAPON.BFG;
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}

View file

@ -0,0 +1 @@
// Rafan-Kos projectiles and effects

View file

@ -693,10 +693,10 @@ extend Class SWWMHandler
else if ( e.Replacee is 'Mana2' ) e.Replacement = 'FabricatorTier2';
else if ( e.Replacee is 'Mana3' ) e.Replacement = 'FabricatorTier3';
else if ( e.Replacee is 'ArtiBoostMana' ) e.Replacement = 'FabricatorTier4';
else if ( (e.Replacee is 'Backpack') || (e.Replacee is 'BagOfHolding') || (e.Replacee is 'ArtiPork') ) e.Replacement = 'HammerspaceEmbiggener';
else if ( (e.Replacee is 'FWeaponPiece1') || (e.Replacee is 'FWeaponPiece2')
else if ( (e.Replacee is 'Backpack') || (e.Replacee is 'BagOfHolding')
|| (e.Replacee is 'FWeaponPiece1') || (e.Replacee is 'FWeaponPiece2')
|| (e.Replacee is 'CWeaponPiece1') || (e.Replacee is 'CWeaponPiece3')
|| (e.Replacee is 'MWeaponPiece2') || (e.Replacee is 'MWeaponPiece3') ) e.Replacement = 'SWWMNothing';
|| (e.Replacee is 'MWeaponPiece2') || (e.Replacee is 'MWeaponPiece3') ) e.Replacement = 'HammerspaceEmbiggener';
else if ( e.Replacee is 'ArmorBonus' ) e.Replacement = 'ArmorNuggetItem';
else if ( e.Replacee is 'HealthBonus' ) e.Replacement = 'HealthNuggetItem';
else if ( (e.Replacee is 'ArtiTimeBomb') || (e.Replacee is 'ArtiBlastRadius') || (e.Replacee is 'ArtiPoisonBag') || (e.Replacee is 'ArtiHealingRadius') ) e.Replacement = (nugflip=!nugflip)?'HealthNuggetBundleSpawn':'ArmorNuggetBundleSpawn';
@ -704,18 +704,18 @@ extend Class SWWMHandler
else if ( (e.Replacee is 'Stimpack') || (e.Replacee is 'CrystalVial') ) e.Replacement = 'TetraHealthItem';
else if ( (e.Replacee is 'Medikit') || (e.Replacee is 'ArtiHealth') ) e.Replacement = 'CubeHealthItem';
else if ( (e.Replacee is 'Soulsphere') || (e.Replacee is 'ArtiSuperHealth') ) e.Replacement = 'RefresherItem';
else if ( (e.Replacee is 'Megasphere') || (e.Replacee is 'ArtiEgg') || (e.Replacee is 'ArtiBoostArmor') ) e.Replacement = 'GrilledCheeseSandwich';
else if ( (e.Replacee is 'Megasphere') || (e.Replacee is 'ArtiEgg') || (e.Replacee is 'ArtiBoostArmor') ) e.Replacement = (deathmatch||Random[Replacements](0,3)||SWWMUtility.ItemExists('DivineSprite',worldonly:true))?'GrilledCheeseSandwich':'DivineSprite';
else if ( (e.Replacee is 'Blursphere') || (e.Replacee is 'ArtiInvisibility') ) e.Replacement = (deathmatch||Random[Replacements](0,2)||SWWMUtility.ItemExists('Mykradvo',worldonly:true))?'GhostArtifact':'Mykradvo';
else if ( e.Replacee is 'Radsuit' ) e.Replacement = 'EBarrier';
else if ( (e.Replacee is 'ArtiFly') ) e.Replacement = 'GravitySuppressor';
else if ( (e.Replacee is 'InvulnerabilitySphere') || (e.Replacee is 'ArtiInvulnerability') || (e.Replacee is 'ArtiInvulnerability2') ) e.Replacement = (deathmatch||Random[Replacements](0,3)||SWWMUtility.ItemExists('Mykradvo',worldonly:true))?'FuckingInvinciball':'Mykradvo';
else if ( (e.Replacee is 'Berserk') || (e.Replacee == 'ArtiTomeOfPower') || (e.Replacee == 'ArtiSpeedBoots') ) e.Replacement = (deathmatch||Random[Replacements](0,2)||SWWMUtility.ItemExists('Mykradvo',worldonly:true))?'Ragekit':'Mykradvo';
else if ( (e.Replacee is 'Berserk') || (e.Replacee == 'ArtiTomeOfPower') || (e.Replacee == 'ArtiSpeedBoots') ) e.Replacement = (deathmatch||Random[Replacements](0,2)||SWWMUtility.ItemExists('AngerySigil',worldonly:true))?'Ragekit':'AngerySigil';
else if ( (e.Replacee is 'AllMap') || (e.Replacee is 'SuperMap') ) e.Replacement = 'Omnisight';
else if ( (e.Replacee is 'Infrared') || (e.Replacee is 'ArtiTorch') ) e.Replacement = 'SWWMLamp';
else if ( (e.Replacee is 'GreenArmor') || (e.Replacee is 'SilverShield') || (e.Replacee is 'PlatinumHelm') || (e.Replacee is 'AmuletOfWarding') ) e.Replacement = 'BlastSuitItem';
else if ( (e.Replacee is 'BlueArmor') || (e.Replacee is 'EnchantedShield') || (e.Replacee is 'MeshArmor') || (e.Replacee is 'FalconShield') ) e.Replacement = 'WarArmorItem';
else if ( (e.Replacee is 'ArtiDarkServant') || (e.Replacee == 'ArtiTeleportOther') ) e.Replacement = 'ChanceboxSpawner';
else if ( e.Replacee is 'ArtiTeleport' ) e.Replacement = (gameinfo.GameType&GAME_Hexen)?'ChanceboxSpawner':'SWWMNothing';
else if ( (e.Replacee is 'ArtiDarkServant') || (e.Replacee == 'ArtiTeleportOther') || (e.Replacee == 'ArtiPork') ) e.Replacement = 'ChanceboxSpawner';
else if ( e.Replacee is 'ArtiTeleport' ) e.Replacement = 'SafetyTether';
else
{
if ( profiling ) checkreplacement_ms += MSTime()-curms;

View file

@ -9,7 +9,7 @@ Class MsgLine
Class SWWMStatusBar : BaseStatusBar
{
TextureID StatusTex, WeaponTex, ScoreTex[3], InventoryTex, ChatTex[6],
HealthTex[5], FuelTex[2], DashTex, EnemyBTex, EnemyHTex[5],
HealthTex[6], FuelTex[2], DashTex, EnemyBTex, EnemyHTex[6],
GenericAmmoTex[3], MiniBox, AutoPage;
HUDFont mTewiFont, mMiniwiFont, mMPlusFont, mk6x8Font;
@ -686,6 +686,7 @@ Class SWWMStatusBar : BaseStatusBar
HealthTex[2] = TexMan.CheckForTexture("graphics/HUD/HealthBar2.png",TexMan.Type_Any);
HealthTex[3] = TexMan.CheckForTexture("graphics/HUD/HealthBar3.png",TexMan.Type_Any);
HealthTex[4] = TexMan.CheckForTexture("graphics/HUD/HealthBarS.png",TexMan.Type_Any);
HealthTex[5] = TexMan.CheckForTexture("graphics/HUD/HealthBarD.png",TexMan.Type_Any);
ScoreTex[0] = TexMan.CheckForTexture("graphics/HUD/ScoreBoxL.png",TexMan.Type_Any);
ScoreTex[1] = TexMan.CheckForTexture("graphics/HUD/ScoreBoxM.png",TexMan.Type_Any);
ScoreTex[2] = TexMan.CheckForTexture("graphics/HUD/ScoreBoxR.png",TexMan.Type_Any);
@ -703,6 +704,7 @@ Class SWWMStatusBar : BaseStatusBar
EnemyHTex[2] = TexMan.CheckForTexture("graphics/HUD/EnemyBar2.png",TexMan.Type_Any);
EnemyHTex[3] = TexMan.CheckForTexture("graphics/HUD/EnemyBar3.png",TexMan.Type_Any);
EnemyHTex[4] = TexMan.CheckForTexture("graphics/HUD/EnemyBarS.png",TexMan.Type_Any);
EnemyHTex[5] = TexMan.CheckForTexture("graphics/HUD/EnemyBarD.png",TexMan.Type_Any);
GenericAmmoTex[0] = TexMan.CheckForTexture("graphics/HUD/GenericAmmoBoxL.png",TexMan.Type_Any);
GenericAmmoTex[1] = TexMan.CheckForTexture("graphics/HUD/GenericAmmoBoxM.png",TexMan.Type_Any);
GenericAmmoTex[2] = TexMan.CheckForTexture("graphics/HUD/GenericAmmoBoxR.png",TexMan.Type_Any);
@ -1773,6 +1775,14 @@ Class SWWMStatusBar : BaseStatusBar
Screen.DrawText(mTewiFont.mFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-11,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,SWWMLamp(i).isBlinking()?alpha*.5:alpha);
return true;
}
if ( (i is 'DivineSpriteEffect') && aspowerup )
{
Screen.DrawTexture(i.Icon,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,DivineSpriteEffect(i).isBlinking()?alpha*.5:alpha,DTA_TopOffset,0,DTA_LeftOffset,0);
String nstr = String.Format("%ds",DivineSpriteEffect(i).healtim/GameTicRate);
int len = mTewiFont.mFont.StringWidth(nstr);
Screen.DrawText(mTewiFont.mFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-11,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,DivineSpriteEffect(i).isBlinking()?alpha*.5:alpha);
return true;
}
Screen.DrawTexture(i.Icon,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_TopOffset,0,DTA_LeftOffset,0);
if ( (i.Amount > 1) || forceamt )
{
@ -1810,6 +1820,12 @@ Class SWWMStatusBar : BaseStatusBar
yy -= 34;
continue;
}
if ( (i is 'DivineSpriteEffect') && !DivineSpriteEffect(i).bHealDone )
{
DrawInvIcon(i,xx,yy,aspowerup:true);
yy -= 34;
continue;
}
if ( !(i is 'Powerup') || (Powerup(i).EffectTics <= 0) || !(Powerup(i).Icon) ) continue;
if ( DrawInvIcon(i,xx,yy) )
yy -= 34;
@ -1946,33 +1962,51 @@ Class SWWMStatusBar : BaseStatusBar
Screen.DrawTexture(FuelTex[swwm_superfuel],false,margin+2,ss.y-(margin+24),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,fw);
double ht = clamp(HealthInter.GetValue(),0,10000);
double hw = min(ht,100);
if ( isInvulnerable() || CPlayer.mo.FindInventory("InvinciballPower") )
{
Screen.DrawTexture(HealthTex[4],false,margin+2,ss.y-(margin+14),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
Screen.DrawText(mTewiFont.mFont,Font.CR_WHITE,margin+108,ss.y-(margin+15),String.Format("%03d",Random[HudStuff](0,999)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
return;
}
Screen.DrawTexture(HealthTex[0],false,margin+2,ss.y-(margin+14),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
if ( ht > 100 )
{
hw = min(ht-100,100);
Screen.DrawTexture(HealthTex[1],false,margin+2,ss.y-(margin+14),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
}
if ( ht > 200 )
{
hw = min(ht-200,300)/3.;
Screen.DrawTexture(HealthTex[2],false,margin+2,ss.y-(margin+14),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
}
if ( ht > 500 )
{
hw = min(ht-500,500)/5.;
Screen.DrawTexture(HealthTex[3],false,margin+2,ss.y-(margin+14),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
}
int hcolor = Font.CR_RED;
if ( ht > 500 ) hcolor = Font.CR_GOLD;
else if ( ht > 200 ) hcolor = Font.CR_PURPLE;
else if ( ht > 100 ) hcolor = Font.CR_CYAN;
Screen.DrawText(mTewiFont.mFont,hcolor,margin+108,ss.y-(margin+15),String.Format("%3d",clamp(ht,0,999)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( isInvulnerable() || CPlayer.mo.FindInventory("InvinciballPower") )
{
Screen.DrawTexture(HealthTex[4],false,margin+2,ss.y-(margin+14),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
hcolor = Font.CR_WHITE;
}
else
{
Screen.DrawTexture(HealthTex[0],false,margin+2,ss.y-(margin+14),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
if ( ht > 100 )
{
hw = min(ht-100,100);
Screen.DrawTexture(HealthTex[1],false,margin+2,ss.y-(margin+14),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
}
if ( ht > 200 )
{
hw = min(ht-200,300)/3.;
Screen.DrawTexture(HealthTex[2],false,margin+2,ss.y-(margin+14),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
}
if ( ht > 500 )
{
hw = min(ht-500,500)/5.;
Screen.DrawTexture(HealthTex[3],false,margin+2,ss.y-(margin+14),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw);
}
}
if ( CPlayer.mo.FindInventory("DivineSpriteEffect") )
{
double falph = clamp((ht-1000)/6000.,0.,1.);
Screen.DrawTexture(HealthTex[5],false,margin+2,ss.y-(margin+14),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,falph,DTA_LegacyRenderStyle,STYLE_Add);
String tst;
double alph = .1;
int trl = 9;
for ( double alph = .1; alph <= 1.; alph += .1 )
{
tst = "AAA";
SWWMUtility.ObscureText(tst,(gametic-trl)/3);
trl--;
Screen.DrawText(mTewiFont.mFont,Font.CR_WHITE,margin+108,ss.y-(margin+15),tst,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,falph*alph,DTA_LegacyRenderStyle,STYLE_Add);
}
Screen.DrawText(mTewiFont.mFont,hcolor,margin+108,ss.y-(margin+15),String.Format("%3d",clamp(ht,0,999)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,1.-falph);
}
else Screen.DrawText(mTewiFont.mFont,hcolor,margin+108,ss.y-(margin+15),String.Format("%3d",clamp(ht,0,999)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
private void DrawPickups()

View file

@ -18,22 +18,21 @@ Class SWWMShellAmmoSmall : SWWMAmmoSpawner
{
/*if ( Random[Replacements](0,1) && (notondemand || SWWMUtility.ItemExists('PuntzerBeta') || SWWMUtility.ItemExists('PuntzerGamma')) )
return Random[Replacements](0,2)?'SMW05SmallAmmo':'SMW05BundleSpawn';*/
switch( Random[Replacements](0,9) )
switch( Random[Replacements](0,8) )
{
case 0:
case 1:
case 2:
case 3:
return 'RedShell';
case 3:
case 4:
case 5:
case 6:
return 'GreenShell';
case 6:
case 7:
case 8:
return 'PurpleShell';
}
// case 9
// case 8
return 'BlueShell';
}
}
@ -58,28 +57,27 @@ Class SWWMShellAmmoBig : SWWMAmmoSpawner
case 2:
case 3:
case 4:
case 5:
return redpool[Random[Replacements](0,2)];
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
return greenpool[Random[Replacements](0,2)];
case 10:
case 11:
case 12:
case 13:
case 14:
return purplepool[Random[Replacements](0,2)];
case 14:
case 15:
case 16:
case 17:
return bluepool[Random[Replacements](0,2)];
case 17:
case 18:
case 19:
return whitepool[Random[Replacements](0,1)];
}
// case 20
// case 19-20
return 'BlackShell';
}
}
@ -122,6 +120,7 @@ Class SWWMRocketAmmoSmall : SWWMAmmoSpawner
static Class<Actor> PickAmmo( bool notondemand = false )
{
/*if ( Random[Replacements](0,1) && (notondemand || SWWMUtility.ItemExists('ModernSparkster')) ) return Random[Replacements](0,2)?'SparksterBAmmo':'SparksterRAmmo';*/
/*if ( Random[Replacements](0,1) && (notondemand || SWWMUtility.ItemExists('Quadravol')) ) return 'QuadravolAmmo';*/
return Random[Replacements](0,2)?'HellblazerMissiles':'HellblazerCrackshots';
}
@ -132,6 +131,8 @@ Class SWWMRocketAmmoBig : SWWMAmmoSpawner
static Class<Actor> PickAmmo( bool notondemand = false )
{
/*if ( Random[Replacements](0,1) && (notondemand || SWWMUtility.ItemExists('ModernSparkster')) )
return Random[Replacements](0,2)?'SparksterAmmoBundleSpawn':'SparksterBigAmmoBundleSpawn';*/
/*if ( Random[Replacements](0,1) && (notondemand || SWWMUtility.ItemExists('Quadravol')) )
return Random[Replacements](0,2)?'QuadravolAmmo':'QuadravolAmmoBundleSpawn';*/
switch ( Random[Replacements](0,11) )
@ -166,6 +167,7 @@ Class SWWMCellAmmoSmall : SWWMAmmoSpawner
{
if ( !Random[Replacements](0,3) )
{
/*if ( !Random[Replacements](0,2) && (notondemand || SWWMUtility.ItemExists('MisterRifle')) ) return 'MisterGAmmo';*/
/*if ( Random[Replacements](0,1) && (notondemand || SWWMUtility.ItemExists('RayKhom')) ) return 'RayBolt';*/
if ( notondemand || SWWMUtility.ItemExists('CandyGun') ) return 'CandyGunBullets';
}
@ -185,6 +187,7 @@ Class SWWMCellAmmoBig : SWWMAmmoSpawner
/*if ( Random[Replacements](0,1) )
{
if ( !Random[Replacements](0,2) && (notondemand || SWWMUtility.ItemExists('EMPCarbine')) ) return Random[Replacements](0,3)?'EMPCoreBundleSpawn':'EMPCore';
if ( Random[Replacements](0,1) && (notondemand || SWWMUtility.ItemExists('MisterRifle')) ) return Random[Replacements](0,2)?'MisterRoundBundleSpawn':'MisterAmmo';
if ( notondemand || SWWMUtility.ItemExists('RayKhom') ) return Random[Replacements](0,2)?'RayBoltBundleSpawn':'RayAmmo';
}*/
if ( !Random[Replacements](0,2) && (notondemand || SWWMUtility.ItemExists('SilverBullet')) )

View file

@ -194,7 +194,6 @@ Class MothPlushy : SWWMCollectible
{
Tag "$T_MOTHPLUSH";
Inventory.PickupMessage "$T_MOTHPLUSH";
SWWMCollectible.Availability AVAIL_None;
SWWMCollectible.GestureWeapon "MothPlushyGesture";
Stamina 7000;
}
@ -205,7 +204,6 @@ Class AA12Model : SWWMCollectible
{
Tag "$T_AA12";
Inventory.PickupMessage "$T_AA12";
SWWMCollectible.Availability AVAIL_None;
SWWMCollectible.GestureWeapon "AA12ModelGesture";
Stamina 10000;
}
@ -216,7 +214,6 @@ Class CactusHege : SWWMCollectible
{
Tag "$T_HEGE";
Inventory.PickupMessage "$T_HEGE";
SWWMCollectible.Availability AVAIL_None;
SWWMCollectible.GestureWeapon "CactusHegeGesture";
Stamina 3000;
}
@ -227,7 +224,6 @@ Class TastyHoagie : SWWMCollectible
{
Tag "$T_HOAGIE";
Inventory.PickupMessage "$T_HOAGIE";
SWWMCollectible.Availability AVAIL_None;
SWWMCollectible.GestureWeapon "TastyHoagieGesture";
Stamina 2000;
}
@ -238,7 +234,6 @@ Class IbukiMilk : SWWMCollectible
{
Tag "$T_IBUKIMILK";
Inventory.PickupMessage "$T_IBUKIMILK";
SWWMCollectible.Availability AVAIL_None;
SWWMCollectible.GestureWeapon "IbukiMilkGesture";
Stamina 800;
}
@ -249,7 +244,6 @@ Class BRCAlbum : SWWMCollectible
{
Tag "$T_BRCALBUM";
Inventory.PickupMessage "$T_BRCALBUM";
SWWMCollectible.Availability AVAIL_None;
SWWMCollectible.GestureWeapon "BRCAlbumGesture";
Stamina 4000;
}
@ -274,7 +268,7 @@ Class Manarokou : SWWMCollectible
{
Tag "$T_MANAROKOU";
Inventory.PickupMessage "$T_MANAROKOU";
SWWMCollectible.Availability AVAIL_None;
SWWMCollectible.Availability AVAIL_Heretic;
SWWMCollectible.GestureWeapon "ManarokouGesture";
Stamina 9000;
}
@ -285,7 +279,7 @@ Class LithiumNovel : SWWMCollectible
{
Tag "$T_LITHIUM";
Inventory.PickupMessage "$T_LITHIUM";
SWWMCollectible.Availability AVAIL_None;
SWWMCollectible.Availability AVAIL_Heretic;
SWWMCollectible.GestureWeapon "LithiumNovelGesture";
Stamina 2000;
}
@ -349,7 +343,7 @@ Class Psykkonovexx : SWWMCollectible
{
Tag "$T_PSYKKONOVEXX";
Inventory.PickupMessage "$T_PSYKKONOVEXX";
SWWMCollectible.Availability AVAIL_None;
SWWMCollectible.Availability AVAIL_Hexen;
SWWMCollectible.GestureWeapon "PsykkonovexxGesture";
Stamina 15000;
}

View file

@ -723,13 +723,31 @@ Class ChanceboxSpawner : Actor
return;
}
int numbox = 0;
let ti = ThinkerIterator.Create("ChanceboxSpawner");
ThinkerIterator ti = ThinkerIterator.Create("Chancebox");
while ( ti.Next() ) numbox++;
ti = ThinkerIterator.Create("Chancebox");
while ( ti.Next() ) numbox++;
if ( numbox > 3 )
if ( numbox >= 3 )
{
// there's three boxes in the map already (plus ourselves)
// there's three boxes in the map already
Destroy();
return;
}
BlockLinesIterator bl = BlockLinesIterator.CreateFromPos(pos,32,32,CurSector);
double tbox[4];
// top, bottom, left, right
tbox[0] = pos.y+32;
tbox[1] = pos.y-32;
tbox[2] = pos.x-32;
tbox[3] = pos.x+32;
while ( bl.Next() )
{
Line l = bl.CurLine;
if ( !l ) continue;
if ( tbox[2] > l.bbox[3] ) continue;
if ( tbox[3] < l.bbox[2] ) continue;
if ( tbox[0] < l.bbox[1] ) continue;
if ( tbox[1] > l.bbox[0] ) continue;
if ( SWWMUtility.BoxOnLineSide(tbox[0],tbox[1],tbox[2],tbox[3],l) != -1 ) continue;
// there isn't enough space to spawn a box here
Destroy();
return;
}

View file

@ -1970,7 +1970,7 @@ Class SWWMLamp : Inventory
bActive = false;
bActivated = false;
}
clearscope bool isBlinking()
clearscope bool isBlinking() const
{
return ( (Charge < 10) && (level.maptime&8) );
}
@ -2970,3 +2970,548 @@ Class MykradvoX2 : GhostArtifactX
Stop;
}
}
// 1.1 extra items
Class SafetyTether : Inventory
{
Mixin SWWMAutoUseFix;
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
Default
{
//$Title Safety Tether
//$Group Powerups
//$Sprite graphics/HUD/Icons/I_Safety.png
//$Icon powerup
Tag "$T_SAFETY";
Stamina 160000;
Inventory.Icon "graphics/HUD/Icons/I_Safety.png";
Inventory.PickupSound "misc/p_pkup";
Inventory.UseSound "powerup/safety";
Inventory.PickupMessage "$T_SAFETY";
Inventory.MaxAmount 5;
Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMPurplePickupFlash";
+INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR;
+COUNTITEM;
+INVENTORY.BIGPOWERUP;
+FLOATBOB;
FloatBobStrength 0.25;
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}
Class AngeryLight : PointLightAttenuated
{
Default
{
Args 224,0,255,80;
}
override void Tick()
{
Super.Tick();
if ( !target || !master )
{
Destroy();
return;
}
if ( target.player )
SetOrigin(target.Vec2OffsetZ(0,0,target.player.viewz),true);
else SetOrigin(target.Vec3Offset(0,0,target.height/2),true);
args[LIGHT_INTENSITY] = Random[Invinciball](10,12)*8;
bDORMANT = Powerup(master).isBlinking();
}
}
Class AngerySnd : Actor
{
Default
{
+NOBLOCKMAP;
+NOGRAVITY;
+NOINTERACTION;
}
override void Tick()
{
if ( !target || !master )
{
Destroy();
return;
}
SetOrigin(target.pos,true);
if ( players[consoleplayer].Camera == target )
{
A_SoundVolume(CHAN_VOICE,0.);
A_SoundVolume(CHAN_7,.5);
}
else
{
A_SoundVolume(CHAN_VOICE,.4);
A_SoundVolume(CHAN_7,0.);
}
}
override void PostBeginPlay()
{
Super.PostBeginPlay();
A_StartSound("powerup/devastationact",CHAN_VOICE,CHANF_LOOP,.4,1.5);
A_StartSound("powerup/devastationact",CHAN_7,CHANF_LOOP,.5,ATTN_NONE);
}
override void OnDestroy()
{
Super.OnDestroy();
A_StopSound(CHAN_VOICE);
A_StopSound(CHAN_7);
}
}
Class AngeryPower : Powerup
{
Actor l, snd;
int lasteffect;
Default
{
Powerup.Duration -20;
Inventory.Icon "graphics/HUD/Icons/I_Devastation.png";
Powerup.Color "C0 00 FF", 0.2;
+INVENTORY.ADDITIVETIME;
}
override void InitEffect()
{
Super.InitEffect();
if ( !Owner ) return;
Owner.A_AlertMonsters(swwm_uncapalert?0:5000);
SWWMHandler.DoFlash(Owner,Color(64,224,0,255),30);
Owner.A_QuakeEx(8,8,8,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:1.);
lasteffect = int.min;
if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= .95;
l = Spawn("AngeryLight",Owner.pos);
l.target = Owner;
l.master = self;
}
override void DoEffect()
{
Super.DoEffect();
if ( !Owner ) return;
if ( !snd ) snd = Spawn("AngerySnd",Owner.pos);
snd.target = Owner;
snd.master = self;
}
override void EndEffect()
{
Super.EndEffect();
if ( !Owner ) return;
Owner.A_StartSound("powerup/devastationend",CHAN_ITEMEXTRA);
SWWMHandler.DoFlash(Owner,Color(128,224,0,255),30);
Owner.A_QuakeEx(4,4,4,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:1.);
Owner.A_AlertMonsters(2000);
if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= .9;
if ( (EffectTics <= 0) && Owner && Owner.CheckLocalView() ) Console.Printf(StringTable.Localize("$D_DEVASTATION"));
}
void DoHitFX()
{
if ( level.maptime <= lasteffect+5 ) return;
Owner.A_AlertMonsters(swwm_uncapalert?0:5000);
SWWMHandler.DoFlash(Owner,Color(64,224,0,255),10);
Owner.A_QuakeEx(8,8,8,Random[Rage](3,8),0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:1.);
Owner.A_StartSound("powerup/devastationhit",CHAN_POWERUP);
lasteffect = level.maptime;
if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= .9;
}
override void ModifyDamage( int damage, Name damageType, out int newdamage, bool passive, Actor inflictor, Actor source, int flags )
{
if ( passive || (damage <= 0) ) return;
// (2^31-1)/25 : guarantee that it caps rather than overflowing
if ( damage > 85899345 ) newdamage = int.max;
else newdamage = damage*25;
DoHitFX();
}
}
Class AngerySigil : Inventory
{
Mixin SWWMAutoUseFix;
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
override bool Use( bool pickup )
{
if ( pickup && !deathmatch ) return false;
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA);
SWWMUtility.AchievementProgressInc('swwm_progress_deva',1,Owner.player);
let r = AngeryPower(Owner.FindInventory("AngeryPower"));
if ( r )
{
r.EffectTics += r.default.EffectTics;
SWWMHandler.DoFlash(Owner,Color(64,224,0,255),30);
Owner.A_QuakeEx(8,8,8,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:1.);
if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= .95;
}
else Owner.GiveInventory("AngeryPower",1);
return true;
}
override void Travelled()
{
Super.Travelled();
if ( !tracer )
{
tracer = Spawn("AngerySigilX",pos);
tracer.angle = angle;
tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase;
}
}
override void PostBeginPlay()
{
Super.PostBeginPlay();
tracer = Spawn("AngerySigilX",pos);
tracer.angle = angle;
tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase;
}
Default
{
//$Title Devastation Sigil
//$Group Powerups
//$Sprite graphics/HUD/Icons/I_Devastation.png
//$Icon powerup
Tag "$T_DEVASTATION";
Stamina 1500000;
Inventory.Icon "graphics/HUD/Icons/I_Devastation.png";
Inventory.PickupSound "misc/p_pkup";
Inventory.UseSound "powerup/devastation";
Inventory.PickupMessage "$T_DEVASTATION";
Inventory.MaxAmount 5;
Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMPurplePickupFlash";
+INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR;
+COUNTITEM;
+INVENTORY.BIGPOWERUP;
+FLOATBOB;
FloatBobStrength 0.25;
Radius 8;
Height 28;
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}
Class AngerySigilX : GhostArtifactX
{
Default
{
Scale .5;
Alpha .35;
RenderStyle "Subtract";
+FORCEXYBILLBOARD;
}
override void PostBeginPlay()
{
Super.PostBeginPlay();
A_StartSound("powerup/devastationamb",CHAN_VOICE,CHANF_LOOP);
}
override void Tick()
{
if ( !target )
{
Destroy();
return;
}
prev = target.prev+(0,0,20);
vel = target.vel;
if ( (target.pos != pos+(0,0,20)) || (target.vel != (0,0,0)) ) SetOrigin(target.pos+(0,0,20)+vel,true);
if ( angle != target.angle ) A_SetAngle(target.angle,SPF_INTERPOLATE);
FloatBobPhase = target.FloatBobPhase;
if ( !bsprite ) bsprite = GetSpriteIndex('XZW1');
bInvisible = target.bInvisible||(target.sprite!=bsprite);
SetState(SpawnState+bInvisible);
A_SoundVolume(CHAN_VOICE,bInvisible?0.:1.);
}
States
{
Spawn:
BLPS C -1 Bright;
TNT1 A -1;
Stop;
}
}
Class DivineSpriteLight : PointLightAttenuated
{
Default
{
Args 255,255,255,100;
}
override void Tick()
{
Super.Tick();
if ( !target || !master )
{
Destroy();
return;
}
if ( target.player )
SetOrigin(target.Vec2OffsetZ(0,0,target.player.viewz),true);
else SetOrigin(target.Vec3Offset(0,0,target.height/2),true);
double vol = clamp((target.Health-1000)/6000.,0.,1.);
int lv = clamp(int(vol*255),0,255);
args[LIGHT_RED] = lv;
args[LIGHT_GREEN] = lv;
args[LIGHT_BLUE] = lv;
args[LIGHT_INTENSITY] = Random[Invinciball](10,12)*10;
}
}
Class DivineSpriteSnd : Actor
{
Default
{
+NOBLOCKMAP;
+NOGRAVITY;
+NOINTERACTION;
}
override void Tick()
{
if ( !target || !master )
{
Destroy();
return;
}
SetOrigin(target.pos,true);
double vol = clamp((target.Health-1000)/6000.,0.,1.);
if ( players[consoleplayer].Camera == target )
{
A_SoundVolume(CHAN_VOICE,0.);
A_SoundVolume(CHAN_7,.8*vol);
}
else
{
A_SoundVolume(CHAN_VOICE,.4*vol);
A_SoundVolume(CHAN_7,0.);
}
}
override void PostBeginPlay()
{
Super.PostBeginPlay();
double vol = target?clamp((target.Health-1000)/9000.,0.,1.):.1;
A_StartSound("powerup/divineact",CHAN_VOICE,CHANF_LOOP,.4*vol,1.5);
A_StartSound("powerup/divineact",CHAN_7,CHANF_LOOP,.8*vol,ATTN_NONE);
}
override void OnDestroy()
{
Super.OnDestroy();
A_StopSound(CHAN_VOICE);
A_StopSound(CHAN_7);
}
}
Class DivineSpriteEffect : Inventory
{
int healcnt;
int healtim;
bool bHealDone;
Actor l, snd;
Property HealTimer : healtim;
default
{
Inventory.Icon "graphics/HUD/Icons/I_Divine.png";
DivineSpriteEffect.HealTimer 1050;
+INVENTORY.UNDROPPABLE;
+INVENTORY.UNTOSSABLE;
}
clearscope bool isBlinking() const
{
return ( (healtim <= BLINKTHRESHOLD) && (healtim&8) );
}
override void Travelled()
{
Super.Travelled();
bHealDone = true;
}
override void DoEffect()
{
Super.DoEffect();
if ( !l ) l = Spawn("DivineSpriteLight",Owner.pos);
l.target = Owner;
l.master = self;
if ( !snd ) snd = Spawn("DivineSpriteSnd",Owner.pos);
snd.target = Owner;
snd.master = self;
int numpt = Random[ExploS](5,10);
double alph = clamp((Owner.Health-1000.)/6000.,0.,1.);
double scl = clamp((Owner.Health-1000.)/6000.,2.,4.);
for ( int i=0; i<numpt; i++ )
{
double ang = FRandom[ExploS](0,360);
double pt = FRandom[ExploS](-90,90);
double dst = FRandom[ExploS](.25,.75)*Owner.height;
Vector3 dir = (cos(ang)*cos(pt),sin(ang)*cos(pt),-sin(pt));
Vector3 ppos = Owner.Vec3offset(0,0,Owner.height/2)+dir*dst;
A_SpawnParticle("White",SPF_FULLBRIGHT,30,scl,0,ppos.x,ppos.y,ppos.z,dir.x*.2,dir.y*.2,dir.z*.2,0,0,.05,alph,-1,-scl/30.);
}
if ( bHealDone )
{
if ( Owner.Health <= 1000 ) DepleteOrDestroy();
return;
}
healcnt++;
healtim--;
if ( healtim <= 0 )
{
Owner.A_StartSound("powerup/divineend",CHAN_ITEMEXTRA);
SWWMHandler.DoFlash(Owner,Color(80,255,255,255),40);
if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= 0.95;
bHealDone = true;
}
else if ( Owner.Health < 1000 )
{
healcnt = 0;
Owner.GiveBody(1000,1000);
SWWMScoreObj.Spawn(1000,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2),ST_Health);
SWWMHandler.DoFlash(Owner,Color(40,255,255,255),20);
if ( Owner is 'Demolitionist' )
Demolitionist(Owner).lastbump *= 0.97;
}
else if ( !(healcnt%3) )
{
Owner.GiveBody(100,10000);
SWWMScoreObj.Spawn(100,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2),ST_Health);
SWWMHandler.DoFlash(Owner,Color(10,255,255,255),5);
}
}
}
Class DivineSprite : Inventory
{
Mixin SWWMAutoUseFix;
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
override bool Use( bool pickup )
{
// never get auto-used on pickup unless we're in deathmatch
if ( pickup && !deathmatch ) return false;
let p = Owner.FindInventory("DivineSpriteEffect");
if ( p ) return false;
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA);
Owner.GiveInventory("DivineSpriteEffect",1);
SWWMUtility.AchievementProgressInc('swwm_progress_divine',1,Owner.player);
return true;
}
override void Travelled()
{
Super.Travelled();
if ( !tracer )
{
tracer = Spawn("DivineSpriteX",pos);
tracer.angle = angle;
tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase;
}
}
override void PostBeginPlay()
{
Super.PostBeginPlay();
tracer = Spawn("DivineSpriteX",pos);
tracer.angle = angle;
tracer.target = self;
tracer.FloatBobPhase = FloatBobPhase;
}
Default
{
//$Title Divine Sprite
//$Group Powerups
//$Sprite graphics/HUD/Icons/I_Divine.png
//$Icon powerup
Tag "$T_DIVINE";
Stamina 3600000;
Inventory.Icon "graphics/HUD/Icons/I_Divine.png";
Inventory.PickupSound "misc/p_pkup";
Inventory.UseSound "powerup/divineuse";
Inventory.PickupMessage "$T_DIVINE";
Inventory.MaxAmount 5;
Inventory.InterHubAmount 5;
Inventory.PickupFlash "SWWMPurplePickupFlash";
+INVENTORY.ALWAYSPICKUP;
+INVENTORY.AUTOACTIVATE;
+INVENTORY.INVBAR;
+COUNTITEM;
+INVENTORY.BIGPOWERUP;
+FLOATBOB;
FloatBobStrength 0.25;
Radius 8;
Height 24;
}
States
{
Spawn:
XZW1 A -1;
Stop;
}
}
Class DivineSpriteX : GhostArtifactX
{
Default
{
Scale .5;
+FORCEXYBILLBOARD;
}
override void PostBeginPlay()
{
Super.PostBeginPlay();
A_StartSound("powerup/divineamb",CHAN_VOICE,CHANF_LOOP);
}
override void Tick()
{
if ( !target )
{
Destroy();
return;
}
prev = target.prev+(0,0,16);
vel = target.vel;
if ( (target.pos != pos+(0,0,16)) || (target.vel != (0,0,0)) ) SetOrigin(target.pos+(0,0,16)+vel,true);
if ( angle != target.angle ) A_SetAngle(target.angle,SPF_INTERPOLATE);
FloatBobPhase = target.FloatBobPhase;
if ( !bsprite ) bsprite = GetSpriteIndex('XZW1');
bInvisible = target.bInvisible||(target.sprite!=bsprite);
SetState(SpawnState+bInvisible);
A_SoundVolume(CHAN_VOICE,bInvisible?0.:1.);
}
States
{
Spawn:
DVSP A -1 Bright;
TNT1 A -1;
Stop;
}
}

View file

@ -2332,8 +2332,8 @@ Class DemolitionistMenu : GenericMenu
if ( type is 'SWWMCollectible' ) continue;
// no barriers outside doom
if ( !(gameinfo.gametype&GAME_DOOM) && (type is 'EBarrier') ) continue;
// no gravity outside raven
if ( !(gameinfo.gametype&GAME_RAVEN) && (type is 'GravitySuppressor') ) continue;
// no gravity/tether outside raven
if ( !(gameinfo.gametype&GAME_RAVEN) && ((type is 'GravitySuppressor') || (type is 'SafetyTether')) ) continue;
// can't sell candygun spares
if ( sub && (type is 'CandyGunSpares') ) continue;
let cur = players[consoleplayer].mo.FindInventory(type);

View file

@ -121,10 +121,11 @@ Class SWWMStatScreen : StatusScreen abstract
{
// skip DLC tips for now
if ( (i >= 59) && (i <= 68) ) continue;
if ( (i >= 130) && (i <= 139) ) continue;
ents.Push(i);
}
// account for skipped dlc tips (important, will crash otherwise)
maxtip -= 10;
maxtip -= 20;
if ( pdata.lasttip.Size() >= maxtip )
{
// exclude last one, start over

View file

@ -345,8 +345,8 @@ Class Demolitionist : PlayerPawn
if ( !(gameinfo.gametype&GAME_HEXEN) && (type is 'AmmoFabricator') ) continue;
// no barriers outside doom
if ( !(gameinfo.gametype&GAME_DOOM) && (type is 'EBarrier') ) continue;
// no gravity outside raven
if ( !(gameinfo.gametype&GAME_RAVEN) && (type is 'GravitySuppressor') ) continue;
// no gravity/tether outside raven
if ( !(gameinfo.gametype&GAME_RAVEN) && ((type is 'GravitySuppressor') || (type is 'SafetyTether')) ) continue;
// Don't give maxed items
let owned = FindInventory(type);
if ( owned && (owned.Amount >= owned.MaxAmount) ) continue;
@ -878,10 +878,18 @@ Class Demolitionist : PlayerPawn
if ( healcooldown > 0 ) healcooldown--;
else
{
if ( health > 500 )
if ( health > 1000 )
{
let spr = DivineSpriteEffect(FindInventory("DivineSpriteEffect"));
if ( !spr || spr.bHealDone )
A_SetHealth(max(1000,health-10));
if ( health <= 1000 ) healcooldown = 40;
}
else if ( health > 500 )
{
if ( !FindInventory("GrilledCheeseSafeguard") && !(healtimer%5) )
A_SetHealth(health-1);
if ( health <= 500 ) healcooldown = 20;
}
else if ( health > 200 )
{

View file

@ -1538,6 +1538,7 @@ Class SWWMUtility
if ( StringTable.Localize("$SWWM_SELLEXTRA_FEM") == "SWWM_SELLEXTRA_FEM" )
return false;
if ( i is 'DeepImpact' ) return true;
if ( i is 'FistGun' ) return true;
if ( i is 'ExplodiumGun' ) return true;
if ( i is 'Wallbuster' ) return true;
if ( i is 'HeavyMahSheenGun' ) return true;
@ -1547,6 +1548,7 @@ Class SWWMUtility
if ( i is 'CandyGun' ) return true;
if ( i is 'RayKhom' ) return true;
if ( i is 'GrandLance' ) return true;
if ( i is 'RayKhom' ) return true;
if ( i is 'HealthNuggetItem' ) return true;
if ( i is 'ArmorNuggetItem' ) return true;
if ( i is 'WarArmor' ) return true;
@ -1651,11 +1653,11 @@ Class SWWMUtility
return true;
if ( target is 'SWWMCollectible' )
return true;
if ( (target is 'Ynykron') || (target is 'GrandLance') )
if ( (target is 'Ynykron') || (target is 'GrandLance') || (target is 'RayKhom') )
return true;
if ( (target is 'GoldShell') || (target is 'YnykronAmmo') || (target is 'GrandAmmo') || (target is 'GrandSpear') )
if ( (target is 'GoldShell') || (target is 'YnykronAmmo') || (target is 'GrandAmmo') || (target is 'GrandSpear') || (target is 'UltimatePod') || (target is 'UltimateAmmo') )
return true;
if ( target is 'Mykradvo' )
if ( (target is 'Mykradvo') || (target is 'AngerySigil') || (target is 'DivineSprite') )
return true;
if ( target is 'PuzzleItem' )
return true;
@ -1735,12 +1737,20 @@ Class SWWMUtility
if ( CheckNeedsItem(b) ) return b;
return Random[Replacements](weight,0)?a:b;
}
static private Class<Inventory> PickTrio( Class<Inventory> a, Class<Inventory> b, Class<Inventory> c, int weight1 = 1, int weight2 = 1 )
{
if ( CheckNeedsItem(a) ) return a;
if ( CheckNeedsItem(b) ) return b;
if ( CheckNeedsItem(c) ) return c;
return Random[Replacements](weight1,0)?a:Random[Replacements](weight2,0)?b:c;
}
static Class<Inventory> PickSWWMSlot1()
{
if ( CheckNeedsItem('ExplodiumGun',true) && Random[Replacements](0,1) ) return 'ExplodiumGun';
/*if ( CheckNeedsItem('PlasmaBlast',true) && Random[Replacements](0,1) ) return 'PlasmaBlast';
return PickPair('PusherWeapon','ItamexHammer');*/
//if ( CheckNeedsItem('PlasmaBlast',true) && Random[Replacements](0,1) ) return 'PlasmaBlast';
//return PickTrio('PusherWeapon','ItamexHammer','FistGun');
//return PickPair('PusherWeapon','ItamexHammer');
return 'PusherWeapon';
}
static Class<Inventory> PickSWWMSlot2()
@ -1765,6 +1775,7 @@ Class SWWMUtility
}
static Class<Inventory> PickSWWMSlot6()
{
//return PickTrip('Hellblazer','Quadravol','ModernSparkster');
//return PickPair('Hellblazer','Quadravol');
return 'Hellblazer';
}
@ -1780,23 +1791,23 @@ Class SWWMUtility
}
static Class<Inventory> PickSWWMSlot9()
{
//return PickTrio('CandyGun','RayKhom','MisterRifle');
//return PickPair('CandyGun','RayKhom');
return 'CandyGun';
}
static Class<Inventory> PickSWWMSlot0()
{
//return PickTrio('Ynykron','GrandLance','RafanKos');
//return PickPair('Ynykron','GrandLance');
return 'Ynykron';
}
static Class<Inventory> PickDoomSlot6()
{
//return PickPair(PickSWWMSlot7(),PickSWWMSlot8(),2);
return PickPair('Sparkster','SilverBullet',2);
return PickPair(PickSWWMSlot7(),PickSWWMSlot8(),2);
}
static Class<Inventory> PickDoomSlot7()
{
//return PickPair(PickSWWMSlot9(),PickSWWMSlot0(),2);
return PickPair('CandyGun','Ynykron',2);
return PickPair(PickSWWMSlot9(),PickSWWMSlot0(),2);
}
static Class<Inventory> PickHereticSlot3() // also used for Doom 1
{