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
f53fbae8
There was a problem fetching the pipeline summary.
Commit
f53fbae8
authored
8 years ago
by
Lénaïg Le Moigne
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
ssh://gitlab.insa-rennes.fr:16022/tacticalrpg/lemeilleurjeudumonde
parents
9169eaa4
00a31f12
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/personnage.c
+61
-0
61 additions, 0 deletions
src/personnage.c
src/personnage.h
+7
-0
7 additions, 0 deletions
src/personnage.h
with
68 additions
and
0 deletions
src/personnage.c
+
61
−
0
View file @
f53fbae8
...
...
@@ -214,6 +214,67 @@ void setPD(Personnage * p, int n){
}
}
/*!
* \fn void retraitMana(Personnage * p, int n)
* \brief La fonction retire n mana au Personnage en parrametre.
* Remarque : Pour ajouter, il suffit de choisir n ngatif.
*
* \param Un pointeur vers un personnage, n le mana retirer.
*/
void
retraitMana
(
Personnage
*
p
,
int
n
){
setMana
(
p
,
get_mana
(
p
)
-
n
);
}
/*!
* \fn void retraitPV(Personnage * p, int n)
* \brief La fonction retire n PV au Personnage en parrametre.
* Remarque : Pour ajouter, il suffit de choisir n ngatif.
*
* \param Un pointeur vers un personnage, n les PV retirer.
*/
void
retraitPV
(
Personnage
*
p
,
int
n
){
setPV
(
p
,
get_PV
(
p
)
-
n
);
}
/*!
* \fn void retraitPD(Personnage * p, int n)
* \brief La fonction retire n PD au Personnage en parrametre.
* Remarque : Pour ajouter, il suffit de choisir n ngatif.
*
* \param Un pointeur vers un personnage, n les PD retirer.
*/
void
retraitPD
(
Personnage
*
p
,
int
n
){
setPD
(
p
,
get_PD
(
p
)
-
n
);
}
/*!
* \fn int personnageKO(Personnage * p)
* \brief La fonction teste si le Personnage est KO (s'il n'a plus de PV)
*
* \param Un pointeur vers un personnage.
* \return 1 si le Personnage est KO, 0 sinon.
*/
int
personnageKO
(
Personnage
*
p
){
if
(
p
->
PV
==
0
){
return
1
;
}
return
0
;
}
/*!
* \fn int manaSuffisant(Personnage * p, int mana)
* \brief La fonction teste si le personnage a un mana superieur ou egal au mana en parrametre.
*
* \param Un pointeur vers un personnage, un entier reprsentant la quantit de mana.?
* \return 1 si le Personnage a un mana suprieur ou gal au parrametre mana, 0 sinon.
*/
int
manaSuffisant
(
Personnage
*
p
,
int
mana
){
if
(
mana
>=
get_mana
(
p
)){
return
1
;
}
return
0
;
}
/* Cette fonction ne fonctionne plus, il faut une fonction qui accede aux effets.
boolean est_paralyse(Personnage *p){
return p->paralyse;
...
...
This diff is collapsed.
Click to expand it.
src/personnage.h
+
7
−
0
View file @
f53fbae8
...
...
@@ -32,6 +32,13 @@ void setPV(Personnage * p, int n);
void
setMana
(
Personnage
*
p
,
int
n
);
void
setPD
(
Personnage
*
p
,
int
n
);
void
retraitMana
(
Personnage
*
p
,
int
n
);
void
retraitPV
(
Personnage
*
p
,
int
n
);
void
retraitPD
(
Personnage
*
p
,
int
n
);
int
personnageKO
(
Personnage
*
p
);
int
manaSuffisant
(
Personnage
*
p
,
int
mana
);
Classe
*
getClasse
(
Personnage
*
p
);
char
*
getNomPersonnage
(
Personnage
*
p
);
...
...
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