System Convert Phoenix Fire Damage to Damage Type

Sooda

Diversity enchants
Reaction score
318
Convert Phoenix Fire Damage System version 1.04

AceHart said:
The unit that has it doesn't even need to stop. It just happens.
"Battleships" would be the most famous map living from that one ability.
You can also add several to the same unit and they all work.
Tom Jones said:
Phoenix fire will automatically shot missiles at a target within range,
causing intial damage and damage over time. This system creates a sorta
controlled enviroment for the ability, making it possible to control
the damage it deals per shot, and which attack and damage type the shot
makes.
Thanks Rheias for pointing out that Phoenix Fire ability needs to be explaned.

Its main purpose is to give more
freedom when using abilities/ items based off of Phoenix Fire ability.
It is most accurate system up to date (03.06.2007). It gives in most
cases true result.

System specs:
MUI
Leak free
Optimized
Can convert any ammount of damage to any attack type, damage type with weapon type.
Enables to set min/ max damage done.
Can do area of effect damage (Can do also delayed area damage).
Gives bounty for kills.

Read map' s README for full instructions.
Screens:
convertphoenixdamagepicar4.jpg


Even when you could use as Phoenix Fire ability fireing rate 0.05 (Or even 0.01) I don' t suggest it. The game isn' t meant for such immense effects.
For older PC it drops FPS really badly (See my FPS 1.3 !). Don' t do it and use this system wisely.
convertphoenixdamagepiccl9.jpg


You will set damage type and attack type like this for Phoenix Fire abilities:
README said:
By giving examples you should learn its syntax in notime:

1.4 How do I determine damagetype, attacktype and weapon type ?

There are 3 variables for each one:
"pfDamageType[XX]" is for damage type number, it needs to be between
0 and 20. Where [XX] means index number of your Phoenix Fire Buff index
number, "pfBuff[index]". These indexes MUST be same for all damage settings !

LIST OF DAMAGE TYPES:
0 = DAMAGE_TYPE_UNKNOWN
1 = DAMAGE_TYPE_NORMAL
2 = DAMAGE_TYPE_ENHANCED
3 = DAMAGE_TYPE_FIRE
4 = DAMAGE_TYPE_COLD
5 = DAMAGE_TYPE_LIGHTNING
6 = DAMAGE_TYPE_POISON
7 = DAMAGE_TYPE_DISEASE
8 = DAMAGE_TYPE_DIVINE
9 = DAMAGE_TYPE_SONIC
10 = DAMAGE_TYPE_ACID
11 = DAMAGE_TYPE_FORCE
12 = DAMAGE_TYPE_DEATH
13 = DAMAGE_TYPE_MIND
14 = DAMAGE_TYPE_PLANT
15 = DAMAGE_TYPE_DEFENSIVE
16 = DAMAGE_TYPE_DEMOLITION
17 = DAMAGE_TYPE_SLOW_POISON
18 = DAMAGE_TYPE_SPIRIT_LINK
19 = DAMAGE_TYPE_SHADOW_STRIKE
20 = DAMAGE_TYPE_UNIVERSAL

"pfAttackType[XX]" is for attack type number, it needs to be between
0 and 6. Where [XX] means index number of your Phoenix Fire Buff index
number, "pfBuff[index]". These indexes MUST be same for all damage settings !

LIST OF ATTACK TYPES:

0 = ATTACK_TYPE_NORMAL
1 = ATTACK_TYPE_MELEE
2 = ATTACK_TYPE_PIERCE
3 = ATTACK_TYPE_SIEGE
4 = ATTACK_TYPE_MAGIC
5 = ATTACK_TYPE_CHAOS
6 = ATTACK_TYPE_HERO

"pfWeaponType[XX]" is for weapon type number, it needs to be between
0 and 23. Where [XX] means index number of your Phoenix Fire Buff index
number, "pfBuff[index]". These indexes MUST be same for all damage settings !

LIST OF WEAPON TYPES:

