- 55
- Posts
- 11
- Years
- Seen Jul 8, 2023
I've been trying to add new abilities similar to plus and minus. The ability true sword is supposed to increase the attack stats if their partner has the ability true shield. This ability is working as intended. However, the other ability, true shield, which is supposed to increase defenses if their partner has the ability true sword, is not working and just causes an error to pop up.
Code:
if attacker.hasWorkingAbility(:TRUESWORD) #True Sword
partner=attacker.pbPartner
if partner.hasWorkingAbility(:TRUESHIELD)
atkmult=(atkmult*1.5).round
end
end
if opponent.hasWorkingAbility(:TRUESHIELD) #True Shield
if opponent.pbPartner.hasWorkingAbility(:TRUESWORD)
defense=(defense*1.5).round
end
end
Any help would be appreciated, thanks!
Code:
if attacker.hasWorkingAbility(:TRUESWORD) #True Sword
partner=attacker.pbPartner
if partner.hasWorkingAbility(:TRUESHIELD)
atkmult=(atkmult*1.5).round
end
end
if opponent.hasWorkingAbility(:TRUESHIELD) #True Shield
if opponent.pbPartner.hasWorkingAbility(:TRUESWORD)
defense=(defense*1.5).round
end
end
Any help would be appreciated, thanks!
Last edited: