Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
player_skills.c File Reference

Implements player special abilities and skills. More...

#include <player.h>
#include <time_system.h>
#include <timer.h>
#include <sound.h>
#include <camera.h>
#include <random.h>
#include <gun.h>
#include <bullet.h>
#include <enemy_types.h>
#include <input.h>
#include <stdlib.h>
#include <circle.h>
#include <math.h>

Functions

int Player_Dash ()
 [Utility] Initiates player dash movement if conditions are met
 
int Player_HandleDash ()
 [Utility] Processes player dash state and effects
 
bool LastStand ()
 
int overPressured ()
 
void scavenger ()
 
void hemocycle ()
 
void armoredUp ()
 
bool kineticArmor ()
 
bool ghostLoad ()
 
void Skill_Update ()
 
int Player_CrashOut ()
 [Utility] Activates the Crashout skill, sacrificing health for damage
 
int Player_HandleCrashOut ()
 [Update] Handles the Crashout skill state and effects
 
int Parry ()
 
int Handle_ParryRender ()
 
int Handle_Parry ()
 

Detailed Description

Implements player special abilities and skills.

Handles the activation, cooldown and effects of player skills such as dashing, special attacks, and other abilities.

Author
Mango
Date
2025-03-05

Function Documentation

◆ armoredUp()

void armoredUp ( )

◆ ghostLoad()

bool ghostLoad ( )

◆ Handle_Parry()

int Handle_Parry ( )

◆ Handle_ParryRender()

int Handle_ParryRender ( )

◆ hemocycle()

void hemocycle ( )

◆ kineticArmor()

bool kineticArmor ( )

◆ LastStand()

bool LastStand ( )

◆ overPressured()

int overPressured ( )

◆ Parry()

int Parry ( )

◆ Player_CrashOut()

int Player_CrashOut ( )

[Utility] Activates the Crashout skill, sacrificing health for damage

Activates crashout ability.

Takes 25% of the player's current health and gives a 2x damage multiplier for 15 seconds. Has a cooldown before it can be used again.

Returns
int Status code (0 for success, 1 for on cooldown)

◆ Player_Dash()

int Player_Dash ( )

[Utility] Initiates player dash movement if conditions are met

Initiates player dash.

Activates the dash ability if off cooldown and player has directional input. Plays dash sound effect and locks direction during dash.

Returns
int Status code (0 for success)
Todo:
[player_skills.c:24] Change dash sfx

◆ Player_HandleCrashOut()

int Player_HandleCrashOut ( )

[Update] Handles the Crashout skill state and effects

Handles ongoing crashout state.

Updates visual effects, checks duration, and resets state when completed.

Returns
int Status code (0 for success)

◆ Player_HandleDash()

int Player_HandleDash ( )

[Utility] Processes player dash state and effects

Handles ongoing dash state.

This is called every frame player.state.dashing is true. Updates dash particle effects and handles dash movement.

Returns
int Status code (0 for success)

◆ scavenger()

void scavenger ( )

◆ Skill_Update()

void Skill_Update ( )