0 = WEAPON_TYPE_WHOKNOWS
1 = WEAPON_TYPE_AXE_MEDIUM_CHOP
2 = WEAPON_TYPE_CLAW_HEAVY_SLICE
3 = WEAPON_TYPE_CLAW_MEDIUM_SLICE
4 = WEAPON_TYPE_CLAW_LIGHT_SLICE
5 = WEPAON_TYPE_METAL_HEAVY_BASH
6 = WEAPON_TYPE_METAL_HEAVY_CHOP
7 = WEAPON_TYPE_METAL_HEAVY_SLICE
8 = WEAPON_TYPE_METAL_HEAVY_STAB
9 = WEAPON_TYPE_METAL_MEDIUM_BASH
10 = WEAPON_TYPE_METAL_MEDIUM_CHOP
11 = WEAPON_TYPE_METAL_MEDIUM_SLICE
12 = WEAPON_TYPE_METAL_MEDIUM_STAB
13 = WEAPON_TYPE_METAL_LIGHT_CHOP
14 = WEAPON_TYPE_METAL_LIGHT_SLICE
15 = WEAPON_TYPE_ROCK_HEAVY_BASH
16 = WEAPON_TYPE_WOOD_HEAVY_BASH
17 = WEAPON_TYPE_WOOD_HEAVY_SLICE
18 = WEAPON_TYPE_WOOD_MEDIUM_BASH
19 = WEAPON_TYPE_WOOD_MEDIUM_SLICE
20 = WEAPON_TYPE_WOOD_MEDIUM_STAB

21 = WEAPON_TYPE_WOOD_LIGHT_BASH
22 = WEAPON_TYPE_WOOD_LIGHT_SLICE
23 = WEAPON_TYPE_WOOD_LIGHT_STAB

1.4 How do I set damage of my Pheonix Fire ability ?

In Object Editor you just need to determine missile arc, speed. Use
as damage 0.00. Why so ? Because actual damage is taken from
"pfMinDamage" and "pfMaxDamage" real variables.

Don' t forget Phoenix Fire is spell and if unit is magic immune it
woun' t fire.

By giving examples you should learn its syntax in notime:

When you want to do damage between 55 - 75 with attack type as chaos and
damage type as universal you have to set these variables:
Keep in mind that these indexes MUST be all same.

"pfMinDamage[pfBuffIndex]" set to 55
"pfMaxDagame[pfBuffIndex]" set to 75
"pfAttackType[pfBuffIndex]" set to 5, it means chaos.
"pfDamageType[pfBuffIndex]" set to 20, it means universal.
"pfWeaponType[pfBuffIndex]" set to 0, it means whoknows, set it
always to 0 if you don' t want any additional sound to be played.
"pfHasAreaEffec[pfBuffIndex]" set to false, will ignore all fields what are
meant for area of effect.

In CPFD Initialization trigger it would look like this:
Lets asume it is your first Phoenix Fire ability what you want to convert then
"pfBuffIndex" equals with 1.

"pfMinDamage[1]" = 55
"pfMaxDagame[1]" = 75
"pfAttackType[1]" = 5
"pfDamageType[1]" = 20
"pfWeaponType[1]" = 0
"pfHasAreaEffec[1]" = false

When you want to do damage between 100 - 200 with attack type as siege and
damage type as normal with 600 area of effect damage you have to set these
variables:
Keep in mind that these indexes MUST be all same.

"pfMinDamage[pfBuffIndex]" set to 100
"pfMaxDagame[pfBuffIndex]" set to 200
"pfAttackType[pfBuffIndex]" set to 3, it means siege.
"pfDamageType[pfBuffIndex]" set to 1, it means normal.
"pfWeaponType[pfBuffIndex]" set to 0, it means whoknows, set it
always to 0 if you don' t want any additional sound to be played.
"pfHasAreaEffec[pfBuffIndex]" set to true
"pfDamageDelay[pfBuffIndex]" set to 0.00, if you don' t want to do any
delayed damage.
"pfDamageRadius[pfBuffIndex]" set to 300, keep in mind it' s radius not diameter.

In CPFD Initialization trigger it would look like this:
Lets asume it is your second Phoenix Fire ability what you want to convert then
"pfBuffIndex" equals with 2.

"pfMinDamage[2]" = 100
"pfMaxDagame[2]" = 200
"pfAttackType[2]" = 3
"pfDamageType[2]" = 1
"pfWeaponType[2]" = 0
"pfHasAreaEffec[2]" = true
"pfDamageDelay[2]" = 0.00
"pfDamageRadius[2]" = 300


