Skip to content

Item update#157

Open
UnDeviato wants to merge 14 commits into
Crystalwarrior:masterfrom
UnDeviato:item-update
Open

Item update#157
UnDeviato wants to merge 14 commits into
Crystalwarrior:masterfrom
UnDeviato:item-update

Conversation

@UnDeviato
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Owner

@Crystalwarrior Crystalwarrior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like in its current form the items can only fulfill 1 specific narrow purpose and nothing else. This design is super rigid and would also be annoying to overhaul long-term.
Let's start splitting things up into a more flexible design and start using classes

Comment thread server/client_manager.py
self.current_client = client
self.guild = None
self.moves = [ClientManager.Move(move) for move in fighter["Moves"]]
self.bag = []
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think inventory is more descriptive

Comment thread server/commands/battle.py
client.send_ooc("Item not found in your bag")
return
item = client.area.battle_items[arg]
if item["stat"] == "hp":
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can an item can only modify a single stat?

What about items that trade your HP for Mana? Increase attack but reduce defense?

Comment thread server/commands/battle.py
Comment on lines +896 to +900
client.area.battle_items[f"{args[0]}"] = {}
client.area.battle_items[f"{args[0]}"]["stat"] = args[1].lower()
client.area.battle_items[f"{args[0]}"]["operation"] = args[2][0]
client.area.battle_items[f"{args[0]}"]["number"] = num
client.send_ooc(f"{args[0]} has been created!")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nightmare, please start using classes

Comment thread server/commands/battle.py
effect="statup",
)
client.battle.bag.remove(arg)
send_stats_fighter(client)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way to set for how long is a stat modified? Status effect system also seems to be hard-coded to moves only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants