package uulm.teamname.marvelous.gamelibrary.config; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.Objects; @JsonPropertyOrder({"characterID", "name", "HP", "MP", "AP", "meleeDamage", "rangeCombatDamage", "rangeCombatReach"}) /** * Represents properties of a character in the {@link CharacterConfig}. */ public class CharacterProperties { public int characterID; public String name; public int HP; public int MP; public int AP; public int meleeDamage; @JsonProperty("rangeCombatDamage") public int rangedDamage; @JsonProperty("rangeCombatReach") public int attackRange; @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CharacterProperties that = (CharacterProperties) o; return characterID == that.characterID && HP == that.HP && MP == that.MP && AP == that.AP && meleeDamage == that.meleeDamage && rangedDamage == that.rangedDamage && attackRange == that.attackRange && Objects.equals(name, that.name); } @Override public int hashCode() { return Objects.hash(characterID, name, HP, MP, AP, meleeDamage, rangedDamage, attackRange); } @Override public String toString() { return "CharacterProperties{" + "characterID=" + characterID + ", name='" + name + '\'' + ", HP=" + HP + ", MP=" + MP + ", AP=" + AP + ", meleeDamage=" + meleeDamage + ", rangedDamage=" + rangedDamage + ", attackRange=" + attackRange + '}'; } }