package Personajes;
import java.util.Random;
import Monstruos.*;

public class Ladron extends Personaje{

	    
    public Ladron (int hp, int pp, int atc, int def, int suerte, int agilidad,String mote){
		this.hp = hp;
    		this.hp_max = hp;
    		this.pp = pp;
    		this.pp_max = pp;
    		this.atc = atc;
    		this.def = def;
    		this.suerte = suerte;
    		this.agilidad = agilidad;
                this.tipo = 3;
                this.atc1 = 0;
                this.atc2 = 0;
    		this.mote = mote;
    		this.nivel=1;
    		this.exp = 0;
    		this.dinero = 0;
                this.posicion = 1;
                this.robo = false;
		}
    public Ladron(){
    }
    public int Atc1(Personaje pers, Monstruo rival){
            Random rand = new Random();
            if (pers.pp >= 5){
             pers.pp= pers.pp - 5;
             pers.result = 1;
             pers.dinero_rob = rand.nextInt(rival.dineroG+1);
             pers.dinero = pers.dinero + pers.dinero_rob;
             pers.robo = true;
            return (0);
            }
            else {
                pers.result = 0;
                return 0;
            }
        }
        public int Atc2(Personaje pers){
            Random rand = new Random();
            if (pers.pp >= 10){
            pp= pp - 10;
            int azar = rand.nextInt(suerte+1);
            pers.result = 1;
            double valor = atc+azar*1.15;
            int valor2 = (int)valor;
            return (valor2);
            }
            else {
                pers.result = 0;
                return 0;
            }
        }
    @Override
    public void AprenderAtac(Personaje pers){
            if (pers.nivel == 5){
                pers.atc1_nom = "Robar";
                pers.atc1_def = "Roba dinero.";
                pers.atc1 = 1;
                pers.aprender = true;
            }
            if (pers.nivel == 10){
                pers.atc2_nom = "Golpe Bajo";
                pers.atc2_def = "Ataque +15%";
                pers.atc2 = 1;
                pers.aprender = true;
            }
            }
    public void AsignarAtac(Personaje pers){
            if (pers.nivel == 5){
                pers.atc1_nom = "Robar";
                pers.atc1_def = "Roba dinero.";
                pers.atc1 = 1;
            }
            if (pers.nivel == 10){
                pers.atc2_nom = "Golpe Bajo";
                pers.atc2_def = "Ataque +15%";
                pers.atc2 = 1;
            }
            }
}
