Mercurial > molko
comparison librpg/rpg/battle.h @ 229:e71039d820a7
doc: improve documentation
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 19 Nov 2020 16:46:26 +0100 |
parents | c0e0d4accae8 |
children | 86b71e1f9dd5 |
comparison
equal
deleted
inserted
replaced
228:2734223d3daf | 229:e71039d820a7 |
---|---|
209 * | 209 * |
210 * \pre bt != NULL | 210 * \pre bt != NULL |
211 * \pre source != NULL | 211 * \pre source != NULL |
212 * \pre target != NULL | 212 * \pre target != NULL |
213 * \param bt the battle object | 213 * \param bt the battle object |
214 * \param source | 214 * \param source the entity attacking |
215 * \param target the target entity | |
215 */ | 216 */ |
216 void | 217 void |
217 battle_attack(struct battle *bt, struct character *source, struct character *target); | 218 battle_attack(struct battle *bt, struct character *source, struct character *target); |
218 | 219 |
219 /** | 220 /** |
220 * Default function to cast a spell. | 221 * Default function to cast a spell. |
222 * | |
223 * Prefer to use this function to cast a spell because it performs some checks | |
224 * and hooks before casting the spell. | |
225 * | |
226 * \pre bt != NULL | |
227 * \pre source != NULL | |
228 * \pre spell != NULL | |
229 * \param bt the current battle | |
230 * \param source the entity casting a spell | |
231 * \param spell the spell used | |
232 * \param selection the selection | |
221 */ | 233 */ |
222 void | 234 void |
223 battle_cast(struct battle *bt, | 235 battle_cast(struct battle *bt, |
224 struct character *source, | 236 struct character *source, |
225 const struct spell *spell, | 237 const struct spell *spell, |
226 unsigned int selection); | 238 unsigned int selection); |
227 | 239 |
240 /** | |
241 * Spawn an indicator drawable to show damage. | |
242 * | |
243 * The drawable will draw the amount near the entity and fade away after | |
244 * several seconds. | |
245 * | |
246 * \pre bt != NULL | |
247 * \pre target != NULL | |
248 * \param bt the battle object | |
249 * \param target the target entity | |
250 * \param amount the amount of damage | |
251 */ | |
228 void | 252 void |
229 battle_indicator_hp(struct battle *bt, const struct character *target, unsigned int amount); | 253 battle_indicator_hp(struct battle *bt, const struct character *target, unsigned int amount); |
230 | 254 |
231 /** | 255 /** |
232 * Handle an event. | 256 * Handle an event. |