SHARE
TWEET

Untitled

a guest Jun 16th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function GetMonsterData(monster)
  2. {
  3.     var mon = monster;
  4.    
  5.     var monsterDataDB = Spark.metaCollection("MonsterData");
  6.    
  7.     var shortCode = monster.monster.shortCode;
  8.     var thisMonBaseData = monsterDataDB.findOne({"shortCode" : shortCode});
  9.    
  10.     mon.monster.monsterName = thisMonBaseData.name;
  11.     mon.monster.thaiName = thisMonBaseData.thaiName;
  12.     mon.monster.element = thisMonBaseData.element;
  13.     mon.monster.stars = thisMonBaseData.stars;
  14.     mon.monster.tribe = thisMonBaseData.tribe;
  15.     mon.monster.minAttack = thisMonBaseData.minAttack;
  16.     mon.monster.minHitPoint = thisMonBaseData.minHitPoint * 2;
  17.     mon.monster.minRecovery = thisMonBaseData.minRecovery;
  18.     mon.monster.minDefense = thisMonBaseData.minDefense;
  19.     mon.monster.minSpeed = thisMonBaseData.minSpeed;
  20.     mon.monster.maxAttack = thisMonBaseData.maxAttack;
  21.     mon.monster.maxHitPoint = thisMonBaseData.maxHitPoint * 2;
  22.     mon.monster.maxRecovery = thisMonBaseData.maxRecovery;
  23.     mon.monster.maxDefense = thisMonBaseData.maxDefense;
  24.     mon.monster.maxSpeed = thisMonBaseData.maxSpeed;
  25.     mon.monster.activeSkill = thisMonBaseData.activeSkill;
  26.     mon.monster.cooldown = thisMonBaseData.cooldown;
  27.     mon.monster.defenseSkill = thisMonBaseData.defenseSkill;
  28.     mon.monster.evolveMaterials = thisMonBaseData.evolveMaterials;
  29.    
  30.     return this.mon;
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top