helapordo 1.4.12
Loading...
Searching...
No Matches
artifacts.c File Reference
#include "artifacts.h"
Include dependency graph for artifacts.c:

Functions

void artifact_thinkingskull (Fighter *f, Enemy *e, Boss *b, int isBoss)
 Takes a Fighter, Enemy and Boss pointers.
 
void artifact_twinkie (Fighter *f, Enemy *e, Boss *b, int isBoss)
 Takes a Fighter pointer and an Enemy pointer.
 
void artifact_wristband (Fighter *f, Enemy *e, Boss *b, int isBoss)
 Takes a Fighter pointer and an Enemy pointer.
 
void artifact_boartail (Fighter *f, Enemy *e, Boss *b, int isBoss)
 Takes a Fighter pointer and an Enemy pointer.
 
void artifact_chaosorb (Fighter *f, Enemy *e, Boss *b, int isBoss)
 Takes a Fighter pointer and an Enemy pointer.
 
void artifact_powersyphon (Fighter *f, Enemy *e, Boss *b, int isBoss)
 Takes a Fighter pointer and an Enemy pointer.
 
void artifact_giantfossile (Fighter *f, Enemy *e, Boss *b, int isBoss)
 Takes a Fighter pointer and an Enemy pointer.
 
void applyArtifacts (Fighter *f, Enemy *e, Boss *b, int isBoss)
 Takes a Fighter, a Enemy and a Boss pointer; plus an integer indicating if effects should be applied to enemy (==0) or boss (==1=.
 

Function Documentation

◆ applyArtifacts()

void applyArtifacts ( Fighter * f,
Enemy * e,
Boss * b,
int isBoss )

Takes a Fighter, a Enemy and a Boss pointer; plus an integer indicating if effects should be applied to enemy (==0) or boss (==1=.

Iterates over artifacts bag and calls the inner function pointer if an artifact has positive qty and its active member is false.

See also
Artifact
Parameters
fA Fighter pointer.
eAn Enemy pointer.
bThe Boss pointer.
isBossThe integer defining who is receiving the effect.

◆ artifact_boartail()

void artifact_boartail ( Fighter * f,
Enemy * e,
Boss * b,
int isBoss )

Takes a Fighter pointer and an Enemy pointer.

If the active value inside the Artifact at BOARTAIL index of artifactsBag array is false, and the class value of enemy pointer is Boar, enemy's vel value is multiplied by 2/3. Then the artifact is set as active.

See also
Fighter
Enemy
Artifact
artifactClass
Parameters
fThe fighter involved in the artifact action.
eThe enemy involved in the artifact action.
bThe boss involved in the artifact action.
isBossInteger describing if effect applies to enemy or boss.

◆ artifact_chaosorb()

void artifact_chaosorb ( Fighter * f,
Enemy * e,
Boss * b,
int isBoss )

Takes a Fighter pointer and an Enemy pointer.

If the active value inside the Artifact at CHAOSORB index of artifactsBag array is false, all the and the level values for the baseenemystats array increase by 2. If the artifact is already active, the same action as before occurs but the increase is by 3 and only if we hit 0 on a 20 roll. Then the artifact is set as active.

See also
Fighter
Enemy
Artifact
artifactClass
Parameters
fThe fighter involved in the artifact action.
eThe enemy involved in the artifact action.
bThe boss involved in the artifact action.
isBossInteger describing if effect applies to enemy or boss.

◆ artifact_giantfossile()

void artifact_giantfossile ( Fighter * f,
Enemy * e,
Boss * b,
int isBoss )

Takes a Fighter pointer and an Enemy pointer.

If the active value inside the Artifact at GIANTFOSSILE index of artifactsBag array is false, and the class value of enemy pointer is Troll, the enemy hp value is either decreased by 10 if it's at least 11 or set to 1 otherwise. Then the artifact is set as active.

See also
Fighter
Enemy
Artifact
artifactClass
Parameters
fThe fighter involved in the artifact action.
eThe enemy involved in the artifact action.
bThe boss involved in the artifact action.
isBossInteger describing if effect applies to enemy or boss.

◆ artifact_powersyphon()

void artifact_powersyphon ( Fighter * f,
Enemy * e,
Boss * b,
int isBoss )

Takes a Fighter pointer and an Enemy pointer.

If the active value inside the Artifact at POWERSYPHON index of artifactsBag array is false, fighter energy value increases by 1. Then the artifact is set as active.

See also
Fighter
Enemy
Artifact
artifactClass
Parameters
fThe fighter involved in the artifact action.
eThe enemy involved in the artifact action.
bThe boss involved in the artifact action.
isBossInteger describing if effect applies to enemy or boss.

◆ artifact_thinkingskull()

void artifact_thinkingskull ( Fighter * f,
Enemy * e,
Boss * b,
int isBoss )

Takes a Fighter, Enemy and Boss pointers.

Uses the Enemy pointer if isBoss is 0; If the active value inside the Artifact at THKSKULL index of artifactsBag array is false, fighter's permboost_def value increases by 4. Then the artifact is set as active.

See also
Fighter
Enemy
Artifact
artifactClass
Parameters
fThe fighter involved in the artifact action.
eThe enemy involved in the artifact action.
bThe boss involved in the artifact action.
isBossInteger describing if effect applies to enemy or boss.

◆ artifact_twinkie()

void artifact_twinkie ( Fighter * f,
Enemy * e,
Boss * b,
int isBoss )

Takes a Fighter pointer and an Enemy pointer.

If the active value inside the Artifact at TWINKIE index of artifactsBag array is false, and the class value of enemy pointer is Zombie, enemy's xp value is doubled and then increased by its level value. Then the artifact is set as active.

See also
Fighter
Enemy
Artifact
artifactClass
Parameters
fThe fighter involved in the artifact action.
eThe enemy involved in the artifact action.
bThe boss involved in the artifact action.
isBossInteger describing if effect applies to enemy or boss.

◆ artifact_wristband()

void artifact_wristband ( Fighter * f,
Enemy * e,
Boss * b,
int isBoss )

Takes a Fighter pointer and an Enemy pointer.

If the active value inside the Artifact at WRISTBAND index of artifactsBag array is false, fighter's permboost_enr value increases by 2. Then the artifact is set as active.

See also
Fighter
Enemy
Artifact
artifactClass
Parameters
fThe fighter involved in the artifact action.
eThe enemy involved in the artifact action.
bThe boss involved in the artifact action.
isBossInteger describing if effect applies to enemy or boss.