2022-05-03 00:40:09 +02:00
|
|
|
#pragma once
|
|
|
|
#include "define.h"
|
2022-05-16 23:57:25 +02:00
|
|
|
#include <stdint.h>
|
2022-05-03 00:40:09 +02:00
|
|
|
|
|
|
|
struct Type {
|
|
|
|
char* name;
|
|
|
|
const int id;
|
|
|
|
int buff[NB_TYPES+1];
|
|
|
|
int less[NB_TYPES+1];
|
|
|
|
int null[NB_TYPES+1];
|
2022-05-16 23:57:25 +02:00
|
|
|
const uint16_t color;
|
2022-05-03 00:40:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Types {
|
|
|
|
struct Type *type[NB_TYPES];
|
|
|
|
};
|
|
|
|
|
|
|
|
bool parseArray(int array[], char *nom);
|
|
|
|
float getTypeEffect(struct Type atk, struct Type def);
|
|
|
|
struct Type getTypeFromName(char* name);
|
|
|
|
struct Type getTypeFromId(int id);
|
|
|
|
void drawTypeEffects(struct Type type);
|