When you want to do damage between 30 with attack type as melee and
damage type as acid you have to set these variables:
Keep in mind that these indexes MUST be all same.

"pfMinDamage[pfBuffIndex]" set to 30
"pfMaxDagame[pfBuffIndex]" set to 0, when Max damage is 0 it will use min value.
"pfAttackType[pfBuffIndex]" set to 1, it means melee.
"pfDamageType[pfBuffIndex]" set to 10, it means acid.
"pfWeaponType[pfBuffIndex]" set to 0, it means whoknows, set it
always to 0 if you don' t want any additional sound to be played.
"pfHasAreaEffec[pfBuffIndex]" set to false, will ignore all fields what are
meant for area of effect.

In CPFD Initialization trigger it would look like this:
Lets asume it is your third Phoenix Fire ability what you want to convert then
"pfBuffIndex" equals with 3.

"pfMinDamage[3]" = 55
"pfMaxDagame[3]" = 75
"pfAttackType[3]" = 5
"pfDamageType[3]" = 20
"pfWeaponType[3]" = 0
"pfHasAreaEffec[3]" = false

Lastly you would need to set up "pfBuff[Index]" also these are their damage
settings what we just set. So:
"pfBuff[1] = "someBuff1"
"pfBuff[2] = "someBuff2"
"pfBuff[3] = "someBuff3"
Where "someBuff1" or any of them are Phoenix Fire buffs from Object Editor
Buff Tab.
Don' t forget to set "pfMaxAbilities" to your max value of set buffs, in this
example it would be 3 so:
"pfMaxAbilities" = 3
It' s really simple and I hope you will learn it by testing or looking
my demo items.

1.4.1 How do I set Min/ Max Damage ?

If you want constant damage set only:
"pfMinDamage[Array_number_Of_Your_Buff]

and set "pfMaxDamage[Array_number_Of_Your_Buff]" to 0,
0 (Zero) means that damage is constant.

If you want damage between min and max set also:
"pfMaxDamage[Array_number_Of_Your_Buff]" to value.
For example if you want damage between 10 and 99
you would need to set:
"pfMinDamage[Array_number_Of_Your_Buff] to 10 and
"pfMaxDamage[Array_number_Of_Your_Buff] to 99,
max damage should be greater than min damage.

1.4.2 How do I set Radius of Phoenix Fire ?

First you have to set "pfHasAreaEffect[Array_number_Of_Your_Buff]" to true.
Then set radius from "pfDamageRadius[Array_number_Of_Your_Buff]" variable.
There is also option to do delayed damage,
set "pfDamageDelay[Array_number_Of_Your_Buff]" to some value (It MUST be
positive no negative values !). If you don' t vant delayed damage set it to
0.00.
It works really optimized and best is that you can have Phoenix Fire with wicked attack rate while keeping attack type, damage type, weapon type !
JASS (version 1.04) for those who would like to see it but are too lazzy to download it:
JASS:

globals
 damagetype array udg_damageType
 attacktype array udg_attackType
 integer array udg_weaponType
 string array udg_stringDamageType
 string array udg_stringAttackType
 string array udg_stringWeaponType
 
 boolean udg_showPfMsg
 // New way
 integer udg_maxPfAbilities
 integer array udg_pfBuff

 real array udg_pfMinDamage
 real array udg_pfMaxDamage
 real array udg_pfDamageRadius
 real array udg_pfDamageDelay

 boolean array udg_pfHasAreaEffect

 group udg_convertUnitPfDmgGroup
 group udg_unitsUsingEvent

 // new way of storing damage code
 integer array udg_pfAttackType
 integer array udg_pfDamageType
 integer array udg_pfWeaponType
endglobals

