Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lemeilleurjeudumonde
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tacticalrpg
lemeilleurjeudumonde
Commits
d73aaf1a
There was a problem fetching the pipeline summary.
Commit
d73aaf1a
authored
8 years ago
by
Romain Jegat
Browse files
Options
Downloads
Patches
Plain Diff
avancement sur les fonctions d'attaques
parent
d733b3ff
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/attaques.c
+27
-2
27 additions, 2 deletions
src/attaques.c
src/structures.h
+3
-1
3 additions, 1 deletion
src/structures.h
with
30 additions
and
3 deletions
src/attaques.c
+
27
−
2
View file @
d73aaf1a
...
...
@@ -32,7 +32,13 @@ int attaquer(Personnage *attaquant, Attaque *attaque_select, Personnage *cible)
*/
int
ajouter_effet_perso
(
Effet
*
effet_select
,
Personnage
*
cible
)
{
int
numero_effet
=
0
;
while
((
cible
->
effets
[
numero_effet
].
utilise
)
!=
0
)
{
numero_effet
++
;
}
effet_select
->
utilise
=
1
;
cible
->
effets
[
numero_effet
]
=
*
effet_select
;
return
0
;
}
...
...
@@ -47,8 +53,27 @@ int ajouter_effet_perso(Effet *effet_select, Personnage *cible)
*/
int
appliquer_effet
(
Effet
*
effet_select
,
Personnage
*
cible
)
{
(
cible
->
PV
)
-=
(
effet_select
->
valeur_degats
);
if
((
effet_select
->
nb_tours
)
!=
0
)
{
(
cible
->
PV
)
-=
(
effet_select
->
valeur_degats_duree
);
(
cible
->
PV
)
+=
(
effet_select
->
valeur_soin_duree
);
(
cible
->
gele
)
=
(
effet_select
->
paralysie
);
}
/* A terminer */
return
0
;
}
int
declencher_effets_tour
(
Personnage
*
liste_perso
)
{
int
num_perso
=
0
;
/* */
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
src/structures.h
+
3
−
1
View file @
d73aaf1a
...
...
@@ -142,6 +142,7 @@ typedef Case Carte[TAILLE_MAX_CARTE];
typedef
struct
Effet
{
char
id
[
TAILLE_ID
];
/*!< ID de l'effet de taille TAILLE_ID*/
char
nom
[
TAILLE_NOMS
];
/*!< Nom de l'effet de taille TAILLE_NOMS*/
unsigned
int
utilise
;
unsigned
int
nb_tours
;
/*!< Le nombre de tours restant avant que l'effet ne s'estompe*/
unsigned
int
valeur_degats
;
/*!< Le nombre de degats subis */
unsigned
int
valeur_soin
;
/*!< Le nombre PV regeneres */
...
...
@@ -186,7 +187,8 @@ typedef struct Personnage{
unsigned
short
int
PV
;
/*!< Les PV actuels du personnage*/
unsigned
short
int
mana
;
/*!< Le mana actuel du personnage*/
Case
*
position
;
/*!< La case representant la position actuelle du personnage*/
Effet
effets
[];
/*!< Un tableau d'effets representant les effets affectant le personnage*/
Effet
effets
[
10
];
/*!< Un tableau d'effets representant les effets affectant le personnage*/
int
gele
;
}
Personnage
;
/*! \struct Competence structures.h
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment