 |   |  |  |
| World Editor Help Zone Need help with Blizzard's World Editor? Ask general questions about its features and use in this forum. README! |
 |
11-19-2008, 10:31 PM
|
#1 (permalink)
|
User
Join Date: Apr 2008
Posts: 347
|
Item Abilities: magic damage reduce
I wanna to make a magic damage reduce abilities of items to stack. For example, if hero carries 2 items: one give 15% mdr, and other 20% mdr, hero should take totally 1*0.85*0.8=68% damage (=32% mdr). I used an ability of rune bracers, mdr didn't stack. It reduces magic damage only by 20% instead of 32%. Any way to solve this problem? Other abilities? Triggers?
|
|
|
11-19-2008, 11:22 PM
|
#2 (permalink)
|
13lood[RMP]
Join Date: Aug 2008
Posts: 156
|
u could make it so when u get 2 of that item it upgrades then if u get another of the 1st rank one it upgrades again and so on.
EX) Item 1 + item 1 = item 2
Item 2 + Item 1 = Item 3
and u could go on and on and on
|
|
|
11-19-2008, 11:36 PM
|
#3 (permalink)
|
Spell and Map Moderator
The Helpful Personage
Join Date: Jan 2005
Posts: 4,269
|
What ever you do, do not get magic reduction over 100% or else you start to rehel from damaging spells and damage from rehealing spells.
|
|
|
11-19-2008, 11:51 PM
|
#4 (permalink)
|
User
Join Date: Apr 2008
Posts: 347
|
It will be too much combinations =)
I think it'll be than 100 items in my ORPG. So if i'll have 10 items with mdr (and i'll have them, at least), i'll have to create 90 extra items (as all items have different mdr value).
Ofc, i can make an mdr skill with 50-100 skill levels and set integer variables for damage reduction (smth like unit aquires item, if(item type of (item being manipulated)==A000 or ***=A001 or ***)), then set udg_integer=udg_integer+28, and then set level of mdr skill to udg_integer. But this way is big too... and skills with many skill levels increases map loading time greatly,
|
|
|
11-19-2008, 11:53 PM
|
#5 (permalink)
|
WorldEditor Lame'O
Join Date: May 2008
Posts: 101
|
2 items MDR will not stack.
However, innat armor type MDR and 1 unit MDR ability and 1 item MDR ability do stack.
Check out DotA Mechanics subforum to see which item/unit MDR ability will work when you get many of them.
|
|
|
11-21-2008, 05:34 PM
|
#6 (permalink)
|
User
Join Date: Apr 2008
Posts: 347
|
So, it's impossible to do it?(
Anyway, thanks for trying to help.
|
|
|
11-21-2008, 08:09 PM
|
#7 (permalink)
|
User
Join Date: Oct 2007
Posts: 138
|
No, it is NOT impossible. You will need to do it with triggers. There are several other ways to do it. My way require only one tempory integer, but require that none of your items that grants bonus magic resissistance has any usable ability and will require that you set their charges to your amount of magic resistance that it grants:
Firstly: (SAVE your map)
Second: Remove all magic damage reduction bonusses from items. Create a new ability Magic Ressistance with 100 levels, each level granting magic resistance equal to that level. Like level 1 : 1% Level 2: 2%... Level 100: 100%
Third: Change all your item types to (artifact). You can use any item type and change their charges to the amount of magic resistance they should give
Fourth: Add a integer variable : Temp_Integer
Lastly: Create a trigger doing the following:
function Trig_Item_Conditions takes nothing returns booleanreturn GetItemType (GetManipulatedItem ())==ITEM_TYPE_ARTIFACT endfunctionfunction Trig_Item_Actions takes nothing returns nothinglocal unit u=GetTriggerUnit ()local integer i=0 local integer m=0 loopexitwhen i==6 set i=i+1 if GetItemType (UnitItemInSlotBJ (u, i ))==ITEM_TYPE_ARTIFACT thenset m=m+GetItemCharges (UnitItemInSlotBJ (u, i ))endifendlooploopexitwhen GetUnitAbilityLevel (u, 'A000')==0 call UnitRemoveAbility (u, 'A000')endloopif m>0 thenif m> 100 thenset m=100 endifcall UnitAddAbility (u, 'A000')call SetUnitAbilityLevel (u, 'A000',m )endifset u= nullset i=0 set m=0 endfunction//===========================================================================function InitTrig_Item takes nothing returns nothing set gg_trg_Item = CreateTrigger ( ) call TriggerAddAction ( gg_trg_Item, function Trig_Item_Actions ) call TriggerAddCondition (gg_trg_Item, Condition (function Trig_Item_Conditions )) call TriggerRegisterAnyUnitEventBJ ( gg_trg_Item, EVENT_PLAYER_UNIT_PICKUP_ITEM ) call TriggerRegisterAnyUnitEventBJ ( gg_trg_Item, EVENT_PLAYER_UNIT_DROP_ITEM ) // We do the following to prevent first time lag, just replace the unit with any unit in your mapcall UnitAddAbility (bj_lastCreatedUnit, 'A000')call SetUnitAbilityLevel (bj_lastCreatedUnit, 'A000',100 )call UnitRemoveAbility (bj_lastCreatedUnit, 'A000')endfunction
It should work...
__________________
Download C.H.A.O.S and prepare yourself for the ultimate AOS experiance:
CHAOS version 0.4.2
Sorry, but I'm currently on vacation. I'll be back on the 10th.
Last edited by KYTON; 11-22-2008 at 09:51 AM..
|
|
|
11-21-2008, 09:05 PM
|
#8 (permalink)
|
User
Join Date: Apr 2008
Posts: 347
|
I know how to make it by triggers. It's icon ivisible, thanks @ all. KYTON, use please [ trigger][ /trigger] for GUI and [ jass][ /jass] for script codes. Your posts has good ideas but looks weird^^
|
|
|
11-22-2008, 08:05 AM
|
#9 (permalink)
|
User
Join Date: Oct 2007
Posts: 138
|
Sorry. I can't remember when last I used gui so I tried to write it in GUI but... well ...
I'll rewhrite it in JASS...
__________________
Download C.H.A.O.S and prepare yourself for the ultimate AOS experiance:
CHAOS version 0.4.2
Sorry, but I'm currently on vacation. I'll be back on the 10th.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|  |  |  |  |   |  |
|