Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Poke

Modifying Berserk Damage multiplier?

Question

Hello, I'm making a WAD and I am attempting to change the properties of the Berserk powerup. So far, I have managed to change the message and increase the health it gives, but how do I change the damage multiplier? Here's the DECORATE code I have so far.

ACTOR Berserk2ElectricBoogaloo : CustomInventory 30420
{
  SpawnID 211
  +COUNTITEM
  +INVENTORY.ALWAYSPICKUP
  Inventory.PickupMessage "Whatever"
  Inventory.PickupSound "misc/p_pkup"
  States
  {
  Spawn:
    PSTR A -1
    Stop
  Pickup:
    TNT1 A 0 A_GiveInventory("PowerStrength")
    TNT1 A 0 HealThing(200, 0)
    TNT1 A 0 A_SelectWeapon("Fist")
    Stop
  }
}

 

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

Alright, so I managed to figure it out!

I had to set the player to a custom class and give him a customized version of the Fist. Since the Fist isn't a weapon one can just "pick up" like, say, the Shotgun, defining it is rather simple, and could be done like so:

Actor CustomPuncher : DoomPlayer
{
	Player.StartItem "NewFist"
}
ACTOR Berserk2ElectricBoogaloo : CustomInventory 30420
{
  SpawnID 211
  +COUNTITEM
  +INVENTORY.ALWAYSPICKUP
  Inventory.PickupMessage "Whatever"
  Inventory.PickupSound "misc/p_pkup"
  States
  {
  Spawn:
    PSTR A -1
    Stop
  Pickup:
    TNT1 A 0 A_GiveInventory("PowerStrength")
    TNT1 A 0 HealThing(200, 200)
    TNT1 A 0 A_SelectWeapon("NewFist")
    Stop
  }
}
ACTOR NewFist : Fist
{
  States
  {
  Fire:
    PUNG B 4
    TNT1 A 0 A_JumpIfInventory("PowerStrength", 1, "Berserked")
  Normal:
    PUNG C 4 A_CustomPunch(2 * random(1, 10), TRUE)
    Goto FireEnd
  Berserked:
    PUNG C 4 A_CustomPunch(200 * random(1, 10), TRUE)
  FireEnd:
    PUNG D 5
    PUNG C 4
    PUNG B 5 A_ReFire
    Goto Ready
  }
}

This code essentially replaces the Berserk powerup with 100x strength rather than the normal 10x. However, a consequence of this solution is that one cannot use any other weapons, otherwise, their weapon is permanently going to be whatever they picked up. If possible, perhaps a custom state could be put in place so that "NewFist" could occupy the first weapon slot in conjunction with the Fist and Chainsaw. Is there any way to do that?

EDIT: Aaaaand all I had to do was add "Weapon.Slotnumber 1" to the NewFist code. Issue solved, now the new fist can be used with other weapons!

Edited by Poke

Share this post


Link to post
  • 1

The berserk powerup doesn't multiply damage, it's the fist weapon that deals more damage when the berserk is active. So in effect, you'd have to replace the fist. (And that's more complex than replacing monsters or other items that spawn in the map.)

 

Another possibility is to use a PowerDamage effect, but keep in mind that it will apply to every attack.

Share this post


Link to post
  • 0
28 minutes ago, Gez said:

The berserk powerup doesn't multiply damage, it's the fist weapon that deals more damage when the berserk is active. So in effect, you'd have to replace the fist. (And that's more complex than replacing monsters or other items that spawn in the map.)

 

Another possibility is to use a PowerDamage effect, but keep in mind that it will apply to every attack.

Ah, that's a... Strange way of working. Thanks for the answer, looks like I'll just have to make sure not to put in any other weapons in the map or use any enemies that drop weapons.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×