function PhoenixFireDamageConverted takes nothing returns boolean
    local unit damagingUnit = GetEventDamageSource()
    local unit damagedUnit = GetTriggerUnit()
    
    local real damagedUnitX = 0.
    local real damagedUnitY = 0.
    local real damageDone = 0.
    
    local integer pfBuffCounter = 0
    
    loop
        exitwhen pfBuffCounter > udg_maxPfAbilities
            if GetUnitAbilityLevel(damagedUnit,udg_pfBuff[pfBuffCounter]) > 0 and IsUnitInGroup(damagingUnit,udg_convertUnitPfDmgGroup) then
                call UnitRemoveAbility(damagedUnit,udg_pfBuff[pfBuffCounter])
            
                if  udg_pfMaxDamage[pfBuffCounter] > 0. then
                    set damageDone = GetRandomReal(udg_pfMinDamage[pfBuffCounter],udg_pfMaxDamage[pfBuffCounter])
                else
                    set damageDone = udg_pfMinDamage[pfBuffCounter]
                endif
            
                if udg_pfHasAreaEffect[pfBuffCounter] then
                    set damagedUnitX = GetUnitX(damagedUnit)
                    set damagedUnitY = GetUnitY(damagedUnit)
                
                    call UnitDamagePoint(damagingUnit,udg_pfDamageDelay[pfBuffCounter],udg_pfDamageRadius[pfBuffCounter],damagedUnitX,damagedUnitY,damageDone,true,false,udg_attackType[pfBuffCounter],udg_damageType[pfBuffCounter],ConvertWeaponType(udg_weaponType[pfBuffCounter]))
                else
                    call UnitDamageTarget(damagingUnit,damagedUnit,damageDone,true,false,udg_attackType[pfBuffCounter],udg_damageType[pfBuffCounter],ConvertWeaponType(udg_weaponType[pfBuffCounter]))
                endif
            
                // For debug purposes it shows indexes and strings to player so he could be sure
                // right damage is done.
                if udg_showPfMsg then
                    call DisplayTextToPlayer(Player(0),0.,0.,"pfBuffIndex is: " + I2S(pfBuffCounter))
                
                    if udg_pfHasAreaEffect[pfBuffCounter] then
                        call DisplayTextToPlayer(Player(0),0.,0.,"pfBuffIndex has area effect")
                        call DisplayTextToPlayer(Player(0),0.,0.,"pfBuffIndex damage delay: " + R2S(udg_pfDamageDelay[pfBuffCounter]))
                        call DisplayTextToPlayer(Player(0),0.,0.,"pfBuffIndex has area effect radius is: " + R2S(udg_pfDamageRadius[pfBuffCounter]))
                    endif
                
                    call DisplayTextToPlayer(Player(0),0.,0.,"damageTypeIndex is: " + I2S(udg_pfDamageType[pfBuffCounter]) + ", attackTypeIndex is: " + I2S(udg_pfAttackType[pfBuffCounter]) + " and weaponType is: " + I2S(udg_pfWeaponType[pfBuffCounter]))
                    call DisplayTextToPlayer(Player(0),0.,0.,udg_stringDamageType[udg_pfDamageType[pfBuffCounter]] + ", " + udg_stringAttackType[udg_pfAttackType[pfBuffCounter]] + " and " + udg_stringWeaponType[udg_pfWeaponType[pfBuffCounter]] )
                    call DisplayTextToPlayer(Player(0),0.,0.,"Converted damage is: " + R2S(damageDone))
                endif
        
                set damagingUnit = null
                set damagedUnit = null
    
                return false
            endif
        set pfBuffCounter = pfBuffCounter + 1
    endloop
    
    set damagingUnit = null
    set damagedUnit = null
    
    return false
endfunction


function AddPrePlacedUnits takes nothing returns boolean
    local unit filterUnit = GetFilterUnit()
    
    call TriggerRegisterUnitEvent(gg_trg_ConvertPhoenixFireDamage, filterUnit, EVENT_UNIT_DAMAGED )
    set filterUnit = null
    
    return false
endfunction


function AddNewUnit takes nothing returns boolean
    local unit triggeringUnit = GetTriggerUnit()
    
    if not IsUnitInGroup(triggeringUnit,udg_unitsUsingEvent) then
        call GroupAddUnit(udg_unitsUsingEvent,triggeringUnit)
        call TriggerRegisterUnitEvent(gg_trg_ConvertPhoenixFireDamage, triggeringUnit, EVENT_UNIT_DAMAGED )
    endif
    set triggeringUnit = null
    return false
endfunction

