Skip to Main Content
Game Magic
book

Game Magic

by Jeff Howard
April 2014
Intermediate to advanced content levelIntermediate to advanced
376 pages
10h 41m
English
A K Peters/CRC Press
Content preview from Game Magic
From Exemplary Game Magic Systems to Code Recipes 51
sure that casting requirements are met. A player must have the ability
to cast spells, must have light, must not be confused, and must have a
spell book. If any of these re quirements is not met, the player receives an
error message and casting stops.
RECIPE 11: SPELL MISFIRE EFFECTS (HELLBAND, C)
/* Spell failure chance */
chance = spell_chance(spell,use_realm-1);
/* Failed spell */
if (rand_int(100) < chance)
{
if (flush_failure) flush();
msg _format("You failed to get the%s off!",
prayer);
if (o_ptr->tval = = TV_CHAOS_BOOK &&
(randint(100)<spell))
{
msg_print("You ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Game Art

Game Art

Matt Sainsbury
Game Design Theory

Game Design Theory

Keith Burgun

Publisher Resources

ISBN: 9781466567870