summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-01-10 21:08:22 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-01-10 21:08:22 +0100
commitd98cf9e97a61b175649fa9fe656cb8ec2874686c (patch)
treee0562dd314123c713ae8127964529960e31b8bcc
parent4a0235f95dac85068cf3654ef95832608b3cdc49 (diff)
added esuna
for now on, the cast only cures poison Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
-rw-r--r--actions.c11
-rw-r--r--actions.h10
-rw-r--r--priv_entries.h10
3 files changed, 29 insertions, 2 deletions
diff --git a/actions.c b/actions.c
index 9f02ef2..5ab45b4 100644
--- a/actions.c
+++ b/actions.c
@@ -203,3 +203,14 @@ void cyanure(SURFACES *surfaces, POSITIONS *positions, struct character_t *src,
damage_target_hp(surfaces, positions, target, target->max_hp / 4);
target->poisoned = true;
}
+
+void esuna(SURFACES *surfaces, POSITIONS *positions, struct character_t *src, struct target_t *dest, void *data)
+{
+ (void) surfaces;
+ (void) positions;
+ (void) src;
+ (void) data;
+
+ /* TODO cure every state and not only poison */
+ dest->chr->poisoned = false;
+}
diff --git a/actions.h b/actions.h
index 77d9781..e51edc7 100644
--- a/actions.h
+++ b/actions.h
@@ -6,11 +6,19 @@
#include "target.h"
void attack(SURFACES *, POSITIONS *, struct character_t *src, struct target_t *dst, void *data);
+
+/* black magic */
void cast_element(SURFACES *, POSITIONS *, struct character_t *src, struct target_t *dst, void *data);
+void cyanure(SURFACES *, POSITIONS *, struct character_t *src, struct target_t *dst, void *data);
+
+/* white magic */
void cast_cure(SURFACES *, POSITIONS *, struct character_t *src, struct target_t *dst, void *data);
+void esuna(SURFACES *, POSITIONS *, struct character_t *src, struct target_t *dst, void *data);
+
+/* use */
void use_potion(SURFACES *, POSITIONS *, struct character_t *src, struct target_t *dst, void *data);
void use_ether(SURFACES *, POSITIONS *, struct character_t *src, struct target_t *dst, void *data);
+
void defend(SURFACES *, POSITIONS *, struct character_t *src, struct target_t *dst, void *data);
-void cyanure(SURFACES *, POSITIONS *, struct character_t *src, struct target_t *dst, void *data);
#endif /* ACTIONS_H */
diff --git a/priv_entries.h b/priv_entries.h
index 6c3c798..db76406 100644
--- a/priv_entries.h
+++ b/priv_entries.h
@@ -22,7 +22,15 @@ struct entry_t white_magic_entries[] = {
.f = cast_cure,
.data = NULL,
.target = TARGET_SINGLE | TARGET_TEAM,
- }
+ },
+ }, {
+ .name = "Esuna",
+ .children_cnt = 0,
+ .action = {
+ .f = esuna,
+ .data = NULL,
+ .target = TARGET_SINGLE,
+ },
},
};