function InitTrig_ConvertPhoenixFireDamage takes nothing returns nothing
    local trigger addNewUnitsTrig = CreateTrigger()
    local region worldBounds = CreateRegion()
    local group prePlacedUnits = CreateGroup()
    
    set gg_trg_ConvertPhoenixFireDamage = CreateTrigger()
    
    // Damage types
    
    set udg_damageType[0] = DAMAGE_TYPE_UNKNOWN
    set udg_damageType[1] = DAMAGE_TYPE_NORMAL
    set udg_damageType[2] = DAMAGE_TYPE_ENHANCED
    set udg_damageType[3] = DAMAGE_TYPE_FIRE
    set udg_damageType[4] = DAMAGE_TYPE_COLD
    set udg_damageType[5] = DAMAGE_TYPE_LIGHTNING
    set udg_damageType[6] = DAMAGE_TYPE_POISON
    set udg_damageType[7] = DAMAGE_TYPE_DISEASE
    set udg_damageType[8] = DAMAGE_TYPE_DIVINE
    set udg_damageType[9] = DAMAGE_TYPE_SONIC
    set udg_damageType[10] = DAMAGE_TYPE_ACID
    set udg_damageType[11] = DAMAGE_TYPE_FORCE
    set udg_damageType[12] = DAMAGE_TYPE_DEATH
    set udg_damageType[13] = DAMAGE_TYPE_MIND
    set udg_damageType[14] = DAMAGE_TYPE_PLANT
    set udg_damageType[15] = DAMAGE_TYPE_DEFENSIVE
    set udg_damageType[16] = DAMAGE_TYPE_DEMOLITION
    set udg_damageType[17] = DAMAGE_TYPE_SLOW_POISON
    set udg_damageType[18] = DAMAGE_TYPE_SPIRIT_LINK
    set udg_damageType[19] = DAMAGE_TYPE_SHADOW_STRIKE
    set udg_damageType[20] = DAMAGE_TYPE_UNIVERSAL
    
    // String damage types
    
    set udg_stringDamageType[0] = "DAMAGE_TYPE_UNKNOWN"
    set udg_stringDamageType[1] = "DAMAGE_TYPE_NORMAL"
    set udg_stringDamageType[2] = "DAMAGE_TYPE_ENHANCED"
    set udg_stringDamageType[3] = "DAMAGE_TYPE_FIRE"
    set udg_stringDamageType[4] = "DAMAGE_TYPE_COLD"
    set udg_stringDamageType[5] = "DAMAGE_TYPE_LIGHTNING"
    set udg_stringDamageType[6] = "DAMAGE_TYPE_POISON"
    set udg_stringDamageType[7] = "DAMAGE_TYPE_DISEASE"
    set udg_stringDamageType[8] = "DAMAGE_TYPE_DIVINE"
    set udg_stringDamageType[9] = "DAMAGE_TYPE_SONIC"
    set udg_stringDamageType[10] = "DAMAGE_TYPE_ACID"
    set udg_stringDamageType[11] = "DAMAGE_TYPE_FORCE"
    set udg_stringDamageType[12] = "DAMAGE_TYPE_DEATH"
    set udg_stringDamageType[13] = "DAMAGE_TYPE_MIND"
    set udg_stringDamageType[14] = "DAMAGE_TYPE_PLANT"
    set udg_stringDamageType[15] = "DAMAGE_TYPE_DEFENSIVE"
    set udg_stringDamageType[16] = "DAMAGE_TYPE_DEMOLITION"
    set udg_stringDamageType[17] = "DAMAGE_TYPE_SLOW_POISON"
    set udg_stringDamageType[18] = "DAMAGE_TYPE_SPIRIT_LINK"
    set udg_stringDamageType[19] = "DAMAGE_TYPE_SHADOW_STRIKE"
    set udg_stringDamageType[20] = "DAMAGE_TYPE_UNIVERSAL"
    
    // Attack types
                            
    set udg_attackType[0] = ATTACK_TYPE_NORMAL
    set udg_attackType[1] = ATTACK_TYPE_MELEE
    set udg_attackType[2] = ATTACK_TYPE_PIERCE
    set udg_attackType[3] = ATTACK_TYPE_SIEGE
    set udg_attackType[4] = ATTACK_TYPE_MAGIC
    set udg_attackType[5] = ATTACK_TYPE_CHAOS
    set udg_attackType[6] = ATTACK_TYPE_HERO
    
    // String attack types
                                   
    set udg_stringAttackType[0] = "ATTACK_TYPE_NORMAL"
    set udg_stringAttackType[1] = "ATTACK_TYPE_MELEE"
    set udg_stringAttackType[2] = "ATTACK_TYPE_PIERCE"
    set udg_stringAttackType[3] = "ATTACK_TYPE_SIEGE"
    set udg_stringAttackType[4] = "ATTACK_TYPE_MAGIC"
    set udg_stringAttackType[5] = "ATTACK_TYPE_CHAOS"
    set udg_stringAttackType[6] = "ATTACK_TYPE_HERO"
    
    // Weapon types index
    
    set udg_weaponType[0] = 0 // WEAPON_TYPE_WHOKNOWS
    set udg_weaponType[1] = 22 // WEAPON_TYPE_AXE_MEDIUM_CHOP
    set udg_weaponType[2] = 21 // WEAPON_TYPE_CLAW_HEAVY_SLICE
    set udg_weaponType[3] = 20 // WEAPON_TYPE_CLAW_MEDIUM_SLICE
    set udg_weaponType[4] = 19 // WEAPON_TYPE_CLAW_LIGHT_SLICE
    set udg_weaponType[5] = 8 // WEPAON_TYPE_METAL_HEAVY_BASH
    set udg_weaponType[6] = 3 // WEAPON_TYPE_METAL_HEAVY_CHOP
    set udg_weaponType[7] = 6 // WEAPON_TYPE_METAL_HEAVY_SLICE
    set udg_weaponType[8] = 10 // WEAPON_TYPE_METAL_HEAVY_STAB
    set udg_weaponType[9] = 7 // WEAPON_TYPE_METAL_MEDIUM_BASH
    set udg_weaponType[10] = 2 // WEAPON_TYPE_METAL_MEDIUM_CHOP
    set udg_weaponType[11] = 5 // WEAPON_TYPE_METAL_MEDIUM_SLICE
    set udg_weaponType[12] = 9 // WEAPON_TYPE_METAL_MEDIUM_STAB
    set udg_weaponType[13] = 1 // WEAPON_TYPE_METAL_LIGHT_CHOP
    set udg_weaponType[14] = 4 // WEAPON_TYPE_METAL_LIGHT_SLICE
    set udg_weaponType[15] = 23 // WEAPON_TYPE_ROCK_HEAVY_BASH
    set udg_weaponType[16] = 16 // WEAPON_TYPE_WOOD_HEAVY_BASH
    set udg_weaponType[17] = 13 // WEAPON_TYPE_WOOD_HEAVY_SLICE
    set udg_weaponType[18] = 15 // WEAPON_TYPE_WOOD_MEDIUM_BASH
    set udg_weaponType[19] = 12 // WEAPON_TYPE_WOOD_MEDIUM_SLICE
    set udg_weaponType[20] = 18 // WEAPON_TYPE_WOOD_MEDIUM_STAB
    set udg_weaponType[21] = 14 // WEAPON_TYPE_WOOD_LIGHT_BASH
    set udg_weaponType[22] = 11 // WEAPON_TYPE_WOOD_LIGHT_SLICE
    set udg_weaponType[23] = 17 // WEAPON_TYPE_WOOD_LIGHT_STAB
    
    // String weapon types
    set udg_stringWeaponType[0] = "WEAPON_TYPE_WHOKNOWS"
    set udg_stringWeaponType[1] = "WEAPON_TYPE_AXE_MEDIUM_CHOP"
    set udg_stringWeaponType[2] = "WEAPON_TYPE_CLAW_HEAVY_SLICE"
    set udg_stringWeaponType[3] = "WEAPON_TYPE_CLAW_MEDIUM_SLICE"
    set udg_stringWeaponType[4] = "WEAPON_TYPE_CLAW_LIGHT_SLICE"
    set udg_stringWeaponType[5] = "WEPAON_TYPE_METAL_HEAVY_BASH"
    set udg_stringWeaponType[6] = "WEAPON_TYPE_METAL_HEAVY_CHOP"
    set udg_stringWeaponType[7] = "WEAPON_TYPE_METAL_HEAVY_SLICE"
    set udg_stringWeaponType[8] = "WEAPON_TYPE_METAL_HEAVY_STAB"
    set udg_stringWeaponType[9] = "WEAPON_TYPE_METAL_MEDIUM_BASH"
    set udg_stringWeaponType[10] = "WEAPON_TYPE_METAL_MEDIUM_CHOP"
    set udg_stringWeaponType[11] = "WEAPON_TYPE_METAL_MEDIUM_SLICE"
    set udg_stringWeaponType[12] = "WEAPON_TYPE_METAL_MEDIUM_STAB"
    set udg_stringWeaponType[13] = "WEAPON_TYPE_METAL_LIGHT_CHOP"
    set udg_stringWeaponType[14] = "WEAPON_TYPE_METAL_LIGHT_SLICE"
    set udg_stringWeaponType[15] = "WEAPON_TYPE_ROCK_HEAVY_BASH"
    set udg_stringWeaponType[16] = "WEAPON_TYPE_WOOD_HEAVY_BASH"
    set udg_stringWeaponType[17] = "WEAPON_TYPE_WOOD_HEAVY_SLICE"
    set udg_stringWeaponType[18] = "WEAPON_TYPE_WOOD_MEDIUM_BASH"
    set udg_stringWeaponType[19] = "WEAPON_TYPE_WOOD_MEDIUM_SLICE"
    set udg_stringWeaponType[20] = "WEAPON_TYPE_WOOD_MEDIUM_STAB"
    set udg_stringWeaponType[21] = "WEAPON_TYPE_WOOD_LIGHT_BASH"
    set udg_stringWeaponType[22] = "WEAPON_TYPE_WOOD_LIGHT_SLICE"
    set udg_stringWeaponType[23] = "WEAPON_TYPE_WOOD_LIGHT_STAB"
    
    call GetUnitsInRectMatching(bj_mapInitialPlayableArea, Condition (function AddPrePlacedUnits))
    call DestroyGroup(prePlacedUnits)
    set prePlacedUnits = null
    
    call TriggerAddCondition(gg_trg_ConvertPhoenixFireDamage, Condition (function PhoenixFireDamageConverted))
    
    call RegionAddRect(worldBounds,GetWorldBounds())
    
    call TriggerRegisterEnterRegion(addNewUnitsTrig,worldBounds,null)
    call TriggerAddCondition(addNewUnitsTrig,Condition (function AddNewUnit))
    
    set addNewUnitsTrig = null
    
