package com.bernard.greposimu.model.game.powers;

import java.util.EnumSet;
import java.util.Map;

import com.bernard.greposimu.model.game.Identified;

public class Power implements Identified {

	
	String id;
	String name;
	String description;
	String shortEffect;
	String effect;
	
	
	/**
	 * The target it applies to
	 */
	EnumSet<Target> targets;
	
	/**
	 * The targets it is seeded to. For example, attack boost is targeted to towns, and is seeded to commands.
	 */
	EnumSet<Target> seedsTo;
	  

	// EFFECTS
	Group powerGroup;
	boolean negative;
	int powerGroupLevel;
	EnumSet<Effect> effects;
	boolean ignores_democritus;
	EnumSet<AreaOfEffect> areaOfEffect;
	
	
	// images -> IGNORE
	EnumSet<Tag> tags;
	int lifetime;
	  
	  
	Map<String,Object> metaDefaults;
	  
	  
	  
	  
	  
	public static enum Tag {
		EXTENDIBLE,
		DISPLAY_AMOUNT,
		DESTRUCTIVE,
		CAPPED,
		FAKE_POWER,
		ONETIME_POWER,
		RITUAL,
		UPGRADABLE,
		VALID_FOR_HAPPENINGS,
		TRANSFER_TO_CASUAL_WORLD,
		WASTEABLE,
		NEEDS_LEVEL,
		PASSIVE,
		RECREATE_ON_RESTART,
		REMOVED_ON_TARGET_LOSS,
		REQUIRES_GOD,
		NO_LIFETIME;
	}
	  
	public static enum AreaOfEffect {
		BUILDTIME,COMMANDS,FAVOR,MILITIA,RESOURCES;
	}
	  
	public static enum Effect {
		GROUND,NAVAL,WALL;
	}
	
	public static enum Group {
		ATTACK_BOOST,ATTACK_SHIP_ATTACK_BOOST,BATTLE_POINT_BOOST,BUILDING_BOOST,DEFENSE_BOOST,FAVOR_BOOST,RESOURCE_BOOST,UNIT_BOOST;
	}
	public static enum Target {
		ALLIANCE,COMMAND,PLAYER,SUPPORT_COMMAND,TOWN;
	}
	
	
	
	public Power(String id, String name, String description, String shortEffect, String effect, EnumSet<Target> targets,
			EnumSet<Target> seedsTo, Group powerGroup, boolean negative, int powerGroupLevel, EnumSet<Effect> effects,
			boolean ignores_democritus, EnumSet<AreaOfEffect> areaOfEffect, EnumSet<Tag> tags, int lifetime,
			Map<String, Object> metaDefaults) {
		this.id = id;
		this.name = name;
		this.description = description;
		this.shortEffect = shortEffect;
		this.effect = effect;
		this.targets = targets;
		this.seedsTo = seedsTo;
		this.powerGroup = powerGroup;
		this.negative = negative;
		this.powerGroupLevel = powerGroupLevel;
		this.effects = effects;
		this.ignores_democritus = ignores_democritus;
		this.areaOfEffect = areaOfEffect;
		this.tags = tags;
		this.lifetime = lifetime;
		this.metaDefaults = metaDefaults;
	}
	@Override
	public String getId() {
		return id;
	}
	public String getName() {
		return name;
	}
	public String getDescription() {
		return description;
	}
	public String getShortEffect() {
		return shortEffect;
	}
	public String getEffect() {
		return effect;
	}
	public EnumSet<Target> getTargets() {
		return targets;
	}
	public EnumSet<Target> getSeedsTo() {
		return seedsTo;
	}
	public Group getPowerGroup() {
		return powerGroup;
	}
	public boolean isNegative() {
		return negative;
	}
	public int getPowerGroupLevel() {
		return powerGroupLevel;
	}
	public EnumSet<Effect> getEffects() {
		return effects;
	}
	public boolean isIgnores_democritus() {
		return ignores_democritus;
	}
	public EnumSet<AreaOfEffect> getAreaOfEffect() {
		return areaOfEffect;
	}
	public EnumSet<Tag> getTags() {
		return tags;
	}
	public int getLifetime() {
		return lifetime;
	}
	public Map<String, Object> getMetaDefaults() {
		return metaDefaults;
	}
	
	
}
