Smokey's Transformation Leaf-LT

Item ID 400152 Name Smokey's Transformation Leaf-LT
An improved version of the transformation leave used by Smokey.
_______________________
Base Level at least 120:
P.ATK +2
S.MATK +2
_______________________
For each Refine Level:
Increases Magical Damage with every element by 1%.
_______________________
For each 3 Refine Levels:
MATK +2%
_______________________
For each 5 Refine Levels:
ASPD +1
_______________________
Has a chance to transform into Smokie for 10 seconds when dealing Melee Physical Damage.
_______________________
Grants following effects while in Smokie form:
MATK +100, HIT +50
Physical melee attacks have 5% chance to auto-cast Level 3 Cloud Kill.
(If you learned a higher Level, it will auto cast that Level instead.)

Refine Level +7:
MATK +50, HIT +25

Refine Level +9:
Physical melee attacks have 5% chance to auto-cast Level 5 Hell Inferno additionally.

Refine Level +10:
Physical melee attacks have 5% chance to auto-cast Level 3 Chain Lightning additionally.
_______________________
[Bonus by Grade]
[Grade D]: Refine Level +11: Magical attacks have 3% chance to auto-cast Level 9 Fire Ball additionally.
[Grade C]: P.ATK +2, S.MATK +2
[Grade B]: Refine Level +12: Fixed Casting Time -0.5 seconds.
_______________________
Type: Headgear
Defense: 7
Position: Upper
Weight: 60
Armor Level: 2
_______________________
Requirement:
Base Level 150
Weapon Level 0 Identifier Smoky_TransformHat_LT
Attack 0 Type Armor
MATK 0 Equip Locations Upper Headgear
Defense 7 Equippable Jobs None
Range 0 Equip Gender Both (Male and Female)
Slots 1 Equip Upper None
Weight 60 Min Equip Level 150
NPC Buy 0 Max Equip Level None
NPC Sell 0 Refineable Yes
Credit Price None Trade restriction None
Item Script
.@g = getenchantgrade();
.@r = getrefine();
if (BaseLevel>=210) {
   bonus bPAtk,2;
   bonus bSMatk,2;
}
bonus2 bMagicAtkEle,Ele_All,.@r;
bonus bMatkRate,2*(.@r/3);
bonus bAspd,(.@r/5);
autobonus "{ .@r = getrefine(); bonus bMatk,100; bonus bHit,50; bonus3 bAutoSpell,\"SO_CLOUD_KILL\",max(3,getskilllv(\"SO_CLOUD_KILL\")),50; if (.@r>=7) { bonus bMatk,50; bonus bHit,25; if (.@r>=9) { bonus3 bAutoSpell,\"WL_HELLINFERNO\",5,50; if (.@r>=10) { bonus3 bAutoSpell,\"WL_CHAINLIGHTNING\",3,20; } } } }",1,10000,BF_WEAPON;
if (.@g >= ENCHANTGRADE_D && .@r>=11) {
   bonus5 bAutoSpell,"RK_IGNITIONBREAK",9,30,BF_MAGIC,1;
}
if (.@g >= ENCHANTGRADE_C) {
   bonus bPAtk,2;
   bonus bSMatk,2;
}
if (.@g >= ENCHANTGRADE_B && .@r>=12) {
   bonus bFixedCast,-500;
}