
Apple Bomb
Lv 1AttackPhysical
Deals 300% real damage based on self level to an enemy
CD: 10 sec
Range: 1.5
Formula
1function CommonFun.calcDamage_8000(srcUser, targetUser, params, damageParam, logger)
2 local Str = srcUser:GetProperty("Str")
3 local Dex = srcUser:GetProperty("Dex")
4 local Luk = srcUser:GetProperty("Luk")
5 local Atk = srcUser:GetProperty("Atk")
6 local AtkPer = srcUser:GetProperty("AtkPer")
7 local DamIncrease = srcUser:GetProperty("DamIncrease")
8 local IgnoreDef = 0
9 local IgnoreDef1 = srcUser:GetProperty("IgnoreDef")
10 local IgnoreDef2 = srcUser:GetProperty("IgnoreEquipDef")
11 if targetUser.boss or targetUser.mini then
12 IgnoreDef = IgnoreDef1
13 else
14 IgnoreDef = IgnoreDef1 + IgnoreDef2
15 end
16 if 1 <= IgnoreDef then
17 IgnoreDef = 1
18 end
19 local BaseLv = targetUser.BaseLv
20 local WeaponType = srcUser:GetEquipedWeaponType()
21 local skilllv_1 = srcUser:GetLernedSkillLevel(damageParam.skill1_id)
22 local Refine = srcUser:GetProperty("Refine")
23 local damChangePer = damageParam.damChangePer
24 local Def2 = targetUser:GetProperty("Def")
25 local DefPer2 = targetUser:GetProperty("DefPer")
26 local Vit2 = targetUser:GetProperty("Vit")
27 local VitPer2 = targetUser:GetProperty("VitPer")
28 local DamReduc2 = CommonFun.calcDamReDuc(srcUser, targetUser)
29 local RefineDamReduc = CommonFun.calcRefineDamReduc(srcUser, targetUser)
30 local AttrEffect2 = srcUser:GetProperty("AttrEffect")
31 local bits2 = CommonFun.getBits(AttrEffect2)
32 local AtkFinal = math.floor(BaseLv, BaseLv * 3) * damChangePer
33 local DefReduc = CommonFun.CalcDef(srcUser, targetUser)
34 local A = (AtkFinal * DefReduc * (1 - DamReduc2) + Refine) * (1 + DamIncrease) * (1 - RefineDamReduc) - Vit2 * (1 + VitPer2)
35 if A <= 1 then
36 return 1
37 end
38 return A
39endPreserved HTML snapshot from ROM Handbook
