ZoriaRPG

ZScript: Automatic Elemental Damage Evaluation for Binx

May 30th, 2017
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const int ELEMENT_FIRE      = 0;
  2. const int ELEMENT_WATER     = 1;
  3. const int ELEMENT_EARTH     = 2;
  4. const int ELEMENT_AIR       = 3;
  5. const int ELEMENT_DARK      = 4;
  6. const int ELEMENT_LIGHT     = 5;
  7.  
  8. const int TARGET_FIRE       = 1;
  9. const int TARGET_WATER      = 4;
  10. const int TARGET_EARTH      = 7;
  11. const int TARGET_AIR        = 10;
  12. const int TARGET_DARK       = 13;
  13. const int TARGET_LIGHT      = 16;
  14.  
  15.  
  16. int ElementalDamageTable[]={
  17.         //Type,     Target,     Multiplier
  18.         ELEMENT_FIRE, ELEMENT_FIRE, 0//2
  19.         ELEMENT_FIRE, ELEMENT_WATER,    0//5
  20.         ELEMENT_FIRE, ELEMENT_EARTH,    0//8
  21.         ELEMENT_FIRE, ELEMENT_AIR,  0//11
  22.         ELEMENT_FIRE, ELEMENT_DARK, 0//14
  23.         ELEMENT_FIRE, ELEMENT_LIGHT,    0//17
  24.        
  25.         ELEMENT_WATER, ELEMENT_FIRE,    0//20
  26.         ELEMENT_WATER, ELEMENT_WATER,   0//23
  27.         ELEMENT_WATER, ELEMENT_EARTH,   0//26
  28.         ELEMENT_WATER, ELEMENT_AIR, 0//29
  29.         ELEMENT_WATER, ELEMENT_DARK,    0//32
  30.         ELEMENT_WATER, ELEMENT_LIGHT,   0//35
  31.        
  32.         ELEMENT_EARTH, ELEMENT_FIRE,    0//38
  33.         ELEMENT_EARTH, ELEMENT_WATER,   0//41
  34.         ELEMENT_EARTH, ELEMENT_EARTH,   0//44
  35.         ELEMENT_EARTH, ELEMENT_AIR, 0//47
  36.         ELEMENT_EARTH, ELEMENT_DARK,    0//50
  37.         ELEMENT_EARTH, ELEMENT_LIGHT,   0//53
  38.        
  39.         ELEMENT_AIR, ELEMENT_FIRE,  0//56
  40.         ELEMENT_AIR, ELEMENT_WATER, 0//59
  41.         ELEMENT_AIR, ELEMENT_EARTH,     0//62
  42.         ELEMENT_AIR, ELEMENT_AIR,   0//65
  43.         ELEMENT_AIR, ELEMENT_DARK,  0//68
  44.         ELEMENT_AIR, ELEMENT_LIGHT, 0//71
  45.        
  46.         ELEMENT_DARK, ELEMENT_FIRE, 0//74
  47.         ELEMENT_DARK, ELEMENT_WATER,    0//77
  48.         ELEMENT_DARK, ELEMENT_EARTH,    0//80
  49.         ELEMENT_DARK, ELEMENT_AIR,  0//83
  50.         ELEMENT_DARK, ELEMENT_DARK, 0//86
  51.         ELEMENT_DARK, ELEMENT_LIGHT,    0//89
  52.        
  53.         ELEMENT_LIGHT, ELEMENT_FIRE,    0//92
  54.         ELEMENT_LIGHT, ELEMENT_WATER,   0//95
  55.         ELEMENT_LIGHT, ELEMENT_EARTH,   0//98
  56.         ELEMENT_LIGHT, ELEMENT_AIR, 0//101
  57.         ELEMENT_LIGHT, ELEMENT_DARK,    0//104
  58.         ELEMENT_LIGHT, ELEMENT_LIGHT,   0       //107
  59.     }
  60.        
  61.  
  62.  
  63.  
  64.  
  65.  
  66. float GetDamage(int element_type, int target){
  67.     return ElementalDamageTable[(element * 18) + target + 1];
  68. }
  69.  
  70. void SetDamageMultiplier(int element_type, int target, float damage){
  71.     ElementalDamageTable[(element * 18) + target + 1] = damage;
  72. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×