endfunction

If you wonder why should such a thing be good then Phoenix Fire is mostly used in AoS of BattleShip type. By allowing damage types, attack types, weapon types and Area of Effect damage, it would give whole new dimension to gameplay.

I made really nice test map also what has demo items and shows its best performance. To get hang of it download demo map below my post (See attached files).
 

Attachments

  • ConvertPhoenixFireDamageSystemVer1.04.w3x
    89.1 KB · Views: 364

Miz

Administrator
Reaction score
424
I will download it later because I'm on my Computer which CD-Drive won't work so I don't have Warcraft on this one and my sister on her labtop :(
 

RedOrb

You can change this now in User CP.
Reaction score
14
I will download it later because I'm on my Computer which CD-Drive won't work so I don't have Warcraft on this one and my sister on her labtop :(

You may as well continue with the rest of your life story while you are at it. :]
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
> Bump, like nobody cares about my work?

That's never true, I just saw this post.

Would you mind saying what is the goal of the system?

Its main purpose is to give more
freedom when using abilities/ items based off of Phoenix Fire ability.
It is most accurate system up to date (20.05.2007). It gives in most
cases true result.

This is not informative for users that don't know what phoenix fire ability is (if there was a signature in this site I would have declared that I'm really bad with anything that got to do with object editor, sorry for the ignorance).
 

