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.
Thanks Rheias for pointing out that Phoenix Fire ability needs to be explaned.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.
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:
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.
You will set damage type and attack type like this for Phoenix Fire abilities:
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 !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.
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).