All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.daxie.xops.character.CharacterData Maven / Gradle / Ivy

package com.daxie.xops.character;

import java.util.HashMap;
import java.util.Map;

public class CharacterData {
	private CharacterModelType model_type;
	private CharacterTextureType texture_type;
	private int hp;
	private CharacterAILevel ai_level;
	private Map weapon_ids_map;
	private CharacterType type;
	
	public CharacterData() {
		model_type=CharacterModelType.MALE;
		texture_type=CharacterTextureType.SOLDIER_BLACK;
		hp=100;
		ai_level=CharacterAILevel.D;
		
		weapon_ids_map=new HashMap<>();
		weapon_ids_map.put(0, 0);
		weapon_ids_map.put(1, 0);
		
		type=CharacterType.HUMAN;
	}
	public CharacterData(CharacterData c) {
		model_type=c.GetModelType();
		texture_type=c.GetTextureType();
		hp=c.GetHP();
		ai_level=c.GetAILevel();
		weapon_ids_map=c.GetWeaponIDsMap();
		type=c.GetType();
	}
	
	@Override
	public String toString() {
		String ret="";
		String separator=System.getProperty("line.separator");
		
		ret+="model_type:";
		ret+=model_type.toString().toLowerCase();
		ret+=separator;
		
		ret+="texture_type:";
		ret+=texture_type.toString().toLowerCase();
		ret+=separator;
		
		ret+="hp:"+hp+separator;
		
		ret+="ai_level:";
		ret+=ai_level.toString().toLowerCase();
		ret+=separator;
		
		ret+="weapon_ids:"+separator;
		for(int i=0;i GetWeaponIDsMap() {
		return new HashMap<>(weapon_ids_map);
	}
	public CharacterType GetType() {
		return type;
	}
	
	public boolean WeaponIDExists(int index) {
		return weapon_ids_map.containsKey(index);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy