Name | Type | is_array | initial_value |
addGold | real | No | |
addGoldNow | integer | No | |
changeablePickerInt | integer | No | 8 |
checkMe | boolean | No | |
gameIsOver | boolean | No | |
gameon | boolean | No | |
HasMagicSight | boolean | Yes | |
Heroes | unit | Yes | |
pickedAbilities | abilcode | Yes | |
PickerStorage | integer | Yes | |
RaiderHeroes | group | No | |
Raiders | force | No | |
SecondaryInventory | itemcode | Yes | |
specialAbility | abilcode | Yes | |
tempint | integer | No | |
timeLeft | integer | Yes | |
Timer | multiboard | No | |
TrueTime | integer | No | |
UncheckMe | boolean | No | |
Villagers | force | No | |
waygateCount | integer | No |
function Trig_eagle_capture_replacer_jass_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTrainedUnit()) == 'n01C' ) ) then
return false
endif
return true
endfunction
function ECR_NewEagle takes player who, location where, integer what returns nothing
call CreateNUnitsAtLoc( 1, what, who, where, bj_UNIT_FACING)
endfunction
function ECR_What takes nothing returns integer
local integer seed = GetRandomInt(1, 6)
local integer what
if (seed == 1) then
set what = 'n00C'
endif
if (seed == 2) then
set what = 'n00B'
endif
if (seed == 3) then
set what = 'n00B'
endif
if (seed == 4) then
set what = 'n00A'
endif
if (seed == 5) then
set what = 'n00A'
endif
if (seed == 6) then
set what = 'n00A'
endif
return what
endfunction
function Trig_eagle_capture_replacer_jass_Actions takes nothing returns nothing
local integer eagleAmount = GetRandomInt(3, 6)
local integer random = GetRandomInt(1, 6)
local location where = GetUnitLoc(GetTrainedUnit())
local player who = GetOwningPlayer(GetTrainedUnit())
local integer count = 1
call RemoveUnit(GetTrainedUnit())
loop
exitwhen count > eagleAmount
call ECR_NewEagle(who, where, ECR_What())
set count = count + 1
endloop
endfunction
//===========================================================================
function InitTrig_eagle_capture_replacer_jass takes nothing returns nothing
set gg_trg_eagle_capture_replacer_jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_eagle_capture_replacer_jass, EVENT_PLAYER_UNIT_TRAIN_FINISH )
call TriggerAddCondition( gg_trg_eagle_capture_replacer_jass, Condition( function Trig_eagle_capture_replacer_jass_Conditions ) )
call TriggerAddAction( gg_trg_eagle_capture_replacer_jass, function Trig_eagle_capture_replacer_jass_Actions )
endfunction
function Trig_wolf_capture_replacer_jass_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTrainedUnit()) == 'n01B' ) ) then
return false
endif
return true
endfunction
function WCR_NewWolf takes player who, location where, integer what returns nothing
call CreateNUnitsAtLoc( 1, what, who, where, bj_UNIT_FACING)
endfunction
function WCR_What takes nothing returns integer
local integer seed = GetRandomInt(1, 6)
local integer what
if (seed == 1) then
set what = 'o007'
endif
if (seed == 2) then
set what = 'o006'
endif
if (seed == 3) then
set what = 'o006'
endif
if (seed == 4) then
set what = 'o005'
endif
if (seed == 5) then
set what = 'o005'
endif
if (seed == 6) then
set what = 'o005'
endif
return what
endfunction
function Trig_wolf_capture_replacer_jass_Actions takes nothing returns nothing
local integer wolfAmount = GetRandomInt(3, 6)
local integer random = GetRandomInt(1, 6)
local location where = GetUnitLoc(GetTrainedUnit())
local player who = GetOwningPlayer(GetTrainedUnit())
local integer count = 1
call RemoveUnit(GetTrainedUnit())
loop
exitwhen count > wolfAmount
call WCR_NewWolf(who, where, WCR_What())
set count = count + 1
endloop
endfunction
//===========================================================================
function InitTrig_wolf_capture_replacer_jass takes nothing returns nothing
set gg_trg_wolf_capture_replacer_jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_wolf_capture_replacer_jass, EVENT_PLAYER_UNIT_TRAIN_FINISH )
call TriggerAddCondition( gg_trg_wolf_capture_replacer_jass, Condition( function Trig_wolf_capture_replacer_jass_Conditions ) )
call TriggerAddAction( gg_trg_wolf_capture_replacer_jass, function Trig_wolf_capture_replacer_jass_Actions )
endfunction
function Trig_bear_capture_replacer_jass_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTrainedUnit()) == 'n01A' ) ) then
return false
endif
return true
endfunction
function BCR_NewBear takes player who, location where, integer what returns nothing
call CreateNUnitsAtLoc( 1, what, who, where, bj_UNIT_FACING)
endfunction
function BCR_What takes nothing returns integer
local integer seed = GetRandomInt(1, 6)
local integer what
if (seed == 1) then
set what = 'n009'
endif
if (seed == 2) then
set what = 'n008'
endif
if (seed == 3) then
set what = 'n008'
endif
if (seed == 4) then
set what = 'n007'
endif
if (seed == 5) then
set what = 'n007'
endif
if (seed == 6) then
set what = 'n007'
endif
return what
endfunction
function Trig_bear_capture_replacer_jass_Actions takes nothing returns nothing
local integer bearAmount = GetRandomInt(3, 6)
local integer random = GetRandomInt(1, 6)
local location where = GetUnitLoc(GetTrainedUnit())
local player who = GetOwningPlayer(GetTrainedUnit())
local integer count = 1
call RemoveUnit(GetTrainedUnit())
loop
exitwhen count > bearAmount
call BCR_NewBear(who, where, BCR_What())
set count = count + 1
endloop
endfunction
//===========================================================================
function InitTrig_bear_capture_replacer_jass takes nothing returns nothing
set gg_trg_bear_capture_replacer_jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_bear_capture_replacer_jass, EVENT_PLAYER_UNIT_TRAIN_FINISH )
call TriggerAddCondition( gg_trg_bear_capture_replacer_jass, Condition( function Trig_bear_capture_replacer_jass_Conditions ) )
call TriggerAddAction( gg_trg_bear_capture_replacer_jass, function Trig_bear_capture_replacer_jass_Actions )
endfunction
function Trig_learn_ability_jass_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_learn_ability_jass_Actions takes nothing returns nothing
local unit hero = GetLevelingUnit()
local integer raiderNumber = GetConvertedPlayerId(GetOwningPlayer(hero)) - udg_changeablePickerInt
local integer level = GetHeroLevel(hero)
local integer pick1 = udg_pickedAbilities[( ( ( raiderNumber ) * 4 ) - 3 )]
local integer pick2 = udg_pickedAbilities[( ( ( raiderNumber ) * 4 ) - 2 )]
local integer pick3 = udg_pickedAbilities[( ( ( raiderNumber ) * 4 ) - 1 )]
local integer pick4 = udg_pickedAbilities[( ( raiderNumber ) * 4 )]
local integer special = udg_specialAbility[( raiderNumber )]
if (level < 7) then
if (level == 1) then
call UnitAddAbilityBJ(pick1, hero)
if (pick1 == 'A046') then
call SetUnitAbilityLevelSwapped( 'A046', hero, GetRandomInt(1, 15) )
endif
endif
if (level == 2) then
call UnitAddAbilityBJ(pick2, hero)
if (pick2 == 'A09V') then
call SetUnitAbilityLevelSwapped( 'A09V', hero, GetRandomInt(1, 15) )
endif
endif
if (level == 3) then
call UnitAddAbilityBJ(pick3, hero)
if (pick3 == 'A049') then
call SetUnitAbilityLevelSwapped( 'A049', hero, GetRandomInt(1, 15) )
endif
endif
if (level == 4) then
call UnitAddAbilityBJ(pick4, hero)
if (pick4 == 'A047') then
call SetUnitAbilityLevelSwapped( 'A047', hero, GetRandomInt(1, 15) )
endif
endif
if (level == 5) then
call UnitAddAbilityBJ(special, hero)
if (special == 'A0AA') then
call SetPlayerTechResearchedSwap( 'R019', GetUnitAbilityLevelSwapped(special, hero), GetOwningPlayer(hero) )
endif
endif
if (level == 6) then
call UnitAddAbilityBJ('A067', hero)
call SetUnitAbilityLevelSwapped( 'A067', hero, GetRandomInt(1, 15) )
endif
else
if (ModuloInteger(level, 6) == 1) then
if (pick1 == 'A046') then
if (level == 7) then
call UnitAddAbilityBJ( 'A09R', hero )
call SetUnitAbilityLevel( hero, 'A09R', GetUnitAbilityLevelSwapped('A046', hero ))
call UnitRemoveAbilityBJ( 'A046', hero )
endif
if (level == 13) then
call UnitAddAbilityBJ( 'A09Q', hero )
call SetUnitAbilityLevelSwapped( 'A09Q', hero, GetUnitAbilityLevelSwapped('A09R', hero ))
call UnitRemoveAbilityBJ( 'A09R', hero )
endif
if (level == 19) then
call UnitAddAbilityBJ( 'A09P', hero )
call SetUnitAbilityLevelSwapped( 'A09P', hero, GetUnitAbilityLevelSwapped('A09Q', hero ))
call UnitRemoveAbilityBJ( 'A09Q', hero )
endif
if (level == 25) then
call UnitAddAbilityBJ( 'A09S', hero )
call SetUnitAbilityLevelSwapped( 'A09S', hero, GetUnitAbilityLevelSwapped('A09P', hero ))
call UnitRemoveAbilityBJ( 'A09P', hero )
endif
else
call IncUnitAbilityLevelSwapped( pick1, hero )
endif
endif
if (ModuloInteger(level, 6) == 2) then
if (pick2 == 'A09V') then
if (level == 8) then
call UnitAddAbilityBJ( 'A09U', hero )
call SetUnitAbilityLevelSwapped( 'A09U', hero, GetUnitAbilityLevelSwapped('A09V', hero ))
call UnitRemoveAbilityBJ( 'A09V', hero )
endif
if (level == 14) then
call UnitAddAbilityBJ( 'A09W', hero )
call SetUnitAbilityLevelSwapped( 'A09W', hero, GetUnitAbilityLevelSwapped('A09U', hero ))
call UnitRemoveAbilityBJ( 'A09U', hero )
endif
if (level == 20) then
call UnitAddAbilityBJ( 'A09T', hero )
call SetUnitAbilityLevelSwapped( 'A09T', hero, GetUnitAbilityLevelSwapped('A09W', hero ))
call UnitRemoveAbilityBJ( 'A09W', hero )
endif
if (level == 26) then
call UnitAddAbilityBJ( 'A048', hero )
call SetUnitAbilityLevelSwapped( 'A048', hero, GetUnitAbilityLevelSwapped('A09T', hero ))
call UnitRemoveAbilityBJ( 'A09T', hero )
endif
else
call IncUnitAbilityLevelSwapped( pick2, hero )
endif
endif
if (ModuloInteger(level, 6) == 3) then
if (pick3 == 'A049') then
if (level == 9) then
call UnitAddAbilityBJ( 'A09X', hero )
call SetUnitAbilityLevelSwapped( 'A09X', hero, GetUnitAbilityLevelSwapped('A049', hero ))
call UnitRemoveAbilityBJ( 'A049', hero )
endif
if (level == 15) then
call UnitAddAbilityBJ( 'A09Y', hero )
call SetUnitAbilityLevelSwapped( 'A09Y', hero, GetUnitAbilityLevelSwapped('A09X', hero ))
call UnitRemoveAbilityBJ( 'A09X', hero )
endif
if (level == 21) then
call UnitAddAbilityBJ( 'A09Z', hero )
call SetUnitAbilityLevelSwapped( 'A09Z', hero, GetUnitAbilityLevelSwapped('A09Y', hero ))
call UnitRemoveAbilityBJ( 'A09Y', hero )
endif
if (level == 27) then
call UnitAddAbilityBJ( 'A0A0', hero )
call SetUnitAbilityLevelSwapped( 'A0A0', hero, GetUnitAbilityLevelSwapped('A09Z', hero ))
call UnitRemoveAbilityBJ( 'A09Z', hero )
endif
else
call IncUnitAbilityLevelSwapped( pick3, hero )
endif
endif
if (ModuloInteger(level, 6) == 4) then
if (pick4 == 'A047') then
if (level == 10) then
call UnitAddAbilityBJ( 'A0A1', hero )
call SetUnitAbilityLevelSwapped( 'A0A1', hero, GetUnitAbilityLevelSwapped('A047', hero ))
call UnitRemoveAbilityBJ( 'A047', hero )
endif
if (level == 16) then
call UnitAddAbilityBJ( 'A0A2', hero )
call SetUnitAbilityLevelSwapped( 'A0A2', hero, GetUnitAbilityLevelSwapped('A0A1', hero ))
call UnitRemoveAbilityBJ( 'A0A1', hero )
endif
if (level == 22) then
call UnitAddAbilityBJ( 'A0A3', hero )
call SetUnitAbilityLevelSwapped( 'A0A3', hero, GetUnitAbilityLevelSwapped('A0A2', hero ))
call UnitRemoveAbilityBJ( 'A0A2', hero )
endif
if (level == 28) then
call UnitAddAbilityBJ( 'A0A4', hero )
call SetUnitAbilityLevelSwapped( 'A0A4', hero, GetUnitAbilityLevelSwapped('A0A3', hero ))
call UnitRemoveAbilityBJ( 'A0A3', hero )
endif
else
call IncUnitAbilityLevelSwapped( pick4, hero )
endif
endif
if (ModuloInteger(level, 6) == 5) then
call IncUnitAbilityLevelSwapped( special, hero )
if (special == 'A0AA') then
call SetPlayerTechResearchedSwap( 'R019', GetUnitAbilityLevelSwapped(special, hero), GetOwningPlayer(hero) )
endif
endif
if (ModuloInteger(level, 6) == 0) then
if (level == 12) then
call UnitAddAbilityBJ( 'A04K', hero )
call SetUnitAbilityLevelSwapped( 'A04K', hero, GetUnitAbilityLevelSwapped('A067', hero ))
call UnitRemoveAbilityBJ( 'A067', hero )
endif
if (level == 18) then
call UnitAddAbilityBJ( 'A09M', hero )
call SetUnitAbilityLevelSwapped( 'A09M', hero, GetUnitAbilityLevelSwapped('A04K', hero ))
call UnitRemoveAbilityBJ( 'A04K', hero )
endif
if (level == 24) then
call UnitAddAbilityBJ( 'A09N', hero )
call SetUnitAbilityLevelSwapped( 'A09N', hero, GetUnitAbilityLevelSwapped('A09M', hero ))
call UnitRemoveAbilityBJ( 'A09M', hero )
endif
if (level == 30) then
call UnitAddAbilityBJ( 'A09O', hero )
call SetUnitAbilityLevelSwapped( 'A09O', hero, GetUnitAbilityLevelSwapped('A09N', hero ))
call UnitRemoveAbilityBJ( 'A09N', hero )
endif
endif
endif
//unseting
set hero = null
endfunction
//===========================================================================
function InitTrig_learn_ability_jass takes nothing returns nothing
set gg_trg_learn_ability_jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_learn_ability_jass, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_learn_ability_jass, Condition( function Trig_learn_ability_jass_Conditions ) )
call TriggerAddAction( gg_trg_learn_ability_jass, function Trig_learn_ability_jass_Actions )
endfunction
function Trig_New_Chaos_Random_Call_jass_Conditions takes nothing returns boolean
//random call
if ( ( GetSpellAbilityId() == 'A067' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A04K' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09M' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09N' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09O' ) ) then
return true
endif
//primary chaos call
if ( ( GetSpellAbilityId() == 'A046' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09Q' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09P' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09S' ) ) then
return true
endif
//secondary chaos call
if ( ( GetSpellAbilityId() == 'A09V' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09U' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09W' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09T' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A048' ) ) then
return true
endif
//third chaos call
if ( ( GetSpellAbilityId() == 'A049' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09X' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09Y' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09Z' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A0' ) ) then
return true
endif
//fourth chaos call
if ( ( GetSpellAbilityId() == 'A047' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A2' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A4' ) ) then
return true
endif
return false
endfunction
function Trig_New_Chaos_Random_Call_jass_Actions takes nothing returns nothing
local unit hero = GetSpellAbilityUnit()
local integer spell = GetSpellAbilityId()
local integer seed = GetUnitAbilityLevelSwapped(spell, hero)
//set basics (IDs)
local integer earth = 'I007'
local integer water = 'I005'
local integer air = 'I001'
local integer fire = 'I000'
local integer darkness = 'I009'
local integer light = 'I00C'
local integer summon = 'I00G'
local integer rune = 'I00E'
local integer focus = 'I00A'
local integer blood = 'I003'
local integer will = 'I004'
local integer spirit = 'I006'
local integer time = 'I008'
local integer pure = 'I03J'
local integer multi = 'I03L'
//add item
if (seed == 1)then
call UnitAddItemByIdSwapped( earth, hero )
endif
if (seed == 2)then
call UnitAddItemByIdSwapped( water, hero )
endif
if (seed == 3)then
call UnitAddItemByIdSwapped( air, hero )
endif
if (seed == 4)then
call UnitAddItemByIdSwapped( fire, hero )
endif
if (seed == 5)then
call UnitAddItemByIdSwapped( darkness, hero )
endif
if (seed == 6)then
call UnitAddItemByIdSwapped( light, hero )
endif
if (seed == 7)then
call UnitAddItemByIdSwapped( summon, hero )
endif
if (seed == 8)then
call UnitAddItemByIdSwapped( rune, hero )
endif
if (seed == 9)then
call UnitAddItemByIdSwapped( focus, hero )
endif
if (seed == 10)then
call UnitAddItemByIdSwapped( blood, hero )
endif
if (seed == 11)then
call UnitAddItemByIdSwapped( will, hero )
endif
if (seed == 12)then
call UnitAddItemByIdSwapped( spirit, hero )
endif
if (seed == 13)then
call UnitAddItemByIdSwapped( time, hero )
endif
if (seed == 14)then
call UnitAddItemByIdSwapped( pure, hero )
endif
if (seed == 15)then
call UnitAddItemByIdSwapped( multi, hero )
endif
//change level, for next item
call SetUnitAbilityLevelSwapped( spell, hero, GetRandomInt(1, 15) )
//unsets hero
set hero = null
endfunction
//===========================================================================
function InitTrig_New_Chaos_Random_Call_jass takes nothing returns nothing
set gg_trg_New_Chaos_Random_Call_jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_New_Chaos_Random_Call_jass, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_New_Chaos_Random_Call_jass, Condition( function Trig_New_Chaos_Random_Call_jass_Conditions ) )
call TriggerAddAction( gg_trg_New_Chaos_Random_Call_jass, function Trig_New_Chaos_Random_Call_jass_Actions )
endfunction
function Trig_Inventory_switch_Conditions takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0A6' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A7' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A8' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A9' ) ) then
return true
endif
return false
endfunction
function UnitAddItemToSlotByIdBJ takes unit whichUnit, integer itemID, integer itemSlot returns nothing
call UnitAddItemToSlotById(whichUnit, itemID, (itemSlot - 1))
endfunction
function Trig_Inventory_switch_Actions takes nothing returns nothing
local unit hero = GetSpellAbilityUnit()
local integer raiderNumber = (GetConvertedPlayerId(GetOwningPlayer(hero)) - udg_changeablePickerInt)*6
local integer tempItem
local integer max = GetUnitAbilityLevelSwapped(GetSpellAbilityId(), hero ) + 1
local integer n = 1
local item tempItem2
local string itemName = ""
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(hero)), 10, "|cffffcc00Secondary Inventory holds:|r" )
loop
exitwhen n > max
set tempItem = udg_SecondaryInventory[( raiderNumber + 1 - n )]
set tempItem2 = UnitItemInSlotBJ(hero, n)
set udg_SecondaryInventory[( raiderNumber + 1 - n )] = GetItemTypeId(tempItem2)
set itemName = GetItemName(tempItem2)
if ( not ( itemName == null)) then
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(hero)), 10, itemName )
else
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(hero)), 10, "No Spell" )
endif
call RemoveItem( tempItem2 )
call UnitAddItemToSlotByIdBJ( hero, tempItem, n)
set n = n + 1
endloop
set hero = null
set tempItem2 = null
endfunction
//===========================================================================
function InitTrig_Inventory_switch takes nothing returns nothing
set gg_trg_Inventory_switch = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Inventory_switch, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Inventory_switch, Condition( function Trig_Inventory_switch_Conditions ) )
call TriggerAddAction( gg_trg_Inventory_switch, function Trig_Inventory_switch_Actions )
endfunction
function Trig_NewMixer_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function NMCheckItem takes unit subject, integer what, integer amount returns boolean
if (amount == 1) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,1)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,2)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return true
endif
return false
endif
if (amount == 2) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,1)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,2)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,2)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
if (amount == 3) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,1)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,2)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return true
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return true
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return true
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return true
endif
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,2)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return true
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return true
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return true
endif
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return true
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return true
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return true
endif
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return true
endif
endif
endif
endif
if (amount == 4) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,1)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,2)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,2)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
endif
endif
if (amount == 5) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,1)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,2)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
return TRUE
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
endif
endif
if ( GetItemTypeId(UnitItemInSlotBJ(subject,2)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
endif
endif
endif
if (amount == 6) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,1)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,2)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,3)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,4)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,5)) == what) then
if ( GetItemTypeId(UnitItemInSlotBJ(subject,6)) == what) then
return TRUE
endif
endif
endif
endif
endif
endif
endif
return false
endfunction
function NMRemoveItem takes unit subject, integer what, integer amount returns nothing
local integer count
set count = 0
loop
exitwhen (count == amount)
call RemoveItem( GetItemOfTypeFromUnitBJ(subject, what))
set count=count+1
endloop
endfunction
function NMAddItem takes unit subject, integer what returns nothing
call UnitAddItemByIdSwapped(what, subject)
endfunction
function NMSixMixerScript takes unit hero, integer one, integer two, integer three, integer four, integer five, integer six, integer result returns nothing
// 2 six + 2 five + 2 summon --> result
// one = summon_unit
// one + 2 two
// three + four + two
// 2 three + 2 five
// 2 four + 2 six
if (NMCheckItem(hero, one, 1)) then
if (NMCheckItem(hero, two, 2)) then
call NMRemoveItem(hero, one, 1)
call NMRemoveItem(hero, two, 2)
call NMAddItem(hero, result)
return
endif
endif
if (NMCheckItem(hero, three, 1)) then
if (NMCheckItem(hero, four, 1)) then
if (NMCheckItem(hero, two, 1)) then
call NMRemoveItem(hero, three, 1)
call NMRemoveItem(hero, four, 1)
call NMRemoveItem(hero, two, 1)
call NMAddItem(hero, result)
return
endif
endif
endif
if (NMCheckItem(hero, three, 2)) then
if (NMCheckItem(hero, five, 2)) then
call NMRemoveItem(hero, three, 2)
call NMRemoveItem(hero, five, 2)
call NMAddItem(hero, result)
return
endif
endif
if (NMCheckItem(hero, four, 2)) then
if (NMCheckItem(hero, six, 2)) then
call NMRemoveItem(hero, four, 2)
call NMRemoveItem(hero, six, 2)
call NMAddItem(hero, result)
return
endif
endif
endfunction
function NMThreeMixerScript takes unit hero, integer mOne, integer lOne, integer mTwo, integer lTwo, integer mThree, integer lThree, integer result returns nothing
if (NMCheckItem(hero, mOne, 1)) then
if (NMCheckItem(hero, lOne, 1)) then
call NMRemoveItem(hero, mOne, 1)
call NMRemoveItem(hero, lOne, 1)
call NMAddItem(hero, result)
return
endif
endif
if (NMCheckItem(hero, mTwo, 1)) then
if (NMCheckItem(hero, lTwo, 1)) then
call NMRemoveItem(hero, mTwo, 1)
call NMRemoveItem(hero, lTwo, 1)
call NMAddItem(hero, result)
return
endif
endif
if (NMCheckItem(hero, mThree, 1)) then
if (NMCheckItem(hero, lThree, 1)) then
call NMRemoveItem(hero, mThree, 1)
call NMRemoveItem(hero, lThree, 1)
call NMAddItem(hero, result)
return
endif
endif
endfunction
function NMabcdef_s takes unit hero, integer abc, integer def, integer ad, integer be, integer cf, integer res returns nothing
if (NMCheckItem(hero, abc, 1)) then
if (NMCheckItem(hero, def, 1)) then
call NMRemoveItem(hero, abc, 1)
call NMRemoveItem(hero, def, 1)
call NMAddItem(hero, res)
return
endif
endif
if (NMCheckItem(hero, ad, 1)) then
if (NMCheckItem(hero, be, 1)) then
if (NMCheckItem(hero, cf, 1)) then
call NMRemoveItem(hero, ad, 1)
call NMRemoveItem(hero, be, 1)
call NMRemoveItem(hero, cf, 1)
call NMAddItem(hero, res)
return
endif
endif
endif
endfunction
function NMabcdef takes unit hero, integer abc, integer def, integer ad, integer be, integer cf, integer ab, integer ac, integer bc, integer de, integer df, integer ef, integer res returns nothing
if (NMCheckItem(hero, abc, 1)) then
if (NMCheckItem(hero, def, 1)) then
call NMRemoveItem(hero, abc, 1)
call NMRemoveItem(hero, def, 1)
call NMAddItem(hero, res)
return
endif
endif
if (NMCheckItem(hero, ad, 1)) then
if (NMCheckItem(hero, be, 1)) then
if (NMCheckItem(hero, cf, 1)) then
call NMRemoveItem(hero, ad, 1)
call NMRemoveItem(hero, be, 1)
call NMRemoveItem(hero, cf, 1)
call NMAddItem(hero, res)
return
endif
endif
endif
if (NMCheckItem(hero, ab, 1)) then
if (NMCheckItem(hero, cf, 1)) then
if (NMCheckItem(hero, de, 1)) then
call NMRemoveItem(hero, ab, 1)
call NMRemoveItem(hero, cf, 1)
call NMRemoveItem(hero, de, 1)
call NMAddItem(hero, res)
return
endif
endif
endif
if (NMCheckItem(hero, ac, 1)) then
if (NMCheckItem(hero, be, 1)) then
if (NMCheckItem(hero, df, 1)) then
call NMRemoveItem(hero, ac, 1)
call NMRemoveItem(hero, be, 1)
call NMRemoveItem(hero, df, 1)
call NMAddItem(hero, res)
return
endif
endif
endif
if (NMCheckItem(hero, bc, 1)) then
if (NMCheckItem(hero, ad, 1)) then
if (NMCheckItem(hero, ef, 1)) then
call NMRemoveItem(hero, bc, 1)
call NMRemoveItem(hero, ad, 1)
call NMRemoveItem(hero, ef, 1)
call NMAddItem(hero, res)
return
endif
endif
endif
endfunction
function NMPure takes unit subject, integer basic returns nothing
if (NMCheckItem(subject, basic, 1)) then
if(NMCheckItem(subject, 'I03J', 1)) then
call NMRemoveItem(subject, 'I03J', 1)
call NMAddItem(subject, basic)
endif
endif
endfunction
function NMOneOfTwoSet takes unit subject, integer basic, integer Set, integer result returns nothing
if (NMCheckItem(subject, basic, 1)) then
if(NMCheckItem(subject, Set, 1)) then
call NMRemoveItem(subject, basic, 1)
call NMRemoveItem(subject, Set, 1)
call NMAddItem(subject, result)
endif
endif
endfunction
function NMMulti takes unit subject, integer basic, integer result returns nothing
call NMOneOfTwoSet(subject, basic, 'I03L', result)
endfunction
function NMOvercharge takes unit subject, integer basic, integer result returns nothing
call NMOneOfTwoSet(subject, basic, 'I03Z', result)
endfunction
function Trig_NewMixer_Actions takes nothing returns nothing
//seting basic elements
local integer earth='I007'
local integer water='I005'
local integer air='I001'
local integer fire='I000'
local integer darkness='I009'
local integer light='I00C'
local integer summon='I00G'
local integer rune='I00E'
local integer focus='I00A'
local integer blood='I003'
local integer will='I004'
local integer spirit='I006'
local integer time='I008'
//setting mixes of 2 elements
local integer bloodfire='I002'
local integer airlift='I00J'
local integer heal='I00K'
local integer earthstrike='I00L'
local integer darkstone='I00B'
local integer flash='I00D'
local integer summon_unit='I00F'
local integer thunder='I00M'
local integer explosion='I00N'
local integer energy='I00O'
local integer melt='I00P'
local integer mist='I00Q'
local integer ward='I00R'
local integer lesser_djinn='I00Z'
local integer disease='I00S'
local integer nature='I00T'
local integer illusion='I00U'
local integer ice='I00V'
local integer bind='I00W'
local integer wither='I00X'
local integer lesser_golem='I010'
local integer lesser_shape='I00Y'
local integer lesser_furie='I011'
local integer lesser_entity='I012'
local integer lesser_shade='I013'
local integer metaphysical_travel='I014'
local integer scrying='I015'
local integer recording='I016'
local integer spacetime='I017'
local integer gating='I018'
local integer enforcement='I019'
local integer molding='I01A'
local integer bloodgem_linking='I01B'
local integer truth='I01C'
local integer thought_reading='I01D'
local integer distilling_of_power='I01E'
local integer bewilling='I01F'
local integer anchoring='I01G'
local integer keying='I01H'
local integer foresight='I00I'
local integer preserve='I01I'
local integer empower='I01J'
local integer oath='I01K'
//setting pure 6-part spells
local integer sea_of_flames='I01L'
local integer windblades='I01M'
local integer tsunami='I01N'
local integer earthquake='I01O'
local integer sunstrike='I01P'
local integer nightstrike='I01Q'
local integer spacerift='I01R'
local integer lifeblood='I01S'
local integer pure_will='I00H'
local integer spell_weave='I01T'
local integer rewinder='I01U'
local integer refreshing_gem='I01V'
local integer blocking_circle='I01W'
//setting pure 6-part elementals
local integer earth_golem='I020'
local integer water_shape='I01Z'
local integer air_furie='I021'
local integer fire_djinn='I01Y'
local integer dark_shade='I022'
local integer light_entity='I023'
//setting remaining 6-part spells
local integer golem_shape='I024'
local integer golem_djinn='I025'
local integer golem_shade='I026'
local integer golem_entity='I027'
local integer shape_furie='I028'
local integer shape_shade='I029'
local integer shape_entity='I02A'
local integer furie_djinn='I02B'
local integer furie_shade='I02C'
local integer furie_entity='I02D'
local integer djinn_shade='I02E'
local integer djinn_entity='I02F'
local integer command='I02H'
local integer molded_tower='I02G'
local integer bloodstone='I02I'
local integer construct_of_truth='I02J'
local integer revealer='I02K'
local integer distilling_crystal='I02L'
local integer stabilizer='I02M'
local integer nulifier='I02N'
local integer keystone='I02O'
local integer displacer='I02P'
local integer safe='I02Q'
local integer mana_rune='I02R'
//setting banish
local integer item_banish='I01X'
//setting 3 mixes - whithout summons
local integer cold_blast='I02W'
local integer entangle='I02X'
local integer crumble='I02Y'
local integer mine='I02Z'
local integer icy_haze='I030'
local integer misty_forms='I031'
local integer dark_bolt='I032'
local integer item_lightning='I033'
local integer block='I034'
local integer restore='I035'
local integer mana_burner='I036'
local integer floating_stone='I037'
local integer precision='I038'
local integer haste='I039'
local integer rage='I03A'
local integer borrow_power='I03B'
//setting mixes of 6 components
local integer arctic_blast='I03C'
local integer regeneration='I03D'
local integer obliterate='I03E'
local integer mine_field='I03F'
local integer item_force='I03G'
local integer limit_breaker='I03H'
local integer death_bolt='I03I'
local integer stunner='I03K'
//setting multies
local integer m_earth='I03M'
local integer m_water='I03N'
local integer m_air='I03O'
local integer m_fire='I03P'
local integer m_darkness='I03Q'
local integer m_light='I03R'
local integer m_summon='I03S'
local integer m_rune='I03T'
local integer m_focus='I03U'
local integer m_will='I03W'
local integer m_blood='I03V'
local integer m_spirit='I03X'
local integer m_time='I03Y'
//setting overcharges
local integer o_earth='I040'
local integer o_water='I041'
local integer o_air='I042'
local integer o_fire='I043'
local integer o_darkness='I044'
local integer o_light='I045'
local integer o_summon='I046'
local integer o_rune='I047'
local integer o_focus='I048'
local integer o_will='I049'
local integer o_blood='I04A'
local integer o_spirit='I04B'
local integer o_time='I04C'
//stores triggering unit
local unit hero = GetTriggerUnit()
// Replace Pures
call NMPure (hero, earth)
call NMPure (hero, water)
call NMPure (hero, air)
call NMPure (hero, fire)
call NMPure (hero, darkness)
call NMPure (hero, light)
call NMPure (hero, summon)
call NMPure (hero, rune)
call NMPure (hero, focus)
call NMPure (hero, blood)
call NMPure (hero, will)
call NMPure (hero, spirit)
call NMPure (hero, time)
call NMPure (hero, 'I03J')
//Mix Multies
call NMMulti (hero, earth, m_earth)
call NMMulti (hero, water, m_water)
call NMMulti (hero, air, m_air)
call NMMulti (hero, fire, m_fire)
call NMMulti (hero, darkness, m_darkness)
call NMMulti (hero, light, m_light)
call NMMulti (hero, summon, m_summon)
call NMMulti (hero, rune, m_rune)
call NMMulti (hero, focus, m_focus)
call NMMulti (hero, will, m_will)
call NMMulti (hero, blood, m_blood)
call NMMulti (hero, spirit, m_spirit)
call NMMulti (hero, time, m_time)
//Mix Overcharges
call NMOvercharge (hero, earth, o_earth)
call NMOvercharge (hero, water, o_water)
call NMOvercharge (hero, air, o_air)
call NMOvercharge (hero, fire, o_fire)
call NMOvercharge (hero, darkness, o_darkness)
call NMOvercharge (hero, light, o_light)
call NMOvercharge (hero, summon, o_summon)
call NMOvercharge (hero, rune, o_rune)
call NMOvercharge (hero, focus, o_focus)
call NMOvercharge (hero, will, o_will)
call NMOvercharge (hero, blood, o_blood)
call NMOvercharge (hero, spirit, o_spirit)
call NMOvercharge (hero, time, o_time)
// 2 summon --> summon unit
if ( NMCheckItem(hero, summon, 2)) then
call NMRemoveItem(hero, summon, 2)
call NMAddItem(hero, summon_unit)
endif
// fire + blood --> bloodfire
if (NMCheckItem(hero, fire, 1)) then
if(NMCheckItem(hero, blood, 1)) then
call NMRemoveItem(hero, fire, 1)
call NMRemoveItem(hero, blood, 1)
call NMAddItem(hero, bloodfire)
endif
endif
// air + will --> airlift
if (NMCheckItem(hero, air, 1)) then
if(NMCheckItem(hero, will, 1)) then
call NMRemoveItem(hero, air, 1)
call NMRemoveItem(hero, will, 1)
call NMAddItem(hero, airlift)
endif
endif
// water + spirit --> heal
if (NMCheckItem(hero, water, 1)) then
if(NMCheckItem(hero, spirit, 1)) then
call NMRemoveItem(hero, water, 1)
call NMRemoveItem(hero, spirit, 1)
call NMAddItem(hero, heal)
endif
endif
// earth + time --> earthstrike
if (NMCheckItem(hero, earth, 1)) then
if(NMCheckItem(hero, time, 1)) then
call NMRemoveItem(hero, earth, 1)
call NMRemoveItem(hero, time, 1)
call NMAddItem(hero, earthstrike)
endif
endif
// darkness + focus --> darkstone
if (NMCheckItem(hero, darkness, 1)) then
if(NMCheckItem(hero, focus, 1)) then
call NMRemoveItem(hero, darkness, 1)
call NMRemoveItem(hero, focus, 1)
call NMAddItem(hero, darkstone)
endif
endif
// light + rune --> flash
if (NMCheckItem(hero, light, 1)) then
if(NMCheckItem(hero, rune, 1)) then
call NMRemoveItem(hero, light, 1)
call NMRemoveItem(hero, rune, 1)
call NMAddItem(hero, flash)
endif
endif
// fire + air --> thunder
if (NMCheckItem(hero, fire, 1)) then
if(NMCheckItem(hero, air, 1)) then
call NMRemoveItem(hero, fire, 1)
call NMRemoveItem(hero, air, 1)
call NMAddItem(hero, thunder)
endif
endif
// fire + earth --> explosion
if (NMCheckItem(hero, fire, 1)) then
if(NMCheckItem(hero, earth, 1)) then
call NMRemoveItem(hero, fire, 1)
call NMRemoveItem(hero, earth, 1)
call NMAddItem(hero, explosion)
endif
endif
// fire + light --> energy
if (NMCheckItem(hero, fire, 1)) then
if(NMCheckItem(hero, light, 1)) then
call NMRemoveItem(hero, fire, 1)
call NMRemoveItem(hero, light, 1)
call NMAddItem(hero, energy)
endif
endif
// fire + darkness --> melt
if (NMCheckItem(hero, fire, 1)) then
if(NMCheckItem(hero, darkness, 1)) then
call NMRemoveItem(hero, fire, 1)
call NMRemoveItem(hero, darkness, 1)
call NMAddItem(hero, melt)
endif
endif
// air + water --> mist
if (NMCheckItem(hero, air, 1)) then
if(NMCheckItem(hero, water, 1)) then
call NMRemoveItem(hero, air, 1)
call NMRemoveItem(hero, water, 1)
call NMAddItem(hero, mist)
endif
endif
// air + light --> ward
//setting local variables for easier script changes
if (NMCheckItem(hero, air, 1)) then
if(NMCheckItem(hero, light, 1)) then
call NMRemoveItem(hero, air, 1)
call NMRemoveItem(hero, light, 1)
call NMAddItem(hero, ward)
endif
endif
// air + darkness --> disease
if (NMCheckItem(hero, air, 1)) then
if(NMCheckItem(hero, darkness, 1)) then
call NMRemoveItem(hero, air, 1)
call NMRemoveItem(hero, darkness, 1)
call NMAddItem(hero, disease)
endif
endif
// water + earth --> nature
if (NMCheckItem(hero, water, 1)) then
if(NMCheckItem(hero, earth, 1)) then
call NMRemoveItem(hero, water, 1)
call NMRemoveItem(hero, earth, 1)
call NMAddItem(hero, nature)
endif
endif
// water + darkness --> ice
if (NMCheckItem(hero, water, 1)) then
if(NMCheckItem(hero, darkness, 1)) then
call NMRemoveItem(hero, water, 1)
call NMRemoveItem(hero, darkness, 1)
call NMAddItem(hero, ice)
endif
endif
// water + light --> illusion
if (NMCheckItem(hero, water, 1)) then
if(NMCheckItem(hero, light, 1)) then
call NMRemoveItem(hero, water, 1)
call NMRemoveItem(hero, light, 1)
call NMAddItem(hero, illusion)
endif
endif
// earth + light --> bind
if (NMCheckItem(hero, earth, 1)) then
if(NMCheckItem(hero, light, 1)) then
call NMRemoveItem(hero, earth, 1)
call NMRemoveItem(hero, light, 1)
call NMAddItem(hero, bind)
endif
endif
// earth + darkness --> wither
if (NMCheckItem(hero, earth, 1)) then
if(NMCheckItem(hero, darkness, 1)) then
call NMRemoveItem(hero, earth, 1)
call NMRemoveItem(hero, darkness, 1)
call NMAddItem(hero, wither)
endif
endif
// summon + water --> summon lesser shape
if (NMCheckItem(hero, summon, 1)) then
if(NMCheckItem(hero, water, 1)) then
call NMRemoveItem(hero, summon, 1)
call NMRemoveItem(hero, water, 1)
call NMAddItem(hero, lesser_shape)
endif
endif
// summon + earth --> summon lesser golem
if (NMCheckItem(hero, summon, 1)) then
if(NMCheckItem(hero, earth, 1)) then
call NMRemoveItem(hero, summon, 1)
call NMRemoveItem(hero, earth, 1)
call NMAddItem(hero, lesser_golem)
endif
endif
// summon + air --> summon lesser furie
if (NMCheckItem(hero, summon, 1)) then
if(NMCheckItem(hero, air, 1)) then
call NMRemoveItem(hero, summon, 1)
call NMRemoveItem(hero, air, 1)
call NMAddItem(hero, lesser_furie)
endif
endif
// summon + fire --> summon lesser djinn
if (NMCheckItem(hero, summon, 1)) then
if(NMCheckItem(hero, fire, 1)) then
call NMRemoveItem(hero, summon, 1)
call NMRemoveItem(hero, fire, 1)
call NMAddItem(hero, lesser_djinn)
endif
endif
// summon + darkness --> summon lesser shade
if (NMCheckItem(hero, summon, 1)) then
if(NMCheckItem(hero, darkness, 1)) then
call NMRemoveItem(hero, summon, 1)
call NMRemoveItem(hero, darkness, 1)
call NMAddItem(hero, lesser_shade)
endif
endif
// summon + light --> summon lesser entity
if (NMCheckItem(hero, summon, 1)) then
if(NMCheckItem(hero, light, 1)) then
call NMRemoveItem(hero, summon, 1)
call NMRemoveItem(hero, light, 1)
call NMAddItem(hero, lesser_entity)
endif
endif
// summon + spirit --> metaphysical travel
if (NMCheckItem(hero, summon, 1)) then
if(NMCheckItem(hero, spirit, 1)) then
call NMRemoveItem(hero, summon, 1)
call NMRemoveItem(hero, spirit, 1)
call NMAddItem(hero, metaphysical_travel)
endif
endif
// summon + will --> scrying
if (NMCheckItem(hero, summon, 1)) then
if(NMCheckItem(hero, will, 1)) then
call NMRemoveItem(hero, summon, 1)
call NMRemoveItem(hero, will, 1)
call NMAddItem(hero, scrying)
endif
endif
// summon + focus --> recording
if (NMCheckItem(hero, summon, 1)) then
if(NMCheckItem(hero, focus, 1)) then
call NMRemoveItem(hero, summon, 1)
call NMRemoveItem(hero, focus, 1)
call NMAddItem(hero, recording)
endif
endif
// summon + time --> spacetime
if (NMCheckItem(hero, summon, 1)) then
if(NMCheckItem(hero, time, 1)) then
call NMRemoveItem(hero, summon, 1)
call NMRemoveItem(hero, time, 1)
call NMAddItem(hero, spacetime)
endif
endif
// summon + rune --> gating
if (NMCheckItem(hero, summon, 1)) then
if(NMCheckItem(hero, rune, 1)) then
call NMRemoveItem(hero, summon, 1)
call NMRemoveItem(hero, rune, 1)
call NMAddItem(hero, gating)
endif
endif
// blood + will --> enforcement
if (NMCheckItem(hero, blood, 1)) then
if(NMCheckItem(hero, will, 1)) then
call NMRemoveItem(hero, blood, 1)
call NMRemoveItem(hero, will, 1)
call NMAddItem(hero, enforcement)
endif
endif
// blood + time --> molding
if (NMCheckItem(hero, blood, 1)) then
if(NMCheckItem(hero, time, 1)) then
call NMRemoveItem(hero, blood, 1)
call NMRemoveItem(hero, time, 1)
call NMAddItem(hero, molding)
endif
endif
// blood + focus --> bloodgem linking
if (NMCheckItem(hero, blood, 1)) then
if(NMCheckItem(hero, focus, 1)) then
call NMRemoveItem(hero, blood, 1)
call NMRemoveItem(hero, focus, 1)
call NMAddItem(hero, bloodgem_linking)
endif
endif
// blood + rune --> truth
if (NMCheckItem(hero, blood, 1)) then
if(NMCheckItem(hero, rune, 1)) then
call NMRemoveItem(hero, blood, 1)
call NMRemoveItem(hero, rune, 1)
call NMAddItem(hero, truth)
endif
endif
// will + spirit --> thought reading
if (NMCheckItem(hero, will, 1)) then
if(NMCheckItem(hero, spirit, 1)) then
call NMRemoveItem(hero, will, 1)
call NMRemoveItem(hero, spirit, 1)
call NMAddItem(hero, thought_reading)
endif
endif
// will + focus --> distilling of power
if (NMCheckItem(hero, will, 1)) then
if(NMCheckItem(hero, focus, 1)) then
call NMRemoveItem(hero, will, 1)
call NMRemoveItem(hero, focus, 1)
call NMAddItem(hero, distilling_of_power)
endif
endif
// will + rune --> bewilling
if (NMCheckItem(hero, will, 1)) then
if(NMCheckItem(hero, rune, 1)) then
call NMRemoveItem(hero, will, 1)
call NMRemoveItem(hero, rune, 1)
call NMAddItem(hero, bewilling)
endif
endif
// focus + time --> anchoring
if (NMCheckItem(hero, focus, 1)) then
if(NMCheckItem(hero, time, 1)) then
call NMRemoveItem(hero, focus, 1)
call NMRemoveItem(hero, time, 1)
call NMAddItem(hero, anchoring)
endif
endif
// focus + spirit --> keying
if (NMCheckItem(hero, focus, 1)) then
if(NMCheckItem(hero, spirit, 1)) then
call NMRemoveItem(hero, focus, 1)
call NMRemoveItem(hero, spirit, 1)
call NMAddItem(hero, keying)
endif
endif
// time + spirit --> foresight
if (NMCheckItem(hero, time, 1)) then
if(NMCheckItem(hero, spirit, 1)) then
call NMRemoveItem(hero, time, 1)
call NMRemoveItem(hero, spirit, 1)
call NMAddItem(hero, foresight)
endif
endif
// time + rune --> preserve
if (NMCheckItem(hero, time, 1)) then
if(NMCheckItem(hero, rune, 1)) then
call NMRemoveItem(hero, time, 1)
call NMRemoveItem(hero, rune, 1)
call NMAddItem(hero, preserve)
endif
endif
// rune + spirit --> empower
if (NMCheckItem(hero, rune, 1)) then
if(NMCheckItem(hero, spirit, 1)) then
call NMRemoveItem(hero, rune, 1)
call NMRemoveItem(hero, spirit, 1)
call NMAddItem(hero, empower)
endif
endif
// blood + summon --> oath
if (NMCheckItem(hero, blood, 1)) then
if(NMCheckItem(hero, summon, 1)) then
call NMRemoveItem(hero, blood, 1)
call NMRemoveItem(hero, summon, 1)
call NMAddItem(hero, oath)
endif
endif
// 6 multiply --> overcharge
if (NMCheckItem(hero, 'I03L', 6)) then
call NMRemoveItem(hero, 'I03L', 6)
call NMAddItem(hero, 'I03Z')
endif
// 6 Fire --> Flame Rain
if (NMCheckItem(hero, fire, 6)) then
call NMRemoveItem(hero, fire, 6)
call NMAddItem(hero, sea_of_flames)
endif
// 6 Air --> Windblades
if (NMCheckItem(hero, air, 6)) then
call NMRemoveItem(hero, air, 6)
call NMAddItem(hero, windblades)
endif
// 6 water --> Tsunami
if (NMCheckItem(hero, water, 6)) then
call NMRemoveItem(hero, water, 6)
call NMAddItem(hero, tsunami)
endif
// 6 Earth --> Earthquake
if (NMCheckItem(hero, earth, 6)) then
call NMRemoveItem(hero, earth, 6)
call NMAddItem(hero, earthquake)
endif
// 6 light --> Sunstrike
if (NMCheckItem(hero, light, 6)) then
call NMRemoveItem(hero, light, 6)
call NMAddItem(hero, sunstrike)
endif
// 6 darkness --> nightstrike
if (NMCheckItem(hero, darkness, 6)) then
call NMRemoveItem(hero, darkness, 6)
call NMAddItem(hero, nightstrike)
endif
// 3 summon unit (6 summon) --> spaceripft
if (NMCheckItem(hero, summon_unit, 3)) then
call NMRemoveItem(hero, summon_unit, 3)
call NMAddItem(hero, spacerift)
endif
// 6 Blood --> Lifeblood
if (NMCheckItem(hero, blood, 6)) then
call NMRemoveItem(hero, blood, 6)
call NMAddItem(hero, lifeblood)
endif
// 6 Will --> Pure Will
if (NMCheckItem(hero, will, 6)) then
call NMRemoveItem(hero, will, 6)
call NMAddItem(hero, pure_will)
endif
// 6 spirit --> spell weave
if (NMCheckItem(hero, spirit, 6)) then
call NMRemoveItem(hero, spirit, 6)
call NMAddItem(hero, spell_weave)
endif
// 6 Time --> Rewinder
if (NMCheckItem(hero, time, 6)) then
call NMRemoveItem(hero, time, 6)
call NMAddItem(hero, rewinder)
endif
// 6 Focus --> Refreshing Gem
if (NMCheckItem(hero, focus, 6)) then
call NMRemoveItem(hero, focus, 6)
call NMAddItem(hero, refreshing_gem)
endif
// 6 rune --> blocking circle
if (NMCheckItem(hero, rune, 6)) then
call NMRemoveItem(hero, rune, 6)
call NMAddItem(hero, blocking_circle)
endif
// 3 Spacerift (18 summon) --> Banish
if (NMCheckItem(hero, spacerift, 3)) then
call NMRemoveItem(hero, spacerift, 3)
call NMAddItem(hero, item_banish)
endif
// summon earth golem, 4 versions
// summon unit + 2 earthstrike = summon earth golem
// summmon lesser golem + spacetime + earthstrike = summon earth golem
// 2 summon lesser golem + 2 time = summon earth golem
// 2 spacetime + 2 earth = summon earth golem
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, earthstrike, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, earthstrike, 2)
call NMAddItem(hero, earth_golem)
endif
endif
if (NMCheckItem(hero, lesser_golem, 1)) then
if (NMCheckItem(hero, spacetime, 1)) then
if (NMCheckItem(hero, earthstrike, 1)) then
call NMRemoveItem(hero, lesser_golem, 1)
call NMRemoveItem(hero, spacetime, 1)
call NMRemoveItem(hero, earthstrike, 1)
call NMAddItem(hero, earth_golem)
endif
endif
endif
if (NMCheckItem(hero, lesser_golem, 2)) then
if (NMCheckItem(hero, time, 2)) then
call NMRemoveItem(hero, lesser_golem, 2)
call NMRemoveItem(hero, time, 2)
call NMAddItem(hero, earth_golem)
endif
endif
if (NMCheckItem(hero, spacetime, 2)) then
if (NMCheckItem(hero, earth, 2)) then
call NMRemoveItem(hero, spacetime, 2)
call NMRemoveItem(hero, earth, 2)
call NMAddItem(hero, earth_golem)
endif
endif
// summon water shape
// summon unit + 2 heal = summon water shape
// summon lesser shape + metaphysical travel + heal = summon water shape
// 2 summon lesser shape + 2 spirit = summon water shape
// 2 metaphysical travel + 2 water = summon water shape
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, heal, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, heal, 2)
call NMAddItem(hero, water_shape)
endif
endif
if (NMCheckItem(hero, lesser_shape, 1)) then
if (NMCheckItem(hero, metaphysical_travel, 1)) then
if (NMCheckItem(hero, heal, 1)) then
call NMRemoveItem(hero, lesser_shape, 1)
call NMRemoveItem(hero, metaphysical_travel, 1)
call NMRemoveItem(hero, heal, 1)
call NMAddItem(hero, water_shape)
endif
endif
endif
if (NMCheckItem(hero, lesser_shape, 2)) then
if (NMCheckItem(hero, spirit, 2)) then
call NMRemoveItem(hero, lesser_shape, 2)
call NMRemoveItem(hero, spirit, 2)
call NMAddItem(hero, water_shape)
endif
endif
if (NMCheckItem(hero, metaphysical_travel, 2)) then
if (NMCheckItem(hero, water, 2)) then
call NMRemoveItem(hero, metaphysical_travel, 2)
call NMRemoveItem(hero, water, 2)
call NMAddItem(hero, water_shape)
endif
endif
// 2 Air + 2 Will + 2 Summon --> Summon Air Furie
// summon unit + 2 airlift
// summon lesser furie + scrying + airlift
// 2 summon lesser furie + 2 will
// 2 scrying + 2 air
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, airlift, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, airlift, 2)
call NMAddItem(hero, air_furie)
endif
endif
if (NMCheckItem(hero, lesser_furie, 1)) then
if (NMCheckItem(hero, scrying, 1)) then
if (NMCheckItem(hero, airlift, 1)) then
call NMRemoveItem(hero, lesser_furie, 1)
call NMRemoveItem(hero, scrying, 1)
call NMRemoveItem(hero, airlift, 1)
call NMAddItem(hero, air_furie)
endif
endif
endif
if (NMCheckItem(hero, lesser_furie, 2)) then
if (NMCheckItem(hero, will, 2)) then
call NMRemoveItem(hero, lesser_furie, 2)
call NMRemoveItem(hero, will, 2)
call NMAddItem(hero, air_furie)
endif
endif
if (NMCheckItem(hero, scrying, 2)) then
if (NMCheckItem(hero, air, 2)) then
call NMRemoveItem(hero, scrying, 2)
call NMRemoveItem(hero, air, 2)
call NMAddItem(hero, air_furie)
endif
endif
// 2 fire + 2 blood + 2 summon --> summon fire djinn
// summon unit + 2 bloodfire
// summon lesser djinn + oath + bloodfire
// 2 summon lesser djinn + 2 blood
// 2 oath + 2 fire
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, bloodfire, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, bloodfire, 2)
call NMAddItem(hero, fire_djinn)
endif
endif
if (NMCheckItem(hero, lesser_djinn, 1)) then
if (NMCheckItem(hero, oath, 1)) then
if (NMCheckItem(hero, bloodfire, 1)) then
call NMRemoveItem(hero, lesser_djinn, 1)
call NMRemoveItem(hero, oath, 1)
call NMRemoveItem(hero, bloodfire, 1)
call NMAddItem(hero, fire_djinn)
endif
endif
endif
if (NMCheckItem(hero, lesser_djinn, 2)) then
if (NMCheckItem(hero, blood, 2)) then
call NMRemoveItem(hero, lesser_djinn, 2)
call NMRemoveItem(hero, blood, 2)
call NMAddItem(hero, fire_djinn)
endif
endif
if (NMCheckItem(hero, oath, 2)) then
if (NMCheckItem(hero, fire, 2)) then
call NMRemoveItem(hero, oath, 2)
call NMRemoveItem(hero, fire, 2)
call NMAddItem(hero, fire_djinn)
endif
endif
// 2 summon + 2 darkness + 2 focus --> summon dark shade
// summon unit + 2 darkstone
// summon lesser shade + recording + darkstone
// 2 summon lesser shade + 2 focus
// 2 oath + 2 darkness
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, darkstone, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, darkstone, 2)
call NMAddItem(hero, dark_shade)
endif
endif
if (NMCheckItem(hero, lesser_shade, 1)) then
if (NMCheckItem(hero, recording, 1)) then
if (NMCheckItem(hero, darkstone, 1)) then
call NMRemoveItem(hero, lesser_shade, 1)
call NMRemoveItem(hero, recording, 1)
call NMRemoveItem(hero, darkstone, 1)
call NMAddItem(hero, dark_shade)
endif
endif
endif
if (NMCheckItem(hero, lesser_shade, 2)) then
if (NMCheckItem(hero, focus, 2)) then
call NMRemoveItem(hero, lesser_shade, 2)
call NMRemoveItem(hero, focus, 2)
call NMAddItem(hero, dark_shade)
endif
endif
if (NMCheckItem(hero, recording, 2)) then
if (NMCheckItem(hero, darkness, 2)) then
call NMRemoveItem(hero, recording, 2)
call NMRemoveItem(hero, darkness, 2)
call NMAddItem(hero, dark_shade)
endif
endif
// 2 summon + 2 light + 2 rune --> summon light entity
// summon unit + 2 flash
// summon lesser entity + gating + flash
// 2 summon lesser entity + 2 rune
// 2 gating + 2 light
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, flash, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, flash, 2)
call NMAddItem(hero, light_entity)
endif
endif
if (NMCheckItem(hero, lesser_entity, 1)) then
if (NMCheckItem(hero, gating, 1)) then
if (NMCheckItem(hero, flash, 1)) then
call NMRemoveItem(hero, lesser_entity, 1)
call NMRemoveItem(hero, gating, 1)
call NMRemoveItem(hero, flash, 1)
call NMAddItem(hero, light_entity)
endif
endif
endif
if (NMCheckItem(hero, lesser_entity, 2)) then
if (NMCheckItem(hero, rune, 2)) then
call NMRemoveItem(hero, lesser_entity, 2)
call NMRemoveItem(hero, rune, 2)
call NMAddItem(hero, light_entity)
endif
endif
if (NMCheckItem(hero, gating, 2)) then
if (NMCheckItem(hero, light, 2)) then
call NMRemoveItem(hero, gating, 2)
call NMRemoveItem(hero, light, 2)
call NMAddItem(hero, light_entity)
endif
endif
// 2 water + 2 earth + 2 summon --> summon golem_shape
// summon unit + 2 nature
// summon lesser golem + summon lesser shape + nature
// 2 summon lesser golem + 2 water
// 2 summon lesser shape + 2 earth
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, nature, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, nature, 2)
call NMAddItem(hero, golem_shape)
endif
endif
if (NMCheckItem(hero, lesser_golem, 1)) then
if (NMCheckItem(hero, lesser_shape, 1)) then
if (NMCheckItem(hero, nature, 1)) then
call NMRemoveItem(hero, lesser_golem, 1)
call NMRemoveItem(hero, lesser_shape, 1)
call NMRemoveItem(hero, nature, 1)
call NMAddItem(hero, golem_shape)
endif
endif
endif
if (NMCheckItem(hero, lesser_golem, 2)) then
if (NMCheckItem(hero, water, 2)) then
call NMRemoveItem(hero, lesser_golem, 2)
call NMRemoveItem(hero, water, 2)
call NMAddItem(hero, golem_shape)
endif
endif
if (NMCheckItem(hero, lesser_shape, 2)) then
if (NMCheckItem(hero, earth, 2)) then
call NMRemoveItem(hero, lesser_shape, 2)
call NMRemoveItem(hero, earth, 2)
call NMAddItem(hero, golem_shape)
endif
endif
// 2 earth + 2 fire + 2 summon --> summon golem-djinn
// summon unit + 2 explosion
// summon lesser golem + summon lesser djinn + explosion
// 2 summon lesser golem + 2 fire
// 2 summon lesser djinn + 2 earth
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, explosion, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, explosion, 2)
call NMAddItem(hero, golem_djinn)
endif
endif
if (NMCheckItem(hero, lesser_golem, 1)) then
if (NMCheckItem(hero, lesser_djinn, 1)) then
if (NMCheckItem(hero, explosion, 1)) then
call NMRemoveItem(hero, lesser_golem, 1)
call NMRemoveItem(hero, lesser_djinn, 1)
call NMRemoveItem(hero, explosion, 1)
call NMAddItem(hero, golem_djinn)
endif
endif
endif
if (NMCheckItem(hero, lesser_golem, 2)) then
if (NMCheckItem(hero, fire, 2)) then
call NMRemoveItem(hero, lesser_golem, 2)
call NMRemoveItem(hero, fire, 2)
call NMAddItem(hero, golem_djinn)
endif
endif
if (NMCheckItem(hero, lesser_djinn, 2)) then
if (NMCheckItem(hero, earth, 2)) then
call NMRemoveItem(hero, lesser_djinn, 2)
call NMRemoveItem(hero, earth, 2)
call NMAddItem(hero, golem_djinn)
endif
endif
// 2 earth + 2 darkness + 2 summon --> golem-shade
// summon unit + 2 wither
// summon lesser golem + summon lesser shade + wither
// 2 summon lesser golem + 2 darkness
// 2 summon lesser shade + 2 earth
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, wither, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, wither, 2)
call NMAddItem(hero, golem_shade)
endif
endif
if (NMCheckItem(hero, lesser_golem, 1)) then
if (NMCheckItem(hero, lesser_shade, 1)) then
if (NMCheckItem(hero, wither, 1)) then
call NMRemoveItem(hero, lesser_golem, 1)
call NMRemoveItem(hero, lesser_shade, 1)
call NMRemoveItem(hero, wither, 1)
call NMAddItem(hero, golem_shade)
endif
endif
endif
if (NMCheckItem(hero, lesser_golem, 2)) then
if (NMCheckItem(hero, darkness, 2)) then
call NMRemoveItem(hero, lesser_golem, 2)
call NMRemoveItem(hero, darkness, 2)
call NMAddItem(hero, golem_shade)
endif
endif
if (NMCheckItem(hero, lesser_shade, 2)) then
if (NMCheckItem(hero, earth, 2)) then
call NMRemoveItem(hero, lesser_shade, 2)
call NMRemoveItem(hero, earth, 2)
call NMAddItem(hero, golem_shade)
endif
endif
// 2 earth + 2 light + 2 summon --> summon golem-entity
// summon unit + 2 bind
// summon lesser golem + summon lesser entity + bind
// 2 summon lesser golem + 2 light
// 2 summon lesser entity + 2 earth
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, bind, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, bind, 2)
call NMAddItem(hero, golem_entity)
endif
endif
if (NMCheckItem(hero, lesser_golem, 1)) then
if (NMCheckItem(hero, lesser_entity, 1)) then
if (NMCheckItem(hero, bind, 1)) then
call NMRemoveItem(hero, lesser_golem, 1)
call NMRemoveItem(hero, lesser_entity, 1)
call NMRemoveItem(hero, bind, 1)
call NMAddItem(hero, golem_entity)
endif
endif
endif
if (NMCheckItem(hero, lesser_golem, 2)) then
if (NMCheckItem(hero, light, 2)) then
call NMRemoveItem(hero, lesser_golem, 2)
call NMRemoveItem(hero, light, 2)
call NMAddItem(hero, golem_entity)
endif
endif
if (NMCheckItem(hero, lesser_entity, 2)) then
if (NMCheckItem(hero, earth, 2)) then
call NMRemoveItem(hero, lesser_entity, 2)
call NMRemoveItem(hero, earth, 2)
call NMAddItem(hero, golem_entity)
endif
endif
// 2 water + 2 air + 2 summon --> shape-furie
// summon unit + 2 mist
// summon lesser shape + summon lesser furie + mist
// 2 summon lesser shape + 2 air
// 2 summon lesser furie + 2 water
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, mist, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, mist, 2)
call NMAddItem(hero, shape_furie)
endif
endif
if (NMCheckItem(hero, lesser_shape, 1)) then
if (NMCheckItem(hero, lesser_furie, 1)) then
if (NMCheckItem(hero, mist, 1)) then
call NMRemoveItem(hero, lesser_shape, 1)
call NMRemoveItem(hero, lesser_furie, 1)
call NMRemoveItem(hero, mist, 1)
call NMAddItem(hero, shape_furie)
endif
endif
endif
if (NMCheckItem(hero, lesser_shape, 2)) then
if (NMCheckItem(hero, air, 2)) then
call NMRemoveItem(hero, lesser_shape, 2)
call NMRemoveItem(hero, air, 2)
call NMAddItem(hero, shape_furie)
endif
endif
if (NMCheckItem(hero, lesser_furie, 2)) then
if (NMCheckItem(hero, water, 2)) then
call NMRemoveItem(hero, lesser_furie, 2)
call NMRemoveItem(hero, water, 2)
call NMAddItem(hero, shape_furie)
endif
endif
// 2 water + 2 darkness + 2 summon --> shape-shade
// summon unit + 2 ice
// summon lesser shape + summon lesser shade + ice
// 2 summon lesser shape + 2 darkness
// 2 summon lesser shade + 2 water
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, ice, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, ice, 2)
call NMAddItem(hero, shape_shade)
endif
endif
if (NMCheckItem(hero, lesser_shape, 1)) then
if (NMCheckItem(hero, lesser_shade, 1)) then
if (NMCheckItem(hero, ice, 1)) then
call NMRemoveItem(hero, lesser_shape, 1)
call NMRemoveItem(hero, lesser_shade, 1)
call NMRemoveItem(hero, ice, 1)
call NMAddItem(hero, shape_shade)
endif
endif
endif
if (NMCheckItem(hero, lesser_shape, 2)) then
if (NMCheckItem(hero, darkness, 2)) then
call NMRemoveItem(hero, lesser_shape, 2)
call NMRemoveItem(hero, darkness, 2)
call NMAddItem(hero, shape_shade)
endif
endif
if (NMCheckItem(hero, lesser_shade, 2)) then
if (NMCheckItem(hero, water, 2)) then
call NMRemoveItem(hero, lesser_shade, 2)
call NMRemoveItem(hero, water, 2)
call NMAddItem(hero, shape_shade)
endif
endif
// 2 water + 2 light + 2 summon --> summon shape-entity
// summon unit + 2 illusion
// summon lesser shape + summon lesser entity + illusion
// 2 summon lesser shape + 2 light
// 2 summon lesser entity + 2 water
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, illusion, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, illusion, 2)
call NMAddItem(hero, shape_entity)
endif
endif
if (NMCheckItem(hero, lesser_shape, 1)) then
if (NMCheckItem(hero, lesser_entity, 1)) then
if (NMCheckItem(hero, illusion, 1)) then
call NMRemoveItem(hero, lesser_shape, 1)
call NMRemoveItem(hero, lesser_entity, 1)
call NMRemoveItem(hero, illusion, 1)
call NMAddItem(hero, shape_entity)
endif
endif
endif
if (NMCheckItem(hero, lesser_shape, 2)) then
if (NMCheckItem(hero, light, 2)) then
call NMRemoveItem(hero, lesser_shape, 2)
call NMRemoveItem(hero, light, 2)
call NMAddItem(hero, shape_entity)
endif
endif
if (NMCheckItem(hero, lesser_entity, 2)) then
if (NMCheckItem(hero, water, 2)) then
call NMRemoveItem(hero, lesser_entity, 2)
call NMRemoveItem(hero, water, 2)
call NMAddItem(hero, shape_entity)
endif
endif
// 2 air + 2 fire + 2 summon --> furie-djinn
// summon unit + 2 thunder
// summon lesser furie + summon lesser djinn + thunder
// 2 summon lesser furie + 2 fire
// 2 summon lesser djinn + 2 air
if (NMCheckItem(hero, summon_unit, 1)) then
if (NMCheckItem(hero, thunder, 2)) then
call NMRemoveItem(hero, summon_unit, 1)
call NMRemoveItem(hero, thunder, 2)
call NMAddItem(hero, furie_djinn)
endif
endif
if (NMCheckItem(hero, lesser_furie, 1)) then
if (NMCheckItem(hero, lesser_djinn, 1)) then
if (NMCheckItem(hero, thunder, 1)) then
call NMRemoveItem(hero, lesser_furie, 1)
call NMRemoveItem(hero, lesser_djinn, 1)
call NMRemoveItem(hero, thunder, 1)
call NMAddItem(hero, furie_djinn)
endif
endif
endif
if (NMCheckItem(hero, lesser_furie, 2)) then
if (NMCheckItem(hero, fire, 2)) then
call NMRemoveItem(hero, lesser_furie, 2)
call NMRemoveItem(hero, fire, 2)
call NMAddItem(hero, furie_djinn)
endif
endif
if (NMCheckItem(hero, lesser_djinn, 2)) then
if (NMCheckItem(hero, air, 2)) then
call NMRemoveItem(hero, lesser_djinn, 2)
call NMRemoveItem(hero, air, 2)
call NMAddItem(hero, furie_djinn)
endif
endif
//2 Air + 2 Darkness + 2 Summon --> furie-shade
// summon_unit + 2 disease
// summon lesser furie + summon lesser shade + disease
// 2 summon lesser furie + 2 darkness
// 2 summon lesser djinn + 2 air
call NMSixMixerScript(hero, summon_unit, disease, lesser_furie, lesser_shade, darkness, air, furie_shade)
//2 Air + 2 Light + 2 Summon --> furie-Entity
// summon unit + 2 ward
// summon lesser furie + summon lesser entity + ward
// 2 summon lesser furie + 2 light
// 2 summon lesser entity + 2 air
call NMSixMixerScript(hero, summon_unit, ward, lesser_furie, lesser_entity, light, air, furie_entity)
//2 Fire + 2 Darkness + 2 Summon --> Djinn-Shade
// summon unit + 2 melt
// summon lesser djinn + summon lesser shade + melt
// 2 summon lesser djinn + 2 darkness
// 2 summon lesser shade + 2 fire
call NMSixMixerScript(hero, summon_unit, melt, lesser_djinn, lesser_shade, darkness, fire, djinn_shade)
//2 Fire + 2 Light + 2 Summon --> Djinn-Entity
// summon unit + 2 energy
// summon lesser djinn + summon lesser entity + energy
// 2 summon lesser djinn + 2 light
// 2 summon lesser entity + 2 fire
call NMSixMixerScript(hero, summon_unit, energy, lesser_djinn, lesser_shade, light, fire, djinn_entity)
//2 blood + 2 will + 2 summon --> command
// summon unit + 2 enforcement
// oath + scrying + enforcement
// 2 oath + 2 will
// 2 scrying + 2 blood
call NMSixMixerScript(hero, summon_unit, enforcement, oath, scrying, will, blood, command)
//2 blood + 2 time + 2 summon --> molded tower
// summon unit + 2 molding
// oath + spacetime + molding
// 2 oath + 2 time
// 2 spacetime + 2 blood
call NMSixMixerScript(hero, summon_unit, molding, oath, spacetime, time, blood, molded_tower)
//2 blood + 2 focus + 2 summon --> bloodstone
// summon unit + 2 bloodgem linking
// oath + recording + bloodgem linking
// 2 oath + 2 focus
// 2 recording + 2 blood
call NMSixMixerScript(hero, summon_unit, bloodgem_linking, oath, recording, focus, blood, bloodstone)
//2 blood + 2 rune + 2 summon --> construct of truth
// summon unit + 2 truth
// oath + gating + truth
// 2 oath + 2 rune
// 2 gating + 2 blood
call NMSixMixerScript(hero, summon_unit, truth, oath, gating, rune, blood, construct_of_truth)
//2 will + 2 spirit + 2 summon --> revealer
// summon unit + 2 thought reading
// scrying + metaphysical travel + thought reading
// 2 scrying + 2 spirit
// 2 metaphysical travel + 2 will
call NMSixMixerScript(hero, summon_unit, thought_reading, scrying, metaphysical_travel, spirit, will, revealer)
//2 will + 2 focus + 2 summon --> distilling crystal
// summon unit + 2 distilling of power
// scrying + recording + distilling of power
// 2 scrying + 2 focus
// 2 recording + 2 will
call NMSixMixerScript(hero, summon_unit, distilling_of_power, scrying, recording, focus, will, distilling_crystal)
//2 will + 2 rune + 2 summon --> stabilizer
// summon unit + 2 bewilling
// scrying + gating + bewilling
// 2 scrying + 2 rune
// 2 gating + 2 will
call NMSixMixerScript(hero, summon_unit, bewilling, scrying, gating, rune, will, stabilizer)
//2 focus + 2 time + 2 summon --> nulifier
// summon unit + 2 anchoring
// recording + spacetime + anchoring
// 2 recording + 2 time
// 2 spacetime + 2 focus
call NMSixMixerScript(hero, summon_unit, anchoring, recording, spacetime, time, focus, nulifier)
//2 focus + 2 spirit + 2 summon --> keystone
// summon unit + 2 keying
// recording + metaphysical travel + keying
// 2 recording + 2 spirit
// 2 metaphysical travel + 2 focus
call NMSixMixerScript(hero, summon_unit, keying, recording, metaphysical_travel, spirit, focus, keystone)
//2 time + 2 spirit + 2 summon --> displacer
// summon unit + 2 foresight
// spacetime + metaphysical travel + foresight
// 2 spacetime + 2 spirit
// 2 metaphysical travel + 2 time
call NMSixMixerScript(hero, summon_unit, foresight, spacetime, metaphysical_travel, spirit, time, displacer)
//2 rune + 2 time + 2 summon --> safe
// summon unit + 2 preserve
// gating + spacetime + preserve
// 2 gating + 2 time
// 2 spacetime + 2 rune
call NMSixMixerScript(hero, summon_unit, preserve, gating, spacetime, time, rune, safe)
//2 rune + 2 spirit + 2 summon --> mana rune
// summon unit + 2 empower
// gating + metaphysical travel + empower
// 2 gating + 2 spirit
// 2 metaphysical travel + 2 rune
call NMSixMixerScript(hero, summon_unit, empower, gating, metaphysical_travel, spirit, rune, mana_rune)
//earth + water + darkness --> cold blast
// nature + darkness, ice + earth, wither + water
call NMThreeMixerScript (hero, nature, darkness, ice, earth, wither, water, cold_blast)
//earth + water + light --> entangle
// nature + light, illusion + earth, bind + water
call NMThreeMixerScript (hero, nature, light, illusion, earth, bind, water, entangle)
//earth + fire + darkness --> crumble
// explosion + darkness, melt + earth, wither + fire
call NMThreeMixerScript (hero, explosion, darkness, melt, earth, wither, fire, crumble)
//earth + fire + light --> mine
// explosion + light, energy + earth, bind + fire
call NMThreeMixerScript (hero, explosion, light, energy, earth, bind, fire, mine)
//water + air + darkness --> icy haze
// mist + darkness, disease + water, ice + air
call NMThreeMixerScript (hero, mist, darkness, disease, water, ice, air, icy_haze)
//water + air + light --> misty forms
// mist + light, ward + water, illusion + air
call NMThreeMixerScript (hero, mist, light, ward, water, illusion, air, misty_forms)
//fire + air + darkness --> dark bolt
// thunder + darkness, disease + fire, melt + air
call NMThreeMixerScript (hero, thunder, darkness, disease, fire, melt, air, dark_bolt)
//fire + air + light --> lightning
// thunder + light, ward + fire, energy + air
call NMThreeMixerScript (hero, thunder, light, ward, fire, energy, air, item_lightning)
//time + spirit + focus --> block
// foresight + focus, keying + time, anchoring + spirit
call NMThreeMixerScript (hero, foresight, focus, keying, time, anchoring, spirit, block)
//time + spirit + rune --> restore
// foresight + rune, empower + time, preserving + spirit
call NMThreeMixerScript (hero, foresight, rune, empower, time, preserve, spirit, restore)
//time + blood + focus --> mana burner
// molding + focus, bloodgem_linking + time, anchoring + blood
call NMThreeMixerScript (hero, molding, focus, bloodgem_linking, time, anchoring, blood, mana_burner)
//time + blood + rune --> floating stone
// molding + rune, truth + time, preserving + blood
call NMThreeMixerScript (hero, molding, rune, truth, time, preserve, blood, floating_stone)
//spirit + will + focus --> precision
// thought reading + focus, distilling of power + spirit, keying + will
call NMThreeMixerScript (hero, thought_reading, focus, distilling_of_power, spirit, keying, will, precision)
//spirit + will + rune --> haste
// thought reading + rune, bewilling + spirit, empower + will
call NMThreeMixerScript (hero, thought_reading, rune, bewilling, spirit, empower, will, haste)
//will + blood + focus --> rage
// enforcement + focus, bloodgem_linking + will, distilling_of_power + blood
call NMThreeMixerScript (hero, enforcement, focus, bloodgem_linking, will, distilling_of_power, blood, rage)
//will + blood + rune --> borrow_power
// enforcement + rune, truth + will, bewilling + blood
call NMThreeMixerScript (hero, enforcement, rune, truth, will, bewilling, blood, rage)
//Mixes of 6 elements:
//...ignores the rarer combinations...
//...no it doesn't...
//earth + water + darkness + time + spirit + focus --> Arctic Blast
// Cold Blast + Block
// earthstrike + heal + darkstone
//call NMabcdef_s (hero, cold_blast, block, earthstrike, heal, darkstone, arctic_blast)
call NMabcdef (hero, cold_blast, block, earthstrike, heal, darkstone, nature, wither, ice, foresight, anchoring, keying, arctic_blast)
//earth + water + light + time + spirit + rune --> regeneration
// entangle + restore
// earthstrike + heal + flash
//call NMabcdef_s (hero, entangle, restore, earthstrike, heal, flash, regeneration)
call NMabcdef (hero, entangle, restore, earthstrike, heal, flash, nature, bind, illusion, foresight, preserve, empower, regeneration)
//earth + fire + darkness + time + blood + focus --> obliterate
// crumble + mana burner
// earthstrike + bloodfire + darkstone
//call NMabcdef_s (hero, crumble, mana_burner, earthstrike, bloodfire, darkstone, obliterate)
call NMabcdef (hero, crumble, mana_burner, earthstrike, bloodfire, darkstone, explosion, wither, melt, molding, anchoring, bloodgem_linking, obliterate)
//earth + fire + light + time + blood + rune --> mine field
// mine + floating stone
// earthstrike + bloodfire + flash
//call NMabcdef_s (hero, mine, floating_stone, earthstrike, bloodfire, flash, mine_field)
call NMabcdef (hero, mine, floating_stone, earthstrike, bloodfire, flash, explosion, bind, energy, molding, preserve, truth, mine_field)
//air + water + darkness + will + spirit + focus --> force
// icy haze + precision
// airlift + heal + darkstone
//call NMabcdef_s (hero, icy_haze, precision, airlift, heal, darkstone, item_force)
call NMabcdef (hero, icy_haze, precision, airlift, heal, darkstone, mist, disease, ice, thought_reading, distilling_of_power, keying, item_force)
//air + water + light + will + spirit + rune --> limit breaker
// misty forms + haste
// airlift + heal + flash
//call NMabcdef_s (hero, misty_forms, haste, airlift, heal, flash, limit_breaker)
call NMabcdef (hero, misty_forms, haste, airlift, heal, flash, mist, ward, illusion, thought_reading, bewilling, empower, limit_breaker)
//air + fire + darkness + will + blood + focus --> death bolt
// dark bolt + rage
// airlift + bloodfire + darkstone
//call NMabcdef_s (hero, dark_bolt, rage, airlift, bloodfire, darkstone, death_bolt)
call NMabcdef (hero, dark_bolt, rage, airlift, bloodfire, darkstone, thunder, disease, melt, enforcement, distilling_of_power, bloodgem_linking, death_bolt)
//air + fire + light + will + blood + rune --> stunner
// lightning + borrow power
// airlift + bloodfire + flash
//call NMabcdef_s (hero, item_lightning, borrow_power, airlift, bloodfire, flash, stunner)
call NMabcdef (hero, item_lightning, borrow_power, airlift, bloodfire, flash, thunder, ward, energy, enforcement, bewilling, truth, stunner)
//**************************************
//new mixes are to be encoded here
//**************************************
//unsets 'hero', so to avoid spilling
set hero=null
endfunction
function DummyFixer takes nothing returns nothing
loop
exitwhen ( udg_checkMe == false)
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 0.50))
endloop
set udg_checkMe = true
call Trig_NewMixer_Actions()
set udg_checkMe = false
endfunction
//===========================================================================
function InitTrig_NewMixer takes nothing returns nothing
set gg_trg_NewMixer = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NewMixer, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_NewMixer, Condition( function Trig_NewMixer_Conditions ) )
call TriggerAddAction( gg_trg_NewMixer, function DummyFixer )
endfunction
function Trig_UnMixer_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0A5' ) ) then
return false
endif
return true
endfunction
function UMAddItem takes integer what, unit hero returns nothing
call CreateItemLoc( what, GetUnitLoc(hero) )
endfunction
function UMRemoveItem takes integer what, unit hero returns nothing
call RemoveItem( GetItemOfTypeFromUnitBJ(hero, what))
endfunction
function UMCheckItem takes integer what, unit hero returns boolean
if (GetItemTypeId(UnitItemInSlotBJ(hero,1)) == what) then
return true
endif
return false
endfunction
function UMUnmixItem2 takes unit hero, integer what, integer add1, integer add2 returns nothing
if (UMCheckItem(what, hero)) then
call UMRemoveItem (what, hero)
call UMAddItem (add1, hero)
call UMAddItem (add2, hero)
endif
endfunction
function UMUnmixItem3 takes unit hero, integer what, integer add1, integer add2, integer add3 returns nothing
if (UMCheckItem(what, hero)) then
call UMRemoveItem (what, hero)
call UMAddItem (add1, hero)
call UMAddItem (add2, hero)
call UMAddItem (add3, hero)
endif
endfunction
function UMUnmixItem6NoSame takes unit hero, integer what, integer add1, integer add2, integer add3, integer add4, integer add5, integer add6 returns nothing
if (UMCheckItem(what, hero)) then
call UMRemoveItem (what, hero)
call UMAddItem (add1, hero)
call UMAddItem (add2, hero)
call UMAddItem (add3, hero)
call UMAddItem (add4, hero)
call UMAddItem (add5, hero)
call UMAddItem (add6, hero)
endif
endfunction
function UMUnmixItem6AllSame takes unit hero, integer what, integer add returns nothing
if (UMCheckItem(what, hero)) then
call UMRemoveItem (what, hero)
call UMAddItem (add, hero)
call UMAddItem (add, hero)
call UMAddItem (add, hero)
call UMAddItem (add, hero)
call UMAddItem (add, hero)
call UMAddItem (add, hero)
endif
endfunction
function UMUnmixItemBanish takes unit hero returns nothing
if (UMCheckItem('I01X', hero)) then
call UMRemoveItem ('I01X', hero)
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
//5
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
//10
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
//15
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
call UMAddItem ('I00G', hero)
//18
endif
endfunction
function UMUnmixItem6Triple takes unit hero, integer what, integer add1, integer add2, integer add3 returns nothing
if (UMCheckItem(what, hero)) then
call UMRemoveItem (what, hero)
call UMAddItem (add1, hero)
call UMAddItem (add1, hero)
call UMAddItem (add2, hero)
call UMAddItem (add2, hero)
call UMAddItem (add3, hero)
call UMAddItem (add3, hero)
endif
endfunction
function UMErrorMessage takes unit hero, string message returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(hero)), message )
endfunction
function UMChargesErrorMessage takes unit hero returns nothing
call UMErrorMessage( hero, "The item is partly used. It cannot be unmixed." )
endfunction
function UMBasicsErrorMessage takes unit hero returns nothing
call UMErrorMessage( hero, "The item is not mixed. It cannot be unmixed." )
endfunction
function UMUnmixItemMulti takes unit hero, integer what, integer add returns nothing
if (UMCheckItem(what, hero)) then
if ( GetItemCharges(UnitItemInSlotBJ(hero, 1)) == 3 ) then
call UMRemoveItem (what, hero)
call UMAddItem (add, hero)
call UMAddItem ('I03L', hero)
else
call UMChargesErrorMessage(hero)
endif
endif
endfunction
function UMUnmixItemOvercharge takes unit hero, integer what, integer add returns nothing
if (UMCheckItem(what, hero)) then
if ( GetItemCharges(UnitItemInSlotBJ(hero, 1)) == 15 ) then
call UMRemoveItem (what, hero)
call UMAddItem (add, hero)
call UMAddItem ('I03Z', hero)
call UMAddItem ('I03Z', hero)
call UMAddItem ('I03Z', hero)
call UMAddItem ('I03Z', hero)
call UMAddItem ('I03Z', hero)
call UMAddItem ('I03Z', hero)
else
call UMChargesErrorMessage(hero)
endif
endif
endfunction
function UMUnmixItemBasic takes unit hero, integer what returns nothing
if (UMCheckItem(what, hero)) then
call UMBasicsErrorMessage (hero)
endif
endfunction
function Trig_UnMixer_Actions takes nothing returns nothing
//setting basic elements
local integer earth='I007'
local integer water='I005'
local integer air='I001'
local integer fire='I000'
local integer darkness='I009'
local integer light='I00C'
local integer summon='I00G'
local integer rune='I00E'
local integer focus='I00A'
local integer blood='I003'
local integer will='I004'
local integer spirit='I006'
local integer time='I008'
//setting mixes of 2 elements
local integer bloodfire='I002'
local integer airlift='I00J'
local integer heal='I00K'
local integer earthstrike='I00L'
local integer darkstone='I00B'
local integer flash='I00D'
local integer summon_unit='I00F'
local integer thunder='I00M'
local integer explosion='I00N'
local integer energy='I00O'
local integer melt='I00P'
local integer mist='I00Q'
local integer ward='I00R'
local integer lesser_djinn='I00Z'
local integer disease='I00S'
local integer nature='I00T'
local integer illusion='I00U'
local integer ice='I00V'
local integer bind='I00W'
local integer wither='I00X'
local integer lesser_golem='I010'
local integer lesser_shape='I00Y'
local integer lesser_furie='I011'
local integer lesser_entity='I012'
local integer lesser_shade='I013'
local integer metaphysical_travel='I014'
local integer scrying='I015'
local integer recording='I016'
local integer spacetime='I017'
local integer gating='I018'
local integer enforcement='I019'
local integer molding='I01A'
local integer bloodgem_linking='I01B'
local integer truth='I01C'
local integer thought_reading='I01D'
local integer distilling_of_power='I01E'
local integer bewilling='I01F'
local integer anchoring='I01G'
local integer keying='I01H'
local integer foresight='I00I'
local integer preserve='I01I'
local integer empower='I01J'
local integer oath='I01K'
//setting pure 6-part spells
local integer sea_of_flames='I01L'
local integer windblades='I01M'
local integer tsunami='I01N'
local integer earthquake='I01O'
local integer sunstrike='I01P'
local integer nightstrike='I01Q'
local integer spacerift='I01R'
local integer lifeblood='I01S'
local integer pure_will='I00H'
local integer spell_weave='I01T'
local integer rewinder='I01U'
local integer refreshing_gem='I01V'
local integer blocking_circle='I01W'
local integer overcharge ='I03Z'
//setting pure 6-part elementals
local integer earth_golem='I020'
local integer water_shape='I01Z'
local integer air_furie='I021'
local integer fire_djinn='I01Y'
local integer dark_shade='I022'
local integer light_entity='I023'
//setting remaining 6-part spells
local integer golem_shape='I024'
local integer golem_djinn='I025'
local integer golem_shade='I026'
local integer golem_entity='I027'
local integer shape_furie='I028'
local integer shape_shade='I029'
local integer shape_entity='I02A'
local integer furie_djinn='I02B'
local integer furie_shade='I02C'
local integer furie_entity='I02D'
local integer djinn_shade='I02E'
local integer djinn_entity='I02F'
local integer command='I02H'
local integer molded_tower='I02G'
local integer bloodstone='I02I'
local integer construct_of_truth='I02J'
local integer revealer='I02K'
local integer distilling_crystal='I02L'
local integer stabilizer='I02M'
local integer nulifier='I02N'
local integer keystone='I02O'
local integer displacer='I02P'
local integer safe='I02Q'
local integer mana_rune='I02R'
//setting 3 mixes - whithout summons
local integer cold_blast='I02W'
local integer entangle='I02X'
local integer crumble='I02Y'
local integer mine='I02Z'
local integer icy_haze='I030'
local integer misty_forms='I031'
local integer dark_bolt='I032'
local integer item_lightning='I033'
local integer block='I034'
local integer restore='I035'
local integer mana_burner='I036'
local integer floating_stone='I037'
local integer precision='I038'
local integer haste='I039'
local integer rage='I03A'
local integer borrow_power='I03B'
//setting mixes of 6 components
local integer arctic_blast='I03C'
local integer regeneration='I03D'
local integer obliterate='I03E'
local integer mine_field='I03F'
local integer item_force='I03G'
local integer limit_breaker='I03H'
local integer death_bolt='I03I'
local integer stunner='I03K'
//setting multies
local integer m_earth='I03M'
local integer m_water='I03N'
local integer m_air='I03O'
local integer m_fire='I03P'
local integer m_darkness='I03Q'
local integer m_light='I03R'
local integer m_summon='I03S'
local integer m_rune='I03T'
local integer m_focus='I03U'
local integer m_will='I03W'
local integer m_blood='I03V'
local integer m_spirit='I03X'
local integer m_time='I03Y'
//setting overcharges
local integer o_earth='I040'
local integer o_water='I041'
local integer o_air='I042'
local integer o_fire='I043'
local integer o_darkness='I044'
local integer o_light='I045'
local integer o_summon='I046'
local integer o_rune='I047'
local integer o_focus='I048'
local integer o_will='I049'
local integer o_blood='I04A'
local integer o_spirit='I04B'
local integer o_time='I04C'
//stores triggering unit
local unit hero = GetTriggerUnit()
//double (e + p)
call UMUnmixItem2 (hero, earthstrike, earth, time)
call UMUnmixItem2 (hero, heal , water, spirit)
call UMUnmixItem2 (hero, airlift, air, will)
call UMUnmixItem2 (hero, bloodfire, fire, blood)
call UMUnmixItem2 (hero, darkstone, darkness, focus)
call UMUnmixItem2 (hero, flash, light, rune)
//double (e + e)
call UMUnmixItem2 (hero, nature, earth, water)
call UMUnmixItem2 (hero, explosion, earth, fire)
call UMUnmixItem2 (hero, wither, earth, darkness)
call UMUnmixItem2 (hero, bind, earth, light)
call UMUnmixItem2 (hero, mist, water, air)
call UMUnmixItem2 (hero, ice, water, darkness)
call UMUnmixItem2 (hero, illusion, water, light)
call UMUnmixItem2 (hero, thunder, air, thunder)
call UMUnmixItem2 (hero, disease, air, darkness)
call UMUnmixItem2 (hero, ward, air, light)
call UMUnmixItem2 (hero, melt, fire, darkness)
call UMUnmixItem2 (hero, energy, fire, light)
//double (p + p)
call UMUnmixItem2 (hero, truth, rune, blood)
call UMUnmixItem2 (hero, bewilling, rune, will)
call UMUnmixItem2 (hero, empower, rune, spirit)
call UMUnmixItem2 (hero, preserve, rune, time)
call UMUnmixItem2 (hero, bloodgem_linking, focus, blood)
call UMUnmixItem2 (hero, distilling_of_power, focus, will)
call UMUnmixItem2 (hero, keying, focus, spirit)
call UMUnmixItem2 (hero, anchoring, focus, time)
call UMUnmixItem2 (hero, enforcement, blood, will)
call UMUnmixItem2 (hero, molding, blood, time)
call UMUnmixItem2 (hero, thought_reading, will, spirit)
call UMUnmixItem2 (hero, foresight, spirit, time)
//double (s*2)
call UMUnmixItem2 (hero, summon_unit, summon, summon)
//double (s + e)
call UMUnmixItem2 (hero, lesser_golem, summon, earth)
call UMUnmixItem2 (hero, lesser_shape, summon, water)
call UMUnmixItem2 (hero, lesser_furie, summon, air)
call UMUnmixItem2 (hero, lesser_djinn, summon, fire)
call UMUnmixItem2 (hero, lesser_shade, summon, darkness)
call UMUnmixItem2 (hero, lesser_entity, summon, light)
//double (s + p)
call UMUnmixItem2 (hero, gating, summon, rune)
call UMUnmixItem2 (hero, recording, summon, focus)
call UMUnmixItem2 (hero, oath, summon, blood)
call UMUnmixItem2 (hero, scrying, summon, will)
call UMUnmixItem2 (hero, metaphysical_travel, summon, spirit)
call UMUnmixItem2 (hero, spacetime, summon, time)
//X*6
call UMUnmixItem6AllSame (hero, earthquake, earth)
call UMUnmixItem6AllSame (hero, tsunami, water)
call UMUnmixItem6AllSame (hero, windblades, air)
call UMUnmixItem6AllSame (hero, sea_of_flames, fire)
call UMUnmixItem6AllSame (hero, nightstrike, darkness)
call UMUnmixItem6AllSame (hero, sunstrike, light)
call UMUnmixItem6AllSame (hero, spacerift, summon)
call UMUnmixItem6AllSame (hero, blocking_circle, rune)
call UMUnmixItem6AllSame (hero, refreshing_gem, focus)
call UMUnmixItem6AllSame (hero, lifeblood, blood)
call UMUnmixItem6AllSame (hero, pure_will, will)
call UMUnmixItem6AllSame (hero, spell_weave, spirit)
call UMUnmixItem6AllSame (hero, rewinder, time)
call UMUnmixItem6AllSame (hero, overcharge, 'I03L')
//banish (18*s)
call UMUnmixItemBanish (hero)
//triple (e + e + e)
call UMUnmixItem3 (hero, cold_blast, earth, water, darkness)
call UMUnmixItem3 (hero, entangle, earth, water, light)
call UMUnmixItem3 (hero, crumble, earth, fire, darkness)
call UMUnmixItem3 (hero, mine, earth, fire, light)
call UMUnmixItem3 (hero, icy_haze, air, water, darkness)
call UMUnmixItem3 (hero, misty_forms, air, water, light)
call UMUnmixItem3 (hero, dark_bolt, air, fire, darkness)
call UMUnmixItem3 (hero, item_lightning, air, fire, light)
//triple (p + p + p)
call UMUnmixItem3 (hero, block, time, spirit, focus)
call UMUnmixItem3 (hero, restore, time, spirit, rune)
call UMUnmixItem3 (hero, mana_burner, time, blood, focus)
call UMUnmixItem3 (hero, floating_stone, time, blood, rune)
call UMUnmixItem3 (hero, precision, will, spirit, focus)
call UMUnmixItem3 (hero, haste, will, spirit, rune)
call UMUnmixItem3 (hero, rage, will, blood, focus)
call UMUnmixItem3 (hero, borrow_power, will, blood, rune)
//X + m AND X + m*6
call UMUnmixItemMulti (hero, m_earth, earth)
call UMUnmixItemOvercharge (hero, o_earth, earth)
call UMUnmixItemMulti (hero, m_water, water)
call UMUnmixItemOvercharge (hero, o_water, water)
call UMUnmixItemMulti (hero, m_air, air)
call UMUnmixItemOvercharge (hero, o_air, air)
call UMUnmixItemMulti (hero, m_fire, fire)
call UMUnmixItemOvercharge (hero, o_fire, fire)
call UMUnmixItemMulti (hero, m_darkness, darkness)
call UMUnmixItemOvercharge (hero, o_darkness, darkness)
call UMUnmixItemMulti (hero, m_light, light)
call UMUnmixItemOvercharge (hero, o_light, light)
call UMUnmixItemMulti (hero, m_summon, summon)
call UMUnmixItemOvercharge (hero, o_summon, summon)
call UMUnmixItemMulti (hero, m_rune, rune)
call UMUnmixItemOvercharge (hero, o_rune, rune)
call UMUnmixItemMulti (hero, m_focus, focus)
call UMUnmixItemOvercharge (hero, o_focus, focus)
call UMUnmixItemMulti (hero, m_blood, blood)
call UMUnmixItemOvercharge (hero, o_blood, blood)
call UMUnmixItemMulti (hero, m_will, will)
call UMUnmixItemOvercharge (hero, o_will, will)
call UMUnmixItemMulti (hero, m_spirit, spirit)
call UMUnmixItemOvercharge (hero, o_spirit, spirit)
call UMUnmixItemMulti (hero, m_time, time)
call UMUnmixItemOvercharge (hero, o_time, time)
//e*2 + p*2 + s*2
call UMUnmixItem6Triple (hero, earth_golem, earth, time, summon)
call UMUnmixItem6Triple (hero, water_shape, water, spirit, summon)
call UMUnmixItem6Triple (hero, air_furie, air, will, summon)
call UMUnmixItem6Triple (hero, fire_djinn, fire, blood, summon)
call UMUnmixItem6Triple (hero, dark_shade, darkness, focus, summon)
call UMUnmixItem6Triple (hero, light_entity, light, rune, summon)
//e*2 + e*2 + s*2
call UMUnmixItem6Triple (hero, golem_shape, earth, water, summon)
call UMUnmixItem6Triple (hero, golem_djinn, earth, fire, summon)
call UMUnmixItem6Triple (hero, golem_shade, earth, darkness, summon)
call UMUnmixItem6Triple (hero, golem_entity, earth, light, summon)
call UMUnmixItem6Triple (hero, shape_furie, water, air, summon)
call UMUnmixItem6Triple (hero, shape_shade, water, darkness, summon)
call UMUnmixItem6Triple (hero, shape_entity, water, light, summon)
call UMUnmixItem6Triple (hero, furie_djinn, air, fire, summon)
call UMUnmixItem6Triple (hero, furie_shade, air, darkness, summon)
call UMUnmixItem6Triple (hero, furie_entity, air, light, summon)
call UMUnmixItem6Triple (hero, djinn_shade, fire, darkness, summon)
call UMUnmixItem6Triple (hero, djinn_entity, fire, light, summon)
//p*2 + p*2 + s*2
call UMUnmixItem6Triple (hero, construct_of_truth, rune, blood, summon)
call UMUnmixItem6Triple (hero, stabilizer, rune, will, summon)
call UMUnmixItem6Triple (hero, mana_rune, rune, spirit, summon)
call UMUnmixItem6Triple (hero, safe, rune, time, summon)
call UMUnmixItem6Triple (hero, bloodstone, focus, blood, summon)
call UMUnmixItem6Triple (hero, distilling_crystal, focus, will, summon)
call UMUnmixItem6Triple (hero, keystone, focus, spirit, summon)
call UMUnmixItem6Triple (hero, nulifier, focus, time, summon)
call UMUnmixItem6Triple (hero, command, blood, will, summon)
call UMUnmixItem6Triple (hero, molded_tower, blood, time, summon)
call UMUnmixItem6Triple (hero, revealer, will, spirit, summon)
call UMUnmixItem6Triple (hero, displacer, spirit, time, summon)
//e + e + e + p + p + p
call UMUnmixItem6NoSame (hero, arctic_blast, earth, water, darkness, time, spirit, focus)
call UMUnmixItem6NoSame (hero, regeneration, earth, water, light, time, spirit, rune)
call UMUnmixItem6NoSame (hero, obliterate, earth, fire, darkness, time, blood, focus)
call UMUnmixItem6NoSame (hero, mine_field, earth, fire, light, time, blood, rune)
call UMUnmixItem6NoSame (hero, item_force, air, water, darkness, will, spirit, focus)
call UMUnmixItem6NoSame (hero, limit_breaker, air, water, light, will, spirit, rune)
call UMUnmixItem6NoSame (hero, death_bolt, air, fire, darkness, will, blood, focus)
call UMUnmixItem6NoSame (hero, stunner, air, fire, light, will, blood, rune)
//basics (for error purposes)
call UMUnmixItemBasic (hero, earth)
call UMUnmixItemBasic (hero, water)
call UMUnmixItemBasic (hero, air)
call UMUnmixItemBasic (hero, fire)
call UMUnmixItemBasic (hero, darkness)
call UMUnmixItemBasic (hero, light)
call UMUnmixItemBasic (hero, summon)
call UMUnmixItemBasic (hero, rune)
call UMUnmixItemBasic (hero, focus)
call UMUnmixItemBasic (hero, blood)
call UMUnmixItemBasic (hero, will)
call UMUnmixItemBasic (hero, spirit)
call UMUnmixItemBasic (hero, time)
call UMUnmixItemBasic (hero, 'I03J')
call UMUnmixItemBasic (hero, 'I03L')
//===========================================================================
//New mixes are to be added here
//===========================================================================
//unsets hero
set hero = null
endfunction
function UnDummyFixer takes nothing returns nothing
loop
exitwhen ( udg_UncheckMe == false)
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 0.50))
endloop
set udg_UncheckMe = true
call Trig_UnMixer_Actions()
set udg_UncheckMe = false
endfunction
//===========================================================================
function InitTrig_UnMixer takes nothing returns nothing
set gg_trg_UnMixer = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_UnMixer, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_UnMixer, Condition( function Trig_UnMixer_Conditions ) )
call TriggerAddAction( gg_trg_UnMixer, function UnDummyFixer )
endfunction
function Trig_dark_attack_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03I' ) ) then
return false
endif
return true
endfunction
function Trig_dark_attack_Func002001003 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B00V') == true )
endfunction
function Trig_dark_attack_Func002A takes nothing returns nothing
call IssueTargetOrderBJ( GetLastCreatedUnit(), "chainlightning", GetEnumUnit() )
endfunction
function Trig_dark_attack_Actions takes nothing returns nothing
local unit caster
call SetUnitLifeBJ( GetManipulatingUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetManipulatingUnit()) - 250.00 ) )
call CreateNUnitsAtLoc( 1, 'o00W', GetOwningPlayer(GetManipulatingUnit()), GetUnitLoc(GetManipulatingUnit()), bj_UNIT_FACING )
set caster = GetLastCreatedUnit()
call ForGroupBJ( GetUnitsInRangeOfLocMatching(1500.00, GetUnitLoc(GetManipulatingUnit()), Condition(function Trig_dark_attack_Func002001003)), function Trig_dark_attack_Func002A )
call TriggerSleepAction( 0.80 )
call RemoveUnit( caster )
endfunction
//===========================================================================
function InitTrig_dark_attack takes nothing returns nothing
set gg_trg_dark_attack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_dark_attack, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_dark_attack, Condition( function Trig_dark_attack_Conditions ) )
call TriggerAddAction( gg_trg_dark_attack, function Trig_dark_attack_Actions )
endfunction
function Trig_obliterate_trigger_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08H' ) ) then
return false
endif
return true
endfunction
function Trig_obliterate_effect_Func002A takes nothing returns nothing
call SetDestructableLife( GetEnumDestructable(), ( GetDestructableLife(GetEnumDestructable()) - 200.00 ) )
endfunction
function Trig_obliterate_trigger_Actions takes nothing returns nothing
local unit this
call CreateNUnitsAtLoc( 1, 'o00U', GetOwningPlayer(GetSpellAbilityUnit()), GetSpellTargetLoc(), bj_UNIT_FACING )
set this = GetLastCreatedUnit()
call UnitDamagePointLoc( GetSpellAbilityUnit(), 0.00, 350.00, GetUnitLoc(this), 250.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call EnumDestructablesInCircleBJ( 350.00, GetUnitLoc(this), function Trig_obliterate_effect_Func002A )
call TriggerSleepAction( 3.00 )
call RemoveUnit( this )
endfunction
//===========================================================================
function InitTrig_obliterate_trigger takes nothing returns nothing
set gg_trg_obliterate_trigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_obliterate_trigger, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_obliterate_trigger, Condition( function Trig_obliterate_trigger_Conditions ) )
call TriggerAddAction( gg_trg_obliterate_trigger, function Trig_obliterate_trigger_Actions )
endfunction
function Trig_spell_weave_jass_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01T' ) ) then
return false
endif
return true
endfunction
function Spell_Weave_add_item takes unit hero, integer what returns nothing
call UnitAddItemByIdSwapped( what, hero )
endfunction
function Trig_spell_weave_jass_Actions takes nothing returns nothing
local unit hero = GetManipulatingUnit()
local integer seed = 0
local integer n = 1
call RemoveItem( GetManipulatedItem() )
loop
exitwhen (n > 9 )
set seed = GetRandomInt(1,15)
if (seed == 1) then
//earth
call UnitAddItemByIdSwapped ('I007', hero)
endif
if(seed == 2) then
//water
call UnitAddItemByIdSwapped ('I005', hero)
endif
if(seed == 3) then
//air
call UnitAddItemByIdSwapped ('I001', hero)
endif
if(seed == 4) then
//fire
call UnitAddItemByIdSwapped ('I000', hero)
endif
if(seed == 5) then
//darkness
call UnitAddItemByIdSwapped ('I00B', hero)
endif
if(seed == 6) then
//light
call UnitAddItemByIdSwapped ('I00C', hero)
endif
if(seed == 7) then
//summon
call UnitAddItemByIdSwapped ('I00G', hero)
endif
if(seed == 8) then
//rune
call UnitAddItemByIdSwapped ('I00E', hero)
endif
if(seed == 9) then
//focus
call UnitAddItemByIdSwapped ('I00A', hero)
endif
if(seed == 10) then
//will
call UnitAddItemByIdSwapped ('I004', hero)
endif
if(seed == 11) then
//blood
call UnitAddItemByIdSwapped ('I003', hero)
endif
if(seed == 12) then
//spirit
call UnitAddItemByIdSwapped ('I006', hero)
endif
if(seed == 13) then
//time
call UnitAddItemByIdSwapped ('I008', hero)
endif
if(seed == 14) then
//purify
call UnitAddItemByIdSwapped ('I03J', hero)
endif
if(seed == 15) then
//multiply
call UnitAddItemByIdSwapped ('I03L', hero)
endif
set n = n +1
endloop
set hero=null
endfunction
//===========================================================================
function InitTrig_spell_weave_jass takes nothing returns nothing
set gg_trg_spell_weave_jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_spell_weave_jass, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_spell_weave_jass, Condition( function Trig_spell_weave_jass_Conditions ) )
call TriggerAddAction( gg_trg_spell_weave_jass, function Trig_spell_weave_jass_Actions )
endfunction
function Trig_destruction_of_mine_jass_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'hbla' ) ) then
return false
endif
return true
endfunction
function Trig_destruction_of_mine_jass_Actions takes nothing returns nothing
local location point = GetUnitLoc(GetDyingUnit())
local player owner = GetOwningPlayer(GetDyingUnit())
call CreateItemLoc( 'I02S', point )
call TriggerSleepAction( 45.00 )
call CreateNUnitsAtLoc( 1, 'hbla', owner, point, bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'o007', owner, point, bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'o006', owner, point, bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'o006', owner, point, bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'o005', owner, point, bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'o005', owner, point, bj_UNIT_FACING )
set point = null
set owner = null
endfunction
//===========================================================================
function InitTrig_destruction_of_mine_jass takes nothing returns nothing
set gg_trg_destruction_of_mine_jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_destruction_of_mine_jass, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_destruction_of_mine_jass, Condition( function Trig_destruction_of_mine_jass_Conditions ) )
call TriggerAddAction( gg_trg_destruction_of_mine_jass, function Trig_destruction_of_mine_jass_Actions )
endfunction
function StringSearchLoop takes string search, string find returns boolean
local integer n=5
local integer m=n+StringLength(find)
set find=StringCase(find, false)
set search=StringCase(search, FALSE)
loop
exitwhen n > 45
if ( SubStringBJ(search, n, m) == find ) then
return TRUE
endif
set n = n + 1
set m = m + 1
endloop
return FALSE
endfunction
function pm takes string message returns nothing
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 15, message )
endfunction
function pmw takes string message returns nothing
call pm(message)
call TriggerSleepAction (1)
endfunction
function pmw_y takes string message returns nothing
call pmw("|cffffcc00" + message + "|r")
endfunction
function echo_wait takes nothing returns nothing
call pm("|cffffcc00- More in 5 seconds -|r")
call TriggerSleepAction (5)
endfunction
function echo_earth takes nothing returns nothing
call pm("|cffffcc00Earth mixes:|r")
call pm("6 Earth --> Earthquake")
call pm("Earth + Time --> Earthstrike")
call pm("Earth + Water --> Nature")
call pm("Earth + Fire --> Explosion")
call pm("Earth + Darkness --> Wither")
call pm("Earht + Light --> Bind")
call pm("Earth + Summon --> Summon Lesser Golem")
call pm("2 Earth + 2 Time + 2 Summon --> Summon Earth Golem")
call pm("2 Earth + 2 Water + 2 Summon --> Summon Golen-Shape")
call pm("2 Earth + 2 Fire + 2 Summon --> Summon Golem-Djinn")
call pm("2 Earth + 2 Darkness + 2 Summon --> Summon Golem-Shade")
call pm("2 Earth + 2 Light + 2 Summon --> Summon Golem-Entity")
call echo_wait()
call pm ("Earth + Water + Darkness --> Cold Blast")
call pm ("Earth + Water + Light --> Entangle")
call pm ("Earth + Fire + Darkness --> Crumble")
call pm ("Earth + Fire + Light --> Mine")
call pm ("Earth + Water + Darkness + Time + Spirit + Focus --> Arctic Blast")
call pm ("Earth + Water + Light + Time + Spirit + Rune --> Regeneration")
call pm ("Earth + Fire + Darkness + Time + Blood + Focus --> Obliterate")
call pm ("Earth + Fire + Light + Time + Blood + Rune --> Mine Field")
endfunction
function echo_water takes nothing returns nothing
call pm("|cffffcc00Water mixes:|r")
call pm("6 Water --> Infusion")
call pm("Water + Spirit --> Heal")
call pm("Water + Earth --> Nature")
call pm("Water + Air --> Mist")
call pm("Water + Darkness --> Ice")
call pm("Water + Light --> Illusion")
call pm("Water + Summon --> Summon Lesser Shape")
call pm("2 Water + 2 Spirit + 2 Summon --> Summon Water Shape")
call pm("2 Water + 2 Earth + 2 Summon --> Summon Golem-Shape")
call pm("2 Water + 2 Air + 2 Summon --> Summon Shape-Furie")
call pm("2 Water + 2 Darkness + 2 Summon --> Summon Shape-Shade")
call pm("2 Water + 2 Light + 2 Summon --> Summon Shape-Entity")
call echo_wait()
call pm("Water + Earth + Darkness --> Cold Blast")
call pm("Water + Earth + Light --> Entangle")
call pm("Water + Air + Darkness --> Icy Haze")
call pm("Water + Air + Light --> Misty Forms")
call pm("Water + Earth + Darkness + Spirit + Time + Focus --> Arctic Blast")
call pm("Water + Earth + Light + Spirit + Time + Rune --> Regeneration")
call pm("Water + Air + Darkness + Spirit + Will + Focus --> Force")
call pm("Water + Air + Light + Spirit + Will + Rune --> Limit Breaker")
endfunction
function echo_air takes nothing returns nothing
call pm("|cffffcc00Air mixes:|r")
call pm("6 Air --> Tornado")
call pm("Air + Will --> Airlift")
call pm("Air + Water --> Mist")
call pm("Air + Fire --> Thunder")
call pm("Air + Darkness --> Disease")
call pm("Air + Light --> Ward")
call pm("Air + Summon --> Summon Lesser Furie")
call pm("2 Air + 2 Will + 2 Summon --> Summon Air Furie")
call pm("2 Air + 2 Water + 2 Summon --> Summon Shape-Furie")
call pm("2 Air + 2 Fire + 2 Summon --> Summon Furie-Djinn")
call pm("2 Air + 2 Darkness + 2 Summon --> Summon Furie-Shade")
call pm("2 Air + 2 Light + 2 Summon --> Summon Furie-Entity")
call echo_wait()
call pm("Air + Water + Darkness --> Icy Haze")
call pm("Air + Water + Light --> Misty Forms")
call pm("Air + Fire + Darkness --> Dark Bolt")
call pm("Air + Fire + Light --> Lightning")
call pm("Air + Water + Darkness + Will + Spirit + Focus --> Force")
call pm("Air + Water + Light + Will + Spirit + Rune --> Limit Breaker")
call pm("Air + Fire + Darkness + Will + Blood + Focus --> Death Bolt")
call pm("Air + Fire + Light + Will + Blood + Rune --> Stunner")
endfunction
function echo_fire takes nothing returns nothing
call pm("|cffffcc00Fire mixes:|r")
call pm("6 Fire --> Sea of Flames")
call pm("Fire + Blood --> Bloodfire")
call pm("Fire + Earth --> Explosion")
call pm("Fire + Air --> Thunder")
call pm("Fire + Darkness --> Melt")
call pm("Fire + Light --> Energy")
call pm("Fire + Summon --> Summon Lesser Djinn")
call pm("2 Fire + 2 Blood + 2 Summon --> Summon Fire Djinn")
call pm("2 Fire + 2 Earth + 2 Summon --> Summon Golem-Djinn")
call pm("2 Fire + 2 Air + 2 Summon --> Summon Furie-Djinn")
call pm("2 Fire + 2 Darkness + 2 Summon --> Summon Djinn-Shade")
call pm("2 Fire + 2 Light + 2 Summon --> Summon Djinn-Entity")
call echo_wait()
call pm("Fire + Earth + Darkness --> Crumble")
call pm("Fire + Earth + Light --> Mine")
call pm("Fire + Air + Darkness --> Dark Bolt")
call pm("Fire + Air + Light --> Lightning")
call pm("Fire + Earth + Darkness + Blood + Time + Focus --> Obliterate")
call pm("Fire + Earth + Light + Blood + Time + Rune --> Mine Field")
call pm("Fire + Air + Darkness + Blood + Will + Focus --> Death Bolt")
call pm("Fire + Air + Light + Blood + Will + Rune --> Stunner")
endfunction
function echo_darkness takes nothing returns nothing
call pm("|cffffcc00Darkness mixes:|r")
call pm("6 Darkness --> Nightstrike")
call pm("Darkness + Focus --> Darkstone")
call pm("Darkness + Earth --> Wither")
call pm("Darkness + Water --> Ice")
call pm("Darkness + Air --> Disease")
call pm("Darkness + Fire --> Melt")
call pm("Darkness + Summon --> Summon Lesser Shade")
call pm("2 Darkness + 2 Focus + 2 Summon --> Summon Dark Shade")
call pm("2 Darkness + 2 Earth + 2 Summon --> Summon Golem-Shade")
call pm("2 Darkness + 2 Water + 2 Summon --> Summon Shape-Shade")
call pm("2 Darkness + 2 Air + 2 Summon --> Summon Furie-Shade")
call pm("2 Darkness + 2 Fire + 2 Summon --> Summon Djinn-Shade")
call echo_wait()
call pm("Darkness + Earth + Water --> Cold Blast")
call pm("Darkness + Earth + Fire --> Crumble")
call pm("Darkness + Air + Water --> Icy Haze")
call pm("Darkness + Air + Fire --> Dark Bolt")
call pm("Darkness + Earth + Water + Focus + Time + Spirit --> Arctic Blast")
call pm("Darkness + Earth + Fire + Focus + Time + Blood --> Obliterate")
call pm("Darkness + Air + Water + Focus + Will + Spirit --> Force")
call pm("Darkness + Air + Fire + Focus + Will + Blood --> Death Bolt")
endfunction
function echo_light takes nothing returns nothing
call pm("|cffffcc00Light mixes:|r")
call pm("6 Light --> Sunstrike")
call pm("Light + Rune --> Flash")
call pm("Light + Earth --> Bind")
call pm("Light + Water --> Illusion")
call pm("Light + Air --> Ward")
call pm("Light + Fire --> Energy")
call pm("Light + Summon --> Summon Lesser Entity")
call pm("2 Light + 2 Rune + 2 Summon --> Summon Light Entity")
call pm("2 Light + 2 Earth + 2 Summon --> Summon Golem-Entity")
call pm("2 Light + 2 Water + 2 Summon --> Summon Shape-Entity")
call pm("2 Light + 2 Air + 2 Summon --> Summon Furie-Entity")
call pm("2 Light + 2 Fire + 2 Summon --> Summon Djinn-Entity")
call echo_wait()
call pm("Light + Earth + Water --> Entangle")
call pm("Light + Earth + Fire --> Mine")
call pm("Ligtt + Air + Water --> Misty Forms")
call pm("Light + Air + Fire --> Lightning")
call pm("Light + Earth + Water + Rune + Time + Spirit --> Regeneration")
call pm("Light + Earth + Fire + Rune + Time + Blood --> Mine Field")
call pm("Ligtt + Air + Water + Rune + Will + Spirit --> Limit Breaker")
call pm("Light + Air + Fire + Rune + Will + Blood --> Stunner")
endfunction
function echo_summon takes nothing returns nothing
call pm("|cffffcc00Summon can be mixed with anything.|r")
//call pm("If you need more specifikation, check the other components.")
call pm("2 Summon --> Summon Unit")
call pm("6 Summon --> Spacerift")
call pm("18 Summon --> Banish")
call pm("2 Summon + 2 Earth + 2 Time --> Summon Earth Golem ")
call pm("2 Summon + 2 Water + 2 Spirit --> Summon Water Shape")
call pm("2 Summon + 2 Air + 2 Will --> Summon Air Furie")
call pm("2 Summon + 2 Fire + 2 Blood --> Summon Fire Djinn")
call pm("2 Summon + 2 Darkness + 2 Focus --> Summon Dark Shade")
call pm("2 Summon + 2 Light + 2 Rune --> Summon Light Entity")
call echo_wait()
call pm("Summon + Earth --> Summon Lesser Golem")
call pm("Summon + Water --> Summon Lesser Shape")
call pm("Summon + Air --> Summon Lesser Furie")
call pm("Summon + Fire --> Summon Lesser Djinn")
call pm("Summon + Darkness --> Summon Lesser Shade")
call pm("Summon + Light --> Summon Lesser Entity")
call pm("Summon + Rune --> Gating")
call pm("Summon + Focus --> Recording")
call pm("Summon + Blood --> Oath")
call pm("Summon + Will --> Scrying")
call pm("Summon + Spirit --> Metaphysical Travel")
call pm("Summon + Time --> Spacetime")
call echo_wait()
call pm("2 Summon + 2 Earth + 2 Water --> Summon Golem-Shape")
call pm("2 Summon + 2 Earth + 2 Fire --> Summon Golem-Djinn")
call pm("2 Summon + 2 Earth + 2 Darkness --> Summon Golem-Shade")
call pm("2 Summon + 2 Earth + 2 Light --> Summon Golem-Entity")
call pm("2 Summon + 2 Water + 2 Air --> Summon Shape-Furie")
call pm("2 Summon + 2 Water + 2 Darkness --> Summon Shape-Shade")
call pm("2 Summon + 2 Water + 2 Light --> Summon Shape-Entity")
call pm("2 Summon + 2 Air + 2 Fire --> Summon Furie-Djinn")
call pm("2 Summon + 2 Air + 2 Darkness --> Summon Furie-Shade")
call pm("2 Summon + 2 Air + 2 Light --> Summon Furie-Entity")
call pm("2 Summon + 2 Fire + 2 Darkness --> Summon Djinn-Shade")
call pm("2 Summon + 2 Fire + 2 Light --> Summon Djinn-Entity")
call echo_wait()
call pm("2 Summon + 2 Rune + 2 Blood --> Summon Construct of Truth")
call pm("2 Summon + 2 Rune + 2 Will --> Stabilizer")
call pm("2 Summon + 2 Rune + 2 Spirit --> Mana Rune")
call pm("2 Summon + 2 Rune + 2 Time --> Safe")
call pm("2 Summon + 2 Focus + 2 Blood --> Summon Bloodstone")
call pm("2 Summon + 2 Focus + 2 Will --> Distilling Crystal")
call pm("2 Summon + 2 Focus + 2 Spirit --> Keystone")
call pm("2 Summon + 2 Focus + 2 Time --> Nulifier")
call pm("2 Summon + 2 Blood + 2 Will --> Command")
call pm("2 Summon + 2 Blood + 2 Time --> Molded Tower")
call pm("2 Summon + 2 Will + 2 Spirit --> Revealer")
call pm("2 Summon + 2 Spirit + 2 Time --> Displacer")
endfunction
function echo_rune takes nothing returns nothing
call pm("|cffffcc00Rune mixes:|r")
call pm("6 Rune --> Blocking Circle")
call pm("Rune + Light --> Flash")
call pm("Rune + Blood --> Truth")
call pm("Rune + Will --> Bewilling")
call pm("Rune + Spirit --> Empower")
call pm("Rune + Time --> Preserve")
call pm("Rune + Summon --> Gating")
call pm("2 Rune + 2 Light + 2 Summon --> Summon Light Entity")
call pm("2 Rune + 2 Blood + 2 Summon --> Summon Construct of Truth")
call pm("2 Rune + 2 Will + 2 Summon --> Stabilizer")
call pm("2 Rune + 2 Spirit + 2 Summon --> Mana Rune")
call pm("2 Rune + 2 Time + 2 Summon --> Safe")
call echo_wait()
call pm("Rune + Time + Spirit --> Restore")
call pm("Rune + Time + Blood --> Floating Stone")
call pm("Rune + Will + Spirit --> Haste")
call pm("Rune + Will + Blood --> Borrow Power")
call pm("Rune + Time + Spirit + Light + Earth + Water --> Regeneration")
call pm("Rune + Time + Blood + Light + Earth + Fire --> Mine Field")
call pm("Rune + Will + Spirit + Light + Air + Water --> Limit Breaker")
call pm("Rune + Will + Blood + Light + Air + Fire --> Stunnner")
endfunction
function echo_focus takes nothing returns nothing
call pm("|cffffcc00Focus mixes:|r")
call pm("6 Focus --> Refreshing Gem")
call pm("Focus + Darkness --> Darkstone")
call pm("Focus + Blood --> Bloodgem Linking")
call pm("Focus + Will --> Distilling of Power")
call pm("Focus + Spirit --> Keying")
call pm("Focus + Time --> Anchoring")
call pm("Focus + Summon --> Recording")
call pm("2 Focus + 2 Darkness + 2 Summon --> Summon Dark Shade")
call pm("2 Focus + 2 Blood + 2 Summon --> Summon Bloodstone")
call pm("2 Focus + 2 Will + 2 Summon --> Distilling Crystal")
call pm("2 Focus + 2 Spirit + 2 Summon --> Keystone")
call pm("2 Focus + 2 Time + 2 Summon --> Nulifier")
call echo_wait()
call pm("Focus + Time + Spirit --> Block")
call pm("Focus + Time + Blood --> Mana Burner")
call pm("Focus + Will + Spirit --> Precision")
call pm("Focus + Will + Blood --> Rage")
call pm("Focus + Time + Spirit + Darkness + Earth + Water --> Arctic Blast")
call pm("Focus + Time + Blood + Darkness + Earth + Fire --> Obliterate")
call pm("Focus + Will + Spirit + Darkness + Air + Water --> Force")
call pm("Focus + Will + Blood + Darkness + Air + Fire --> Death Bolt")
endfunction
function echo_blood takes nothing returns nothing
call pm("|cffffcc00Blood mixes:|r")
call pm("6 Blood --> Lifeblood")
call pm("Blood + Fire --> Bloodfire")
call pm("Blood + Rune --> Truth")
call pm("Blood + Focus --> Bloodgem Linking")
call pm("Blood + Will --> Enforcement")
call pm("Blood + Time --> Molding")
call pm("Blood + Summon --> Oath")
call pm("2 Blood + 2 Fire + 2 Summon --> Summon Fire Djinn")
call pm("2 Blood + 2 Rune + 2 Summon --> Summon Construct of Truth")
call pm("2 Blood + 2 Focus + 2 Summon --> Summon Bloodstone")
call pm("2 Blood + 2 Will + 2 Summon --> Command")
call pm("2 Blood + 2 Time + 2 Summon --> Molded Tower")
call echo_wait()
call pm("Blood + Time + Focus --> Mana Burner")
call pm("Blood + Time + Rune --> Floating Stone")
call pm("Blood + Will + Focus --> Rage")
call pm("Blood + Will + Rune --> Borrow Power")
call pm("Blood + Time + Focus + Fire + Earth + Darkness --> Obliterate")
call pm("Blood + Time + Rune + Fire + Earth + Light --> Mine Field")
call pm("Blood + Will + Focus + Fire + Air + Darkness --> Death Bolt")
call pm("Blood + Will + Rune + Fire + Air + Light --> Stunner")
endfunction
function echo_will takes nothing returns nothing
call pm("|cffffcc00Will mixes:|r")
call pm("6 Will --> Pure Will")
call pm("Will + Air --> Airlift")
call pm("Will + Rune --> Bewilling")
call pm("Will + Focus --> Distilling of Power")
call pm("Will + Blood --> Enforcement")
call pm("Will + Spirit --> Thought Reading")
call pm("Will + Summon --> Scrying")
call pm("2 Will + 2 Air + 2 Summon --> Summon Air Furie")
call pm("2 Will + 2 Rune + 2 Summon --> Stabilizer")
call pm("2 Will + 2 Focus + 2 Summon --> Distilling Crystal")
call pm("2 Will + 2 Blood + 2 Summon --> Command")
call pm("2 Will + 2 Spirit + 2 Summon --> Revealer")
call echo_wait()
call pm("Will + Spirit + Focus --> Precision")
call pm("Will + Spirit + Rune --> Haste")
call pm("Will + Blood + Focus --> Rage")
call pm("Will + Blood + Rune --> Borrow Power")
call pm("Will + Spirit + Focus + Air + Water + Darkness --> Force")
call pm("Will + Spirit + Rune + Air + Water + Light --> Limit Breaker")
call pm("Will + Blood + Focus + Air + Fire + Darkness --> Death Bolt")
call pm("Will + Blood + Rune + Air + Fire + Light --> Stunner")
endfunction
function echo_spirit takes nothing returns nothing
call pm("|cffffcc00Spirit mixes:|r")
call pm("6 Spirit --> Spell Weave")
call pm("Spirit + Water --> Heal")
call pm("Spirit + Rune --> Empower")
call pm("Spirit + Focus --> Keying")
call pm("Spirit + Will --> Thought Reading")
call pm("Spirit + Time --> Foresight")
call pm("Spirit + Summon --> Metaphysical Travel")
call pm("2 Spirit + 2 Water + 2 Summon --> Summon Water Shape")
call pm("2 Spirit + 2 Rune + 2 Summon --> Mana Rune")
call pm("2 Spirit + 2 Focus + 2 Summon --> Keystone")
call pm("2 Spirit + 2 Will + 2 Summon --> Revealer")
call pm("2 Spirit + 2 Time + 2 Summon --> Displacer")
call echo_wait()
call pm("Spirit + Time + Focus --> Block")
call pm("Spirit + Time + Rune --> Restore")
call pm("Spirit + Will + Focus --> Precision")
call pm("Spirit + Will + Rune --> Haste")
call pm("Spirit + Time + Focus + Water + Earth + Darkness --> Arctic Blast")
call pm("Spirit + Time + Rune + Water + Earth + Light --> Regeneration")
call pm("Spirit + Will + Focus + Water + Air + Darkness --> Force")
call pm("Spirit + Will + Rune + Water + Air + Light --> Limit Breaker")
endfunction
function echo_time takes nothing returns nothing
call pm("|cffffcc00Time mixes:|r")
call pm("6 Time --> Rewinder")
call pm("Time + Earth --> Earthstrike")
call pm("Time + Rune --> Preserve")
call pm("Time + Focus --> Anchoring")
call pm("Time + Blood --> Molding")
call pm("Time + Spirit --> Foresight")
call pm("Time + Summon --> Spacetime")
call pm("2 Time + 2 Earth + 2 Summon --> Summon Earth Golem")
call pm("2 Time + 2 Rune + 2 Summon --> Safe")
call pm("2 Time + 2 Focus + 2 Summon --> Nulifier")
call pm("2 Time + 2 Blood + 2 Summon --> Mold Tower")
call pm("2 Time + 2 Spirit + 2 Summon --> Displacer")
call echo_wait()
call pm("Time + Spirit + Focus --> Block")
call pm("Time + Spirit + Rune --> Restore")
call pm("Time + Blood + Focus --> Mana Burner")
call pm("Time + Blood + Rune --> Floating Stone")
endfunction
function echo_none takes nothing returns nothing
call pm("|cffffcc00Proper syntax for -mix is one of:|r")
call pm("-mix Earth")
call pm("-mix Water")
call pm("-mix Air")
call pm("-mix Fire")
call pm("-mix Darkness")
call pm("-mix Light")
call pm("-mix Summon")
call pm("-mix Rune")
call pm("-mix Focus")
call pm("-mix Blood")
call pm("-mix Will")
call pm("-mix Spirit")
call pm("-mix Time")
call pm("-mix Purify")
call pm("-mix Multiply")
endfunction
function echo_pure takes nothing returns nothing
call pm("Purify does not mix, nor unmix.")
call pm("|cffffcc00It copies any other basic component.|r")
endfunction
function echo_multi takes nothing returns nothing
call pm("|cffffcc00Multiply mixes with any basic component.|r")
call pm("It makes a multiple spell, same as the basic one, but with 3 charges.")
call pm("The multiple spell does not mix, nor unmix if it has less than all charges.")
call pm("6 Multiply --> Overcharge")
endfunction
function Check_Query takes nothing returns nothing
local boolean checked = false
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "earth" ) then
call echo_earth()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "water" ) then
call echo_water()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 8) == "air" ) then
call echo_air()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 9) == "fire" ) then
call echo_fire()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 13) == "darkness" ) then
call echo_darkness()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "light" ) then
call echo_light()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 11) == "summon" ) then
call echo_summon()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 9) == "rune" ) then
call echo_rune()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "focus" ) then
call echo_focus()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "blood" ) then
call echo_blood()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 9) == "will" ) then
call echo_will()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 11) == "spirit" ) then
call echo_spirit()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "time" ) then
call echo_time()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "Earth" ) then
call echo_earth()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "Water" ) then
call echo_water()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 8) == "Air" ) then
call echo_air()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 9) == "Fire" ) then
call echo_fire()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 13) == "Darkness" ) then
call echo_darkness()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "Light" ) then
call echo_light()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 11) == "Summon" ) then
call echo_summon()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 9) == "Rune" ) then
call echo_rune()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "Focus" ) then
call echo_focus()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "Blood" ) then
call echo_blood()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 9) == "Will" ) then
call echo_will()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 11) == "Spirit" ) then
call echo_spirit()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 9) == "Time" ) then
call echo_time()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 9) == "Pure" ) then
call echo_pure()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 11) == "Purify" ) then
call echo_pure()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 9) == "pure" ) then
call echo_pure()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 11) == "purify" ) then
call echo_pure()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "Multi" ) then
call echo_multi()
set checked=true
endif
if ( SubStringBJ(GetEventPlayerChatString(), 6, 10) == "multi" ) then
call echo_multi()
set checked=true
endif
if(checked == FALSE) then
call echo_none()
endif
endfunction
function PureMessage takes nothing returns nothing
call pmw("Purify copies any other basic element it can find, and is consumed doing so.")
call pmw_y("Thus, it cannot be mixed normaly.")
endfunction
function NoLimitMessage takes nothing returns nothing
call pmw_y("The proper syntax for -mix for a component one of is:")
call pmw("-mix Earth")
call pmw("-mix Water")
call pmw("-mix Air")
call pmw("-mix Fire")
call pmw("-mix Darkness")
call pmw("-mix Light")
call pmw("-mix Summon")
call pmw("-mix Rune")
call pmw("-mix Focus")
call pmw("-mix Blood")
call pmw("-mix Will")
call pmw("-mix Spirit")
call pmw("-mix Time")
call pmw("-mix Purify")
call pmw("-mix Multiply")
endfunction
function TooManyLimitsMessage takes integer limits returns nothing
call pmw_y("A search on " + I2S(limits) + " components gives no result.")
call pmw("Please broaden your search.")
endfunction
function OneMixMessage takes integer nA, string sA, string res returns nothing
local string echo = ""
if(nA > 1) then
set echo = echo + I2S(nA) + " "
endif
set echo = echo + sA + " --> " + res
call pmw(echo)
endfunction
function TwoMixMessage takes integer nA, string sA, integer nB, string sB, string res returns nothing
local string echo = ""
if(nA > 1) then
set echo = echo + I2S(nA) + " "
endif
set echo = echo + sA + " + "
if(nB > 1) then
set echo = echo + I2S(nB) + " "
endif
set echo = echo + sB + " --> " + res
call pmw(echo)
endfunction
function ThreeMixMessage takes integer nA, string sA, integer nB, string sB, integer nC, string sC, string res returns nothing
local string echo = ""
if(nA > 1) then
set echo = echo + I2S(nA) + " "
endif
set echo = echo + sA + " + "
if(nB > 1) then
set echo = echo + I2S(nB) + " "
endif
set echo = echo + sB + " + "
if(nC > 1) then
set echo = echo + I2S(nC) + " "
endif
set echo = echo + sC + " --> " + res
call pmw(echo)
endfunction
function NewRaiderMixingHelp takes nothing returns nothing
local string input = GetEventPlayerChatString()
local integer limits = 0
local boolean earth = FALSE
local boolean water = FALSE
local boolean air = FALSE
local boolean fire = FALSE
local boolean darkness = FALSE
local boolean light = FALSE
local boolean summon = FALSE
local boolean rune = FALSE
local boolean focus = FALSE
local boolean blood = FALSE
local boolean will = FALSE
local boolean spirit = FALSE
local boolean time = FALSE
local string headline ="A search on "
if(StringSearchLoop(input, "pure")) then
call PureMessage()
return
endif
if(StringSearchLoop(input, "purify")) then
call PureMessage()
return
endif
set air = StringSearchLoop(input, "air")
set fire = StringSearchLoop(input, "fire")
set darkness = StringSearchLoop(input, "darkness")
set light = StringSearchLoop(input, "light")
set summon = StringSearchLoop(input, "summon")
set rune = StringSearchLoop(input, "rune")
set focus = StringSearchLoop(input, "focus")
set blood = StringSearchLoop(input, "blood")
set will = StringSearchLoop(input, "will")
set spirit = StringSearchLoop(input, "spirit")
set time = StringSearchLoop(input, "time")
if(StringSearchLoop(input, "earth") == true) then
set earth = true
set limits = limits + 1
set headline = headline + "earth "
endif
if(StringSearchLoop(input, "water") == true) then
set water = true
set limits = limits + 1
set headline = headline + "water "
endif
if(air) then
set limits = limits + 1
set headline = headline + "air "
endif
if(fire) then
set limits = limits + 1
set headline = headline + "fire "
endif
if(darkness) then
set limits = limits + 1
set headline = headline + "darkness "
endif
if(light) then
set limits = limits + 1
set headline = headline + "light "
endif
if(summon) then
set limits = limits + 1
set headline = headline + "summon "
endif
if(rune) then
set limits = limits + 1
set headline = headline + "rune "
endif
if(focus) then
set limits = limits + 1
set headline = headline + "focus "
endif
if(blood) then
set limits = limits + 1
set headline = headline + "blood "
endif
if(will) then
set limits = limits + 1
set headline = headline + "will "
endif
if(spirit) then
set limits = limits + 1
set headline = headline + "spirit "
endif
if(time) then
set limits = limits + 1
set headline = headline + "time "
endif
if(time) then
set limits = limits + 1
set headline = headline + "time "
endif
if(limits == 0) then
call NoLimitMessage()
return
endif
set headline = headline + "yields this result:"
if(limits < 1) then
call pmw_y(headline)
else
call TooManyLimitsMessage(limits)
return
endif
//get and display the actuall information
//pure mixes
if(limits == 1) then
if(earth) then
call OneMixMessage(6, "Earth", "Earthquake")
endif
if(water) then
call OneMixMessage(6, "Water", "Tsunami")
endif
if(air) then
call OneMixMessage(6, "Air", "Airblades")
endif
if(fire) then
call OneMixMessage(6, "Fire", "Sea of Flames")
endif
if(darkness) then
call OneMixMessage(6, "Darkness", "Nightstrike")
endif
if(light) then
call OneMixMessage(6, "Light", "Sunstrike")
endif
if(summon) then
call OneMixMessage(2, "Summon", "Summon Unit")
call OneMixMessage(6, "Summon", "Spacerift")
call OneMixMessage(18, "Summon", "Banish")
endif
if(rune) then
call OneMixMessage(6, "Rune", "Blocking Circle")
endif
if(focus) then
call OneMixMessage(6, "Focus", "Refreshing Gem")
endif
if(blood) then
call OneMixMessage(6, "Blood", "Lifeblood")
endif
if(will) then
call OneMixMessage(6, "Will", "Pure Will")
endif
if(spirit) then
call OneMixMessage(6, "Spirit", "Spell Weave")
endif
if(time) then
call OneMixMessage(6, "Time", "Rewinder")
endif
endif
endfunction
function Trig_raider_mixing_help_jass_Actions takes nothing returns nothing
call Check_Query()
//call NewRaiderMixingHelp()
endfunction
//===========================================================================
function InitTrig_raider_mixing_help_jass takes nothing returns nothing
set gg_trg_raider_mixing_help_jass = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_raider_mixing_help_jass, Player(1), "-mix", false )
call TriggerRegisterPlayerChatEvent( gg_trg_raider_mixing_help_jass, Player(2), "-mix", false )
call TriggerRegisterPlayerChatEvent( gg_trg_raider_mixing_help_jass, Player(3), "-mix", false )
call TriggerRegisterPlayerChatEvent( gg_trg_raider_mixing_help_jass, Player(4), "-mix", false )
call TriggerRegisterPlayerChatEvent( gg_trg_raider_mixing_help_jass, Player(8), "-mix", false )
call TriggerRegisterPlayerChatEvent( gg_trg_raider_mixing_help_jass, Player(9), "-mix", false )
call TriggerRegisterPlayerChatEvent( gg_trg_raider_mixing_help_jass, Player(10), "-mix", false )
call TriggerRegisterPlayerChatEvent( gg_trg_raider_mixing_help_jass, Player(11), "-mix", false )
call TriggerAddAction( gg_trg_raider_mixing_help_jass, function Trig_raider_mixing_help_jass_Actions )
endfunction