Sooda

Diversity enchants
Reaction score
318
If they don' t know what Phoenix Fire ability does I asume they don' t need this system also. Thanks for feedback. Nvm if somebody needs it they can always use search.
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Well to be honest I'm not sure what it does. From my quick search I understood that it's like immolation only to one unit, is that correct? If it is I could go on and start testing the system. ;)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
Phoenix Fire shoots automatically at anything passing nearby.
The unit that has it doesn't even need to stop. It just happens.
"Battleships" would be the most famous map living from that one ability.
You can also add several to the same unit and they all work.

And, yes, a "system" that presents advanced use of some ability might actually want to explain what that ability is usually doing...
 

Tom Jones

N/A
Reaction score
437
Phoenix Fire is not like immolation :)
Phoenix fire will automatically shot missiles at a target within range, causing intial damage and damage over time. Soodas system creates a sorta controlled enviroment for the ability, making it possible to control the damage it deals per shot, and which attack and damage type the shot makes.

Doesn't this work only if a preplaced unit takes damage? You should add this event to your trigger in my opinion:
JASS:
    local region reg = CreateRegion()

    call RegionAddRect(reg,GetWorldBounds()) 
    call TriggerRegisterEnterRegion(gg_trg_...,reg,null)
Your executing the triggers actions with conditions, which only makes sense for local triggers.
 

