zedcoeur
Zed Coeur
- 29
- Posts
- 5
- Years
- Seen Apr 15, 2022
So I'm working on making a whole concept where the player and other trainers have mono/dual-types within them, much like Pokemon do, and I want to have there be like a connection between the trainer and pokemon and allow them to do certain things, like a close bond if you will.
My current struggle stands at giving the player said Pokemon types. Currently, I have two attr accessors for type1 and type2 in the PokeBattle_Trainer class, and I've defined them in the initialize method. I've also written small methods to allow the types of the trainers to be altered in events based on what's in the parentheses (i.e. pbChangePrimaryType(:FIRE)). I'm sure there are other aspects within these scripts that I'm missing, but I currently don't know what.
Here is the script I've written:
My current struggle stands at giving the player said Pokemon types. Currently, I have two attr accessors for type1 and type2 in the PokeBattle_Trainer class, and I've defined them in the initialize method. I've also written small methods to allow the types of the trainers to be altered in events based on what's in the parentheses (i.e. pbChangePrimaryType(:FIRE)). I'm sure there are other aspects within these scripts that I'm missing, but I currently don't know what.
Here is the script I've written:
Code:
def pbSoulTypes
ret = [@soultype1]
ret.push(@soultype2) if @soultype2!=@soultype1
end
def pbChangePrimarySoulType(type)
@soultype1 = type
pbSoulTypes
end
def pbChangeSecondarySoulType(type)
@soultype2 = type
pbSoulTypes
end