Skip to content

Conversation

@lkno0705
Copy link
Contributor

No description provided.

@lkno0705 lkno0705 requested a review from BigKahuna7385 May 27, 2021 20:45
Copy link
Contributor

@BigKahuna7385 BigKahuna7385 left a comment

Choose a reason for hiding this comment

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

With the current system you implemented, it seems like, an item can only boost one Item.
Is there a difference for Itemboost while in use and temporary itemboost? (like a potion which only boosts strength unit the end of battle or a limited number of rounds)

int hitPoints = ceStats.getCurrentHitPoints();
hitPoints += this.value;
ceStats.setCurrentHitPoints(hitPoints);
if (debug) System.out.println("[CeItemEffects] healing by " + this.value + " points");
Copy link
Contributor

Choose a reason for hiding this comment

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

you could create a method, "addToStat" in which you say to which stat you want to add (perhaps with ENUM) and how much you want to add.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's neccessary, because it doens't change the problem. For every stat that has to change, you have to call different methods. So if i add another Method this will result in a switch case which has another switch case in it. So you just duplicate the whole thing and you have it twice. IMO it makes it even worse.

@BigKahuna7385
Copy link
Contributor

Look at the Codacy stuff, they are not that critical but some are definitely relevant. :-D

@lkno0705
Copy link
Contributor Author

TODO:

  • set equipped to null if incoming item is null
  • useItem should call every item use method
  • create seperate classes for every major item type:
    • Consumable
    • Wearable
    • Cages
    • These should inherit a basic item class
  • Save baseStats in CeStats and reset baseStats with wearable boni at the end of battle, except for currenthitpoints
  • Healing is limited to maxHP

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.

3 participants