View Single Post
Old 10-22-2009, 07:42 AM   #5
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

Collapse JASS:
//*  Damage modifiers are implemented as structs that extend the
//*  system's DamageModifier struct. A damage modifier is created
//*  for a specific unit and can modify both the damage that the
//*  unit deals and receives (using the damage and damaged methods
//*  respectively, see the interface defined at the end of the
//*  calibration section).
Shouldn't it be UNIT_TYPE specific?

Further on, there is no example code.
No matter how good your documentation is, an example code is always on top when it comes to user friendly.

Some good stuff you did:
- Automatic Trigger Refresh
- Versions for Table, AutoIndex
- Versions for IDDS, LLDD

Edit:
Collapse JASS:
// In wc3, damage events sometimes occur when no real damage is dealt,
        // for example when some spells are cast that don't really deal damage,
        // also some systems use very small damages to test for valid targets,
        // so this system will only consider damage events where damage is
        // higher than this threashold value.
        private constant real DAMAGE_THRESHOLD = 0.05
Damage event bigger then DAMAGE_THRESHOLD AND smaller then 0 should be considered.

Edit2:
Collapse JASS:
public struct shield extends shield_template
        private ShieldRelay relay
        
        static method create takes unit u, integer priority returns shield
Is there any reason why you wrote that public to the struct, but not the public to the static?


Edit3:
Collapse JASS:
        method damaged takes unit damageSource, real damage returns real //returned real says how much damage to prevent

What do you mean with prevent? Elaborate please.
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote