summaryrefslogtreecommitdiff
path: root/magies.c
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-01-07 23:38:45 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-01-07 23:56:39 +0100
commita24acb373d67048daa7e68e72418a5d6ef5841dd (patch)
treed736bccb65609fb42cbe9181c83ef4616ebd382e /magies.c
parentf05eaa46329faf7c9c1bcd061f091a69289ba459 (diff)
added the current user to the team structure
the current character is generated randomly at the initialization of the team. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'magies.c')
-rw-r--r--magies.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/magies.c b/magies.c
index 72de556..ae358e5 100644
--- a/magies.c
+++ b/magies.c
@@ -5,7 +5,7 @@
#include "constantes.h"
#include "prototypes.h"
-enum action_state_t Fmagieelement (SURFACES *surfaces,POSITIONS *positions, struct team_t *ally, int Vtourallie,ENNEMIS ennemis[],int Vnbennemis, int element)
+enum action_state_t Fmagieelement (SURFACES *surfaces,POSITIONS *positions, struct team_t *ally, ENNEMIS ennemis[],int Vnbennemis, int element)
{
enum action_state_t ret = ACTION_CANCELED;
int max;
@@ -46,7 +46,7 @@ enum action_state_t Fmagieelement (SURFACES *surfaces,POSITIONS *positions, stru
case SDLK_RETURN:
case SDLK_f:
continuer=0;
- max=Fcalculerdegats(ally, Vtourallie,&min,ennemis,selection,clan,TYPE_MAGIE);
+ max=Fcalculerdegats(ally, &min,ennemis,selection,clan,TYPE_MAGIE);
degats=(rand()%(max-min+1))+min;
if(degats<0)
degats=0;
@@ -124,7 +124,7 @@ enum action_state_t Fmagieelement (SURFACES *surfaces,POSITIONS *positions, stru
return ret;
}
-enum action_state_t Fmagiesoin(SURFACES *surfaces,POSITIONS *positions, struct team_t *ally, int Vtourallie,ENNEMIS ennemis[],int Vnbennemis)
+enum action_state_t Fmagiesoin(SURFACES *surfaces,POSITIONS *positions, struct team_t *ally, ENNEMIS ennemis[],int Vnbennemis)
{
enum action_state_t ret = ACTION_CANCELED;
unsigned int continuer=1;
@@ -163,7 +163,7 @@ enum action_state_t Fmagiesoin(SURFACES *surfaces,POSITIONS *positions, struct t
SELECTION_CIBLE()
case SDLK_RETURN:
case SDLK_f:
- max=Fcalculersoins(ally, Vtourallie,&min,ennemis,selection);
+ max=Fcalculersoins(ally, &min,ennemis,selection);
soins=(rand()%(max-min+1))+min;
if(soins<0)
soins=0;
@@ -228,7 +228,7 @@ enum action_state_t Fmagiesoin(SURFACES *surfaces,POSITIONS *positions, struct t
return ret;
}
-int Fcalculersoins(struct team_t *ally, int Vtourallie,int *min,ENNEMIS ennemis[],int selection)
+int Fcalculersoins(struct team_t *ally, int *min,ENNEMIS ennemis[],int selection)
{
unsigned int soins;
int max;
@@ -238,7 +238,7 @@ int Fcalculersoins(struct team_t *ally, int Vtourallie,int *min,ENNEMIS ennemis[
(void) ennemis;
(void) selection;
- soins=ally->chrs[Vtourallie].magic*20;
+ soins=ally->chrs[ally->chr_cur].magic*20;
taux=soins/4;
max=soins+taux;
*min=soins-taux;