- Joined
- Oct 17, 2012
- Messages
- 394
- Reaction score
- 98
- First Language
- Español
- Primarily Uses
- RMVXA
Hi. I'm trying to modify the substitute conditions in my project since some months ago and after trying some scripts (without success) I decided to check the default scripting to check where could I modify them. I found this part in Scene_Battle in 644 line
I'd like to modify the cover system adding those conditions
1) This character will cover allies who are under 20% of Max HP
2) This character will cover allies only from physical attacks
3) This character will have a chance to cover healthy allies, this chance will be (user's luck / 192) (That means the higher this character's luck, he'll have a bigger chance to cover healthy allies)
4) This character won't be able to cover allies if he has the states 20 and 21
5) This character won't be able to cover allies if him/herself is under 20% of Max HP
Does someone know how to modify this part of the script to create what I want to implement? Thank you
Code:
#--------------------------------------------------------------------------
# * Check Substitute Condition
#--------------------------------------------------------------------------
def check_substitute(target, item)
target.hp < target.mhp / 4 && (!item || !item.certain?)
end
1) This character will cover allies who are under 20% of Max HP
2) This character will cover allies only from physical attacks
3) This character will have a chance to cover healthy allies, this chance will be (user's luck / 192) (That means the higher this character's luck, he'll have a bigger chance to cover healthy allies)
4) This character won't be able to cover allies if he has the states 20 and 21
5) This character won't be able to cover allies if him/herself is under 20% of Max HP
Does someone know how to modify this part of the script to create what I want to implement? Thank you

