Open nskins opened 7 years ago
@nskins I can take a look at this this weekend. My schedule is a bit wonky over these next few weeks, but I should be able to make some progress on this on the weekends and random weeknights when I'm free.
@rdavid1099 Great! I will try to help work on it. It will be nice to have two pairs of eyes looking at this one. I foresee some design choices that I'm not entirely sure about myself...
@nskins For sure... this seems like a really fun problem to tackle. Like I said, most of my free time will be on the weekends, but I will keep in contact. 😄
Update on this issue: I implemented much of the Party
class and rewrote many of the existing functions (switching Entity
/Player
-> Party
). One of the remaining issues is that some commands on the world map must accept a particular member of the Party
. For example, in the following command:
$ use apple
becomes
$ nick use apple
since the party member must be specified. The equip
and unequip
commands must be altered similarly. Also, status
might optionally accept a party member. Without a party member, perhaps it would display all party member statuses.
The other issue is that the battle system must be rewritten to account for multiple Entities in battle. Various changes are necessary.
At the very end, we can delete all of the functions that are in Entity
and Player
that have been migrated over to Party
. I've left them in right now to prevent everything from breaking in this strange middle stage.
Hi @rdavid1099, I want to let you know that all that remains is implementing #Party.battle
and removing the Entity
& Player
functions that are no longer needed. Unfortunately, I'm unsure how to write #battle
. There needs to be a way to choose the order of attacks (similarly to the current way) along with other issues. I invite you to work on this if you have any ideas, but I'm a bit lost myself right now!
We should write a class called
Party
that can hold a variable number ofEntity
members. This would make it so that one can control multiplePlayers
on the world map and in battle. Additionally, we can then fight multipleMonsters
on the world map.Many of the functions from the
Player
class will likely be moved over toParty
(such as#battle
). We will need to make it so that#save_game
and#load_game
save theParty
instead of thePlayer
. One invariant might be that noEntity
can have the same name as another within aParty
(fixes ambiguity issue). I will update this issue as I think of any additional needed changes.Pull requests can be sent to the
party
branch.