(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Modding > World Editor Help Zone

World Editor Help Zone Need help with Blizzard's World Editor? Ask general questions about its features and use in this forum. README!

Reply
 
LinkBack Thread Tools Display Modes
Old 11-19-2008, 10:31 PM   #1 (permalink)
 
Day-Elven's Avatar

User
 
Join Date: Apr 2008
Posts: 347

Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)


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?
Day-Elven is offline   Reply With Quote
Old 11-19-2008, 11:22 PM   #2 (permalink)
 
Shendoo2's Avatar

13lood[RMP]
 
Join Date: Aug 2008
Posts: 156

Shendoo2 has little to show at this moment (4)


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
Shendoo2 is offline   Reply With Quote
Old 11-19-2008, 11:36 PM   #3 (permalink)
Spell and Map Moderator
 
Dr Super Good's Avatar

The Helpful Personage
 
Join Date: Jan 2005
Posts: 4,269

Dr Super Good is a name known to all (691)Dr Super Good is a name known to all (691)Dr Super Good is a name known to all (691)Dr Super Good is a name known to all (691)


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.
Dr Super Good is offline   Reply With Quote
Old 11-19-2008, 11:51 PM   #4 (permalink)
 
Day-Elven's Avatar

User
 
Join Date: Apr 2008
Posts: 347

Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)


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,
Day-Elven is offline   Reply With Quote
Old 11-19-2008, 11:53 PM   #5 (permalink)
 
Dagguh's Avatar

WorldEditor Lame'O
 
Join Date: May 2008
Posts: 101

Dagguh has little to show at this moment (10)Dagguh has little to show at this moment (10)


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.
Dagguh is offline   Reply With Quote
Old 11-21-2008, 05:34 PM   #6 (permalink)
 
Day-Elven's Avatar

User
 
Join Date: Apr 2008
Posts: 347

Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)


So, it's impossible to do it?(
Anyway, thanks for trying to help.
Day-Elven is offline   Reply With Quote
Old 11-21-2008, 08:09 PM   #7 (permalink)
 
KYTON's Avatar

User
 
Join Date: Oct 2007
Posts: 138

KYTON has little to show at this moment (8)


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 boolean
return GetItemType(GetManipulatedItem())==ITEM_TYPE_ARTIFACT
endfunction



function Trig_Item_Actions takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer i=0
local integer m=0

loop
exitwhen i==6
set i=i+1
if GetItemType(UnitItemInSlotBJ(u, i))==ITEM_TYPE_ARTIFACT then
set m=m+GetItemCharges(UnitItemInSlotBJ(u, i))
endif
endloop

loop
exitwhen GetUnitAbilityLevel(u,'A000')==0
call UnitRemoveAbility(u,'A000')
endloop

if m>0 then


if m> 100 then
set m=100
endif

call UnitAddAbility(u,'A000')
call SetUnitAbilityLevel(u,'A000',m)

endif

set u=null
set 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 map
call 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..
KYTON is offline   Reply With Quote
Old 11-21-2008, 09:05 PM   #8 (permalink)
 
Day-Elven's Avatar

User
 
Join Date: Apr 2008
Posts: 347

Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)


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^^
Day-Elven is offline   Reply With Quote
Old 11-22-2008, 08:05 AM   #9 (permalink)
 
KYTON's Avatar

User
 
Join Date: Oct 2007
Posts: 138

KYTON has little to show at this moment (8)


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.
KYTON is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] a (passive) spell that reduce damage Shanghai World Editor Help Zone 6 10-24-2008 11:40 AM
How to reduce item stock quantity Vex Triggers & Scripts 2 10-21-2008 01:30 AM
[Solved] reduce damage taken by 20% & dishing 5% less damage 2Clever4u World Editor Help Zone 9 09-14-2008 12:35 AM
Attack Speed Reduce on Item Kool_Kila World Editor Help Zone 4 07-29-2007 01:58 PM
Item Abilities TO Hero Abilities Izzen@WC3 World Editor Help Zone 9 05-29-2007 06:33 PM

All times are GMT. The time now is 04:53 AM.






Your link here 
Novela historica | French Grammar | Internet Advertising | Loans | Credit Cards
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle