Mr. Ravenswood
Member
Is there a way to make weapons actually use up MP so like a sword could use up 5 MP every time it is used and an ultimate axe of power uses 200 MP each turn.
Thanks :smile:
Thanks :smile:
# Weapons Use MP (VX)
# By SephirothSpawn
class RPG::Weapon
# weapon_id => mp_cost
MP_Use = {}
MP_Use.default = 0
def mp_use
return MP_Use[@id]
end
end
class Game_Battler
alias_method :seph_weaponsusemp_gmbtlr_madv, :make_attack_damage_value
def make_attack_damage_value(attacker)
make_attack_damage_value(attacker)
if attacker.is_a?(Game_Actor)
for weapon in attacker.weapons
attacker.mp -= weapon.mp_use
end
end
end
end
# Weapons Use MP (VX)
# By SephirothSpawn
class RPG::Weapon
# weapon_id => mp_cost
MP_Use = {1 => 5, 2 => 10}
MP_Use.default = 0
def mp_use
return MP_Use[@id]
end
end
class Game_Battler
alias_method :seph_weaponsusemp_gmbtlr_madv, :make_attack_damage_value
def make_attack_damage_value(attacker)
make_attack_damage_value(attacker)
if attacker.is_a?(Game_Actor)
for weapon in attacker.weapons
attacker.mp -= weapon.mp_use
end
end
end
end
SephirothSpawn":3ei5foql said:Thanks for clarifying that for me jbrist. I was on my way to work and didn't have time to clarify.
Luckily, if you have used one of my scripts, I use the same technique in all of them, so you learn to do this pretty quick.
Mr_Smith":1kecb9rb said:And something you guys didnt say either, under that is the default MP cost, so if the weapon is not clarified in the thingy above it, it takes the MP cost from the default.