Sooda

Diversity enchants
Reaction score
318
Awsome feedback, Rheias you had point hm... with that ability explanation. AceHart explaned it well. I will quote him and add that part. Tom Jones explaned it good also. Going to combine these two explanations.
That region idea is very good btw. I will turn it into local then.
EDIT: Whoops I forgot why global trigger and conditions, they are faster according to Vexorian. When I add preplaced units then I do it in another function and it would require game cache to store variable or global variable. Still that automatically adding new units is very good idea. Global trigger allows from GUI to add units also. But when I use that region thing it' s pretty useless.

EDIT: Thanks all, now I can finally rest in peace. Tom and Ace got their replys quoted in my README. Now even new units are added to trigger (Unit can' t be added twice. Hm... they can but only from GUI. Still it isn' t needed.).
I did this sytem because all old BattleShips wasn' t so good by using only one ability. It totally discarded armor purpose in game. Now people can again spice up their maps with tactics.
 

Joker(Div)

Always Here..
Reaction score
86
This is completely off-topic but this is like the 3rd times im seeing this. Where do you get the script for FPS?
 

Sooda

Diversity enchants
Reaction score
318
Thanks for giving me opurtunity to bump this thread, you can see your FPS by typing into chat field "/fps" (Without "").
I' m going to update this system again, going to add queue damage (All Phoenix Fire buffs will be queued and damage done still to unit. There is limit of max buffs per unit once - 8 I think.) and weapon types.
 

Somatic

You can change this now in User CP.
Reaction score
84
Nice job done, +rep.

This system can come in handy if for Battleship/BattleTank Maps. And appreantly Phoenix Fire is my favourite skill for modding too! =D
 

Sooda

Diversity enchants
Reaction score
318
Bump :) I have re-made the system, it uses now fewer globals variables, is faster and more optimized than ever. Added options for doing area damage (Can do delayed area damage also.). As bonus there are all weapon types available for your use also.
Everyone who have downloaded or started to use this system I would reccomend to update it to latest version 1.04. It has just too many good sides compared to older versions.

EDIT: I made a hotfix so it' s ok now if you downloaded it before reading this update please download it again, sorry for such a mistake.
 

CEMEHbl4

New Member
Reaction score
13
hey Sooda plz help me i just used your system, all ok, but i made 8 guns (0-7) and item with INDEX 7 plays MEDIUM_WOOD_SLICE SOUND on attack(or some same sound) i have set Set pfWeaponType[7] = 0 but the sound is plays anyway!! what the hell?

how can i fix it?
its your fault or mine?
 

Psiblade94122

In need of sleep
Reaction score
138
its prolly the sound a unit makes when it gets hurt (considering that your makeing a battleships map)

i havent looked at the code yet, so i cant help you much here

i also have a question... why the hell am i still up when its fucking 2am!? jeez >.< im gona go to bed now.. this is too much @.@
 

Sooda

Diversity enchants
Reaction score
318
> but the sound is plays anyway!! what the hell?

I assume sound is attached to missile art by default. It' s like using arrow missile what has sound already by default. Is sound played when missile hits unit / object or when you fire missile ? I think it may be hardcoded.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top