| 05-16-2007, 05:27 PM | #1 |
hi, i working on a passive spell that will increase the hero's damage based on 5/10/15% of the units intellect. also one that will increase the heros armor by 10/15/20% of the heros intellect. thanks for any help -illiro |
| 05-18-2007, 01:14 PM | #2 |
Intellect? You'll need to manually increase the damage that is and that mostly involves adding the item damage bonus ability to the hero, but you application is as such that bonusmod is the only sane way to do it. |
| 05-20-2007, 06:13 PM | #3 |
You can add "takes event" trigger to each unit and do the damage manually using triggers. It is not very difficult, but requres a lot of triggers created on the run. |
| 05-20-2007, 09:35 PM | #4 |
If you dont care about MUI, you can do this: have an ability with 100 levels (youll need more if you plan on increasing over 99) based off Item Attack Damage Bonus +1. Each level should go up, starting with 0 (level 1 = 0, 2 = 1, 3 = 2) The hero starts off with this, but since level 1 is 0 it wont show anything. Every second or so, set RealInteger equal to the heros intellegence * .15 or whatever. Then set the level of damage bonus to the result + 1. |
| 05-20-2007, 09:48 PM | #5 | |
Quote:
As for detecting when to update the bonus, I'd have a trigger that periodically goes off every second or so that checks for a change in the hero's intelligence. If there is one, adjust the damage or armor. |
| 05-20-2007, 11:21 PM | #6 |
Auto-Fill is your answer for the Object Editor part. Do Dill's thing but use Auto-Fill (search, if you don't know what it is). As for triggers, every second check the % of your Hero's INT (probably should set your Hero to a Global Variable), convert that to an integer, and use that integer as the level for the +DMG ability. - For your armour thing, and suggest making a dummy ability that at level 1, increases armour by 0, and level 2 is +1 armour, and yeah. (Auto-Fill!) Every second, check the % of your Hero's armour (remember, use a variable), convert that number to an integer, and use that integer as the level of your dummy +DEF ability. Then, get the dummy to cast! - Auto-Fill will help, especially if these bonuses are expected to be above 5 levels. Don't forget polishings and such... |
| 05-21-2007, 01:59 PM | #8 | |
Quote:
Are you out of your mind? Do you even know how much that could increase loading time? ![]() And what is this "bonusmod" and where can I find it? |
| 05-21-2007, 04:43 PM | #9 | |
(not good at english,so.............) Quote:
your hero to attack an unit,then you press "S" , trigger with PlayerUnitAttackedEvent will alse run. JASS:// Trigger: attack function Trig_attack_Conditions takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A000', GetEventDamageSource()) > 0 ) ) then return false endif return true endfunction function Trig_attack_Actions takes nothing returns nothing local texttag demage call DisableTrigger( GetTriggeringTrigger() ) call UnitDamageTargetBJ( GetEventDamageSource(), GetTriggerUnit(), I2R(GetHeroStatBJ(bj_HEROSTAT_INT, GetEventDamageSource(), true)), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL ) set demage=CreateTextTagUnitBJ( I2S(GetHeroStatBJ(bj_HEROSTAT_AGI, GetEventDamageSource(), true)), GetTriggerUnit(), 0, 10, 100, 0.00, 0.00, 0 ) call SetTextTagVelocityBJ( demage, 45, 90 ) call SetTextTagPermanentBJ( demage, false ) call SetTextTagLifespanBJ( demage, 1.0 ) call PolledWait(1) call DestroyTextTag(demage) call DisableTrigger(GetTriggeringTrigger()) call DestroyTrigger(GetTriggeringTrigger()) endfunction // Trigger: look function Trig_look_Actions takes nothing returns nothing local trigger attack set attack=CreateTrigger() call TriggerRegisterUnitEvent( attack, GetEventTargetUnit(), EVENT_UNIT_DAMAGED ) call TriggerAddCondition(attack,Condition(function Trig_attack_Conditions)) call TriggerAddAction(attack,function Trig_attack_Actions) endfunction //start. function Trig_start_Conditions takes nothing returns boolean if ( GetLearnedSkillBJ() == 'A000') then return true else return false endif endfunction function Trig_start_Actions takes nothing returns nothing local trigger look set look=CreateTrigger() call TriggerRegisterUnitEvent( look, GetTriggerUnit(), EVENT_UNIT_TARGET_IN_RANGE ) call TriggerAddAction(look,function Trig_look_Actions) endfunction function InitTrig_start takes nothing returns nothing set gg_trg_start = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_start, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_start, Condition( function Trig_start_Conditions ) ) call TriggerAddAction( gg_trg_start, function Trig_start_Actions ) endfunction |
| 05-21-2007, 07:51 PM | #10 |
I have one spell with 100 levels, which supports all damage bonuses in my game. It does increase loading time, but it makes the map a helluva lto easier when you just say 'add Damage Bonus' Set level of 'Damage Bonus' to X + 1 |
| 05-21-2007, 08:05 PM | #11 |
Blade's item system has bonus mod in it: http://www.wc3campaigns.net/showthread.php?t=85909 . It basically means you only need to use log n ability for a bonus of n. |
