Advertisement
Guest User

Untitled

a guest
Jun 4th, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.18 KB | None | 0 0
  1. // Add to magic modifier list
  2. // Version that works for red units
  3. prAdd2IfUnitWithConditionMetInArea:
  4.     prIfUnitHasAllegience(UA_RED)
  5.         rForEachUnitInRangeTemplate(pTheWanShape)
  6.             rIf/* Whatever Condition should be met for the unit that gives the aura */
  7.                 rAdd(rConstant(2))
  8.  
  9. // Add to magic modifier list
  10. // Version that works for enemy units
  11. prAdd2IfUnitWithConditionMetInArea:
  12.     rForEachUnitInRangeTemplate(pTheWanShape)
  13.         rIfUnitsAreNotAllied
  14.             rIf/* Whatever Condition should be met for the unit that gives the aura */
  15.                 rAdd(rConstant(2))
  16.  
  17. // Add to magic modifier list
  18. // Version that works for enemy units, and doesn't stack
  19. prAdd2IfUnitWithConditionMetInArea:
  20. {
  21.     rAdd
  22.         rCallSequence(prNullify _prGet2Or0DependingOnConditionWhatever)
  23.  
  24. _prGet2Or0DependingOnConditionWhatever:
  25.     rForEachUnitInRangeTemplate(pTheWanShape)
  26.         rIfUnitsAreNotAllied
  27.             rIf/* Whatever Condition should be met for the unit that gives the aura */
  28.                 rConstant(2)
  29. }
  30.  
  31. pTheWanShape:
  32.     // Header
  33.     BYTE 5 5 // Size
  34.     BYTE 3 3 // Origin (Where the Unit would be)
  35.  
  36.     // Data
  37.     BYTE 0 1 1 1 0
  38.     BYTE 1 0 1 0 1
  39.     BYTE 1 1 0 1 1
  40.     BYTE 1 0 1 0 1
  41.     BYTE 0 1 1 1 0
  42.    
  43.     // For good measure
  44.     ALIGN 4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement