• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Phoenix Bug

Status
Not open for further replies.
Level 4
Joined
Apr 29, 2019
Messages
41
There is a bug even in WC3 base game where Phoenix can become immortal at 1 HP. It has a very low chance to happen in ladder, but happens a lot in my custom map where degen is higher which I guess gives it a higher chance to occur.

I tried to fix this by using a trigger:

Event: A unit is attacked
Conditions: Life of (Attacked unit) Equal to 1.00
Actions: Unit - Kill (Attacked unit)

This does not fix the bug. Any other ideas?
 
Level 13
Joined
May 10, 2009
Messages
868
Wow, I thought Blizzard had fixed this old ass bug by now.

IIRC, the phoenix bug occurs while it's stunned, is ordered to do something else and finally receives "lethal" damage. Set its life to: current life + 1., then set it back to current life once it's attacked/takes damage. Then, the phoenix should be dead.
 
Level 4
Joined
Apr 29, 2019
Messages
41
Wow, I thought Blizzard had fixed this old ass bug by now.

IIRC, the phoenix bug occurs while it's stunned, is ordered to do something else and finally receives "lethal" damage. Set its life to: current life + 1., then set it back to current life once it's attacked/takes damage. Then, the phoenix should be dead.

That would make sense because there is a lot of stunning in my map. Thanks I'll try it.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
What do you mean by trigger the phoenix effect? Instead of degen on the unit, just make a trigger that degens it?
I mean you code the Phoenix egg stuff yourself. The degen is just negative Life Regeneration which you can adjust in the Object Editor.
  • Phoenix Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Phoenix
    • Actions
      • Set VariableSet Phx_Point = (Position of (Triggering unit))
      • Unit - Create 1 Phoenix Egg for (Owner of (Triggering unit)) at Phx_Point facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap.
      • Unit - Add a 5.01 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Phx_Point)
  • Phoenix Egg Hatches
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Phoenix Hatch (Custom)
    • Actions
      • Set VariableSet Phx_Point = (Position of (Triggering unit))
      • Unit - Create 1 Phoenix for (Owner of (Triggering unit)) at Phx_Point facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_Phx_Point)
      • Unit - Kill (Triggering unit)
The only issue with this is that some of the cool birth/death animations are missing. Also, some of the timings might be off as well.
Anyway, how it works:
1) I removed the Phoenix Morphing (Egg Related) ability from both the Phoenix and the Phoenix Egg units.
2) I added the "alternate" animation tag to the Phoenix Egg in the Object Editor (Art - Required Animation Names: alternate) --- this makes the Phoenix Egg play it's Egg animations.
3) I created and gave the Phoenix Egg a hidden ability that has a 5.00 second cast time (based on Channel).
4) When the Phoenix dies, I create an Egg at it's position, add an expiration timer to it (the blue bar that shows up on summoned units) that's just a hair longer than the cast time of the ability, and order it to cast the ability.
5) When the Phoenix Egg manages to cast the ability (5.00 seconds of casting time has passed), I kill it and create a Phoenix at it's position.

The cycle then continues on and on until the Egg is destroyed.

Note: You can adjust it so it's not 5.00 seconds. Just change the cast time of the ability in the object editor to your desired value, and then adjust the triggers accordingly.
 

Attachments

  • Phoenix Example.w3m
    16.9 KB · Views: 19
Last edited:
Level 4
Joined
Apr 29, 2019
Messages
41
It might not have 1 HP. It could have less than 1 HP with the UI limited to reporting it as 1. Hence the comparison of life equals to approximately 1.00 might fail.

Unfortunately wasn't it, as I changed it to be <=2 instead of =1 and it still happened.

I mean you code the Phoenix egg stuff yourself. The degen is just negative Life Regeneration which you can adjust in the Object Editor.
  • Phoenix Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Phoenix
    • Actions
      • Set VariableSet Phx_Point = (Position of (Triggering unit))
      • Unit - Create 1 Phoenix Egg for (Owner of (Triggering unit)) at Phx_Point facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap.
      • Unit - Add a 5.01 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Phx_Point)
  • Phoenix Egg Hatches
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Phoenix Hatch (Custom)
    • Actions
      • Set VariableSet Phx_Point = (Position of (Triggering unit))
      • Unit - Create 1 Phoenix for (Owner of (Triggering unit)) at Phx_Point facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_Phx_Point)
      • Unit - Kill (Triggering unit)
The only issue with this is that some of the cool birth/death animations are missing. Also, some of the timings might be off as well.
Anyway, how it works:
1) I removed the Phoenix Morphing (Egg Related) ability from both the Phoenix and the Phoenix Egg units.
2) I added the "alternate" animation tag to the Phoenix Egg in the Object Editor (Art - Required Animation Names: alternate) --- this makes the Phoenix Egg play it's Egg animations.
3) I created and gave the Phoenix Egg a hidden ability that has a 5.00 second cast time (based on Channel).
4) When the Phoenix dies, I create an Egg at it's position, add an expiration timer to it (the blue bar that shows up on summoned units) that's just a hair longer than the cast time of the ability, and order it to cast the ability.
5) When the Phoenix Egg manages to cast the ability (5.00 seconds of casting time has passed), I kill it and create a Phoenix at it's position.

The cycle then continues on and on until the Egg is destroyed.

Note: You can adjust it so it's not 5.00 seconds. Just change the cast time of the ability in the object editor to your desired value, and then adjust the triggers accordingly.

Thanks a lot for writing this out. I'm going to try to exhaust all other options first, because the animals are cool, and, a natural solution would be simplest for map stability etc. But good to have this as a last resort. Thanks again.
 
Level 4
Joined
Apr 29, 2019
Messages
41
In case anyone curious, increasing its health to above 2 (or even above 500) then killing the unit didn't do it.

However this bug was fixed by using "remove from the game" instead of "killing" the phoenix. If unit attacked with health 2 or less, remove from the game. The bug seems to only prevent death.

It's fine that they don't get the egg, because the egg would die quickly under attack anyway.

Respawning from an egg away from enemies works normally.

Thanks for the ideas guys.
 
Status
Not open for further replies.
Top