diff options
Diffstat (limited to 'src/map/elemental.c')
-rw-r--r-- | src/map/elemental.c | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/src/map/elemental.c b/src/map/elemental.c index 7ffeea410..caba02692 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -64,7 +64,7 @@ struct view_data * elemental_get_viewdata(int class_) { int elemental_create(struct map_session_data *sd, int class_, unsigned int lifetime) { struct s_elemental ele; struct s_elemental_db *db; - int i; + int i, summon_level, skill_level; nullpo_retr(1,sd); @@ -77,63 +77,67 @@ int elemental_create(struct map_session_data *sd, int class_, unsigned int lifet ele.char_id = sd->status.char_id; ele.class_ = class_; ele.mode = EL_MODE_PASSIVE; // Initial mode - i = db->status.size+1; // summon level + summon_level = db->status.size+1; // summon level //[(Caster's Max HP/ 3 ) + (Caster's INT x 10 )+ (Caster's Job Level x 20 )] x [(Elemental Summon Level + 2) / 3] - ele.hp = ele.max_hp = (sd->battle_status.max_hp/3 + sd->battle_status.int_*10 + sd->status.job_level) * ((i + 2) / 3); + ele.hp = ele.max_hp = (sd->battle_status.max_hp/3 + sd->battle_status.int_*10 + sd->status.job_level) * ((summon_level + 2) / 3); //Caster's Max SP /4 ele.sp = ele.max_sp = sd->battle_status.max_sp/4; //Caster's [ Max SP / (18 / Elemental Summon Skill Level) 1- 100 ] - ele.atk = (sd->battle_status.max_sp / (18 / i) * 1 - 100); + ele.atk = (sd->battle_status.max_sp / (18 / summon_level) * 1 - 100); //Caster's [ Max SP / (18 / Elemental Summon Skill Level) ] ele.atk2 = sd->battle_status.max_sp / 18; //Caster's HIT + (Caster's Base Level) ele.hit = sd->battle_status.hit + sd->status.base_level; //[Elemental Summon Skill Level x (Caster's INT / 2 + Caster's DEX / 4)] - ele.matk = i * (sd->battle_status.int_ / 2 + sd->battle_status.dex / 4); + ele.matk = summon_level * (sd->battle_status.int_ / 2 + sd->battle_status.dex / 4); //150 + [Caster's DEX / 10] + [Elemental Summon Skill Level x 3 ] - ele.amotion = 150 + sd->battle_status.dex / 10 + i * 3; + ele.amotion = 150 + sd->battle_status.dex / 10 + summon_level * 3; //Caster's DEF + (Caster's Base Level / (5 - Elemental Summon Skill Level) - ele.def = sd->battle_status.def + sd->status.base_level / (5-i); + ele.def = sd->battle_status.def + sd->status.base_level / (5-summon_level); //Caster's MDEF + (Caster's INT / (5 - Elemental Summon Skill Level) - ele.mdef = sd->battle_status.mdef + sd->battle_status.int_ / (5-i); + ele.mdef = sd->battle_status.mdef + sd->battle_status.int_ / (5-summon_level); //Caster's FLEE + (Caster's Base Level / (5 - Elemental Summon Skill Level) - ele.flee = sd->status.base_level / (5-i); + ele.flee = sd->status.base_level / (5-summon_level); //Caster's HIT + (Caster's Base Level) ele.hit = sd->battle_status.hit + sd->status.base_level; //per individual bonuses switch(db->class_){ - case 2114: case 2115: + case 2114: + case 2115: case 2116: //ATK + (Summon Agni Skill Level x 20) / HIT + (Summon Agni Skill Level x 10) - ele.atk += i * 20; - ele.atk2 += i * 20; - ele.hit += i * 10; + ele.atk += summon_level * 20; + ele.atk2 += summon_level * 20; + ele.hit += summon_level * 10; break; - case 2117: case 2118: + case 2117: + case 2118: case 2119: //MDEF + (Summon Aqua Skill Level x 10) / MATK + (Summon Aqua Skill Level x 20) - ele.mdef += i * 10; - ele.matk += i * 20; + ele.mdef += summon_level * 10; + ele.matk += summon_level * 20; break; - case 2120: case 2121: + case 2120: + case 2121: case 2122: //FLEE + (Summon Ventus Skill Level x 20) / MATK + (Summon Ventus Skill Level x 10) - ele.flee += i * 20; - ele.matk += i * 10; + ele.flee += summon_level * 20; + ele.matk += summon_level * 10; break; - case 2123: case 2124: + case 2123: + case 2124: case 2125: //DEF + (Summon Tera Skill Level x 25) / ATK + (Summon Tera Skill Level x 5) - ele.def += i * 25; - ele.atk += i * 5; - ele.atk2 += i * 5; + ele.def += summon_level * 25; + ele.atk += summon_level * 5; + ele.atk2 += summon_level * 5; break; } - if( (i=pc->checkskill(sd,SO_EL_SYMPATHY)) > 0 ){ - ele.hp = ele.max_hp = ele.max_hp * 5 * i / 100; - ele.sp = ele.max_sp = ele.max_sp * 5 * i / 100; - ele.atk += 25 * i; - ele.atk2 += 25 * i; - ele.matk += 25 * i; + if ((skill_level=pc->checkskill(sd,SO_EL_SYMPATHY)) > 0) { + ele.hp = ele.max_hp += ele.max_hp * 5 * skill_level / 100; + ele.sp = ele.max_sp += ele.max_sp * 5 * skill_level / 100; + ele.atk += 25 * skill_level; + ele.atk2 += 25 * skill_level; + ele.matk += 25 * skill_level; } ele.life_time = lifetime; |