private static function initRuneData() { ### NAME TWICE min, maxLEVEL, DROP_C, PRICE, FAIL_C, BRK_C, MIN, MAX // self::$RUNEDATA['elephants'] = array('elephants', 3, 200, 20.00, 200.00, 30.00, 12.00, 0.2, 4.0); // self::$RUNEDATA['orcas'] = array('orcas', 6, 200, 20.00, 200.00, 30.00, 10.00, 0.2, 4.0); self::$RUNEDATA['max_hp'] = array('max_hp', 1, 150, 80.0, 200.0, 10.0, 2.0, 0.2, 3.0); self::$RUNEDATA['max_mp'] = array('max_mp', 4, 150, 80.0, 250.0, 10.0, 2.0, 0.2, 6.0); self::$RUNEDATA['max_weight'] = array('max_weight', 2, 100, 100.0, 300.0, 15.0, 4.0, 100.0, 3000.0); // self::$RUNEDATA['attack'] = array('attack', 5, 100, 60.00, 650.00, 20.00, 6.00, 0.2, 2.0); self::$RUNEDATA['attack'] = array('attack', 3, 32, 60.0, 250.0, 1.5, 0.5, 0.5, 5.0); self::$RUNEDATA['attack_time'] = array('attack_time', 3, 64, 50.0, 300.0, 2.5, 0.6, 0.4, 4.0); self::$RUNEDATA['defense'] = array('defense', 5, 150, 50.0, 900.0, 22.0, 7.0, 0.2, 2.0); // self::$RUNEDATA['spellatk'] = array('spellatk', 10, 120, 40.00, 750.00, 20.00, 6.00, 0.2, 2.0); // self::$RUNEDATA['spelldef'] = array('spelldef', 6, 160, 30.00, 1000.00, 22.00, 7.00, 0.2, 2.0); self::$RUNEDATA['min_dmg'] = array('min_dmg', 10, 120, 40.0, 900.0, 21.0, 6.5, 0.2, 2.0); self::$RUNEDATA['max_dmg'] = array('max_dmg', 10, 110, 55.0, 900.0, 21.0, 6.5, 0.2, 2.0); self::$RUNEDATA['marm'] = array('marm', 10, 120, 25.0, 1250.0, 24.0, 8.0, 0.2, 2.0); self::$RUNEDATA['farm'] = array('farm', 10, 130, 22.0, 1250.0, 24.0, 8.0, 0.2, 2.0); # Mount self::$RUNEDATA['lock'] = array('lock', 10, 140, 50.0, 800.0, 25.0, 6.5, 0.2, 2.0); self::$RUNEDATA['transport'] = array('transport', 10, 120, 50.0, 600.0, 20.0, 6.5, 0.2, 2.0); self::$RUNEDATA['tuneup'] = array('tuneup', 10, 100, 50.0, 400.0, 15.0, 6.5, 0.2, 2.0); foreach (SR_Player::$ATTRIBUTE as $a) { self::$RUNEDATA[$a] = array($a, 6, 100, 100.0, 400.0, 12.0, 4.0, 0.1, 1.0); } foreach (SR_Player::$SKILL as $sk) { self::$RUNEDATA[$sk] = array($sk, 8, 120, 70.0, 600.0, 16.0, 8.0, 0.1, 2.0); } foreach (SR_Spell::getSpells() as $sp => $spell) { self::$RUNEDATA[$sp] = array($sp, 8, 130, 60.0, 800.0, 18.0, 9.0, 0.5, 3.0); } # Override essence self::$RUNEDATA['essence'] = array('essence', 2000, 2000, 0.0, 500.0, 45.0, 25.0, 0.1, 1.0); }
private static function getSpellTree($player) { $back = array(); $spells = SR_Spell::getSpells(); ksort($spells); foreach ($spells as $name => $spell) { $spell instanceof SR_Spell; if ($player === NULL || $spell->getBaseLevel($player) < 0) { $back[$name] = self::getSpellHelpGuest($spell); } else { $back[$name] = self::getSpellHelp($spell, $player); } } return $back; }
private function initModify() { $this->sr4_data_modified = array('base_hp' => $this->getVar('sr4pl_base_hp'), 'base_mp' => $this->getVar('sr4pl_base_mp'), 'hp_per_body' => self::HP_PER_BODY, 'mp_per_magic' => self::MP_PER_MAGIC, 'mp_per_casting' => self::MP_PER_CASTING, 'level' => $this->getVar('sr4pl_level'), 'bad_karma' => $this->getVar('sr4pl_bad_karma')); $this->initModifyStats(self::$COMBAT_STATS); $this->initModifyStats(self::$MAGIC_STATS); $this->initModifyStats(self::$MOUNT_STATS); $this->initModifyStats(self::$CONDITIONS); $this->initModifyArray(self::$FEELINGS); $this->initModifyArray(self::$SKILL); $this->initModifyArray(self::$ATTRIBUTE); $this->initModifyArray(self::$KNOWLEDGE); $this->initModifyStats(array_keys(SR_Spell::getSpells()), -1); foreach (explode(',', $this->getVar('sr4pl_known_spells')) as $data) { if ($data !== '') { $d = explode(':', $data); $this->sr4_data_modified[$d[0]] = $d[1]; } } }
public static function isSpell($spellname) { foreach (SR_Spell::getSpells() as $spell) { $spell instanceof SR_Spell; if ($spell->getName() === $spellname) { return true; } } return false; }
private function displaySurgeryPrices(SR_Player $player, $section = NULL) { if ($section === NULL) { return $this->displayAllSurgeryPrices($player); } $prices = array(); switch ($section) { case 'race': foreach (SR_Player::$RACE as $race => $data) { if (false !== ($price = $this->getRacePrice($race))) { $prices[$race] = $price; } } break; case 'skill': foreach (SR_Player::$SKILL as $skill) { if (false !== ($price = $this->getSkillPrice($skill))) { $prices[$skill] = $price; } } break; case 'gender': foreach (array('male', 'female') as $gender) { if (false !== ($price = $this->getGenderPrice($gender))) { $prices[$gender] = $gender; } } break; case 'attribute': foreach (SR_Player::$ATTRIBUTE as $attribute) { if (false !== ($price = $this->getAttributePrice($attribute))) { $prices[$attribute] = $price; } } break; case 'spell': foreach (SR_Spell::getSpells() as $spell) { $spell instanceof SR_Spell; $spellname = $spell->getName(); if (false !== ($price = $this->getSpellPrice($spellname))) { $prices[$spellname] = $price; } } break; case 'knowledge': foreach (SR_Player::$KNOWLEDGE as $knowledge) { if (false !== ($price = $this->getKnowledgePrice($knowledge))) { $prices[$knowledge] = $price; } } break; default: return $this->displayAllSurgeryPrices($player); } return $this->displaySurgeryPricesB($player, $section, $prices); }