#include "villager.h"
#include "demon.h"
#include "weapons.h"
#include <complex.h>
#include <stdio.h>

char *cat(enum demon_category demon_category){
    
    if (demon_category == 1) return "Parasite";
    else if (demon_category == 2) return "Threat";
    else if (demon_category == 3) return "Nightmare";
    else if (demon_category == 4) return "Calamity";
    else if (demon_category == 5) return "Tom Nook";
    return NULL;
}

char *dist(enum distance distance){
    if (distance == 0) return "Close";
    else if (distance == 1) return "Near";
    else return "Far";

}


void pp_villager(struct villager* villager){

    if (villager == NULL) return;
    
    printf("============================= Villager info =============================\n");
    printf("Name: %s\n",villager->name);
    printf("HP: %i/%i\n", villager->cur_HP,villager->HP_max);
    printf("Gun: %s | Magazine: %i/%i | Mastery: %i\n", villager->gun->name, villager->gun->current_magazine, villager->gun->magazine_size, villager->gun_mastery);
    printf("Medicine: %i/10\n",villager->medicines);
  
    /*
    if (villager->distance == 1) printf("Distance: NEAR\n");
    else if (villager->distance == 0) printf("Ditance: CLOSE\n");
    else printf("Distance: FAR\n");
    */
    printf("Distance: %s\n",dist(villager->distance));
}

void pp_demon(struct demon* demon){

    if(demon == NULL) return;

    printf("============================= Demon info =============================\n");
    printf("Name: %s | Category: %s\n", demon->name, cat(demon->category));
    printf("Base damage: %i | Range: %s\n", demon->damage, dist(demon->range));
    printf("HP: %i/%i\n", demon->cur_HP, demon->HP_max);
}
