feat: modified attack characteristics
This commit is contained in:
parent
c66a8d8705
commit
e6055ed4e6
|
@ -84,8 +84,8 @@ const State* PlayerJabA_Update(Player* self, float deltaTime) {
|
|||
const static DamageEventData damage = {
|
||||
.damageAmount = 1,
|
||||
.knockdown = 0,
|
||||
.stun = 0.1f,
|
||||
.knockback = 0.05f,
|
||||
.stun = 0.15f,
|
||||
.knockback = 0.07f,
|
||||
};
|
||||
const float ntime = animation_sprite_get_time_normalized(self->currentAnimation);
|
||||
if(self->animationTriggers == 0 && ntime > 0.33f) {
|
||||
|
@ -115,10 +115,11 @@ const State* PlayerJabB_Update(Player* self, float deltaTime) {
|
|||
static const DamageEventData damage = {
|
||||
.damageAmount = 1,
|
||||
.knockdown = 0,
|
||||
.stun = 0.1f,
|
||||
.stun = 0.15f,
|
||||
.knockback = 0.05f,
|
||||
};
|
||||
const float ntime = animation_sprite_get_time_normalized(self->currentAnimation);
|
||||
const size_t frame = sprite_get_tile(self->sprite);
|
||||
if(self->animationTriggers == 0 && ntime > 0.33f) {
|
||||
PlayerHurtbox(self, damage, MakeVector(0.1f, 0.06f), MakeVector(0.3f, -0.6f));
|
||||
++self->animationTriggers;
|
||||
|
@ -146,12 +147,10 @@ const State* PlayerKickA_Update(Player* self, float deltaTime) {
|
|||
.knockback = 0.15f,
|
||||
};
|
||||
const float ntime = animation_sprite_get_time_normalized(self->currentAnimation);
|
||||
if(ntime > 0.6f && self->animationTriggers == 0) {
|
||||
PlayerHurtbox(self, damage, MakeVector(0.1f, 0.06f), MakeVector(0.3f, -0.4f));
|
||||
++self->animationTriggers;
|
||||
const size_t frame = sprite_get_tile(self->sprite);
|
||||
if(frame >= 2 && frame <= 3) {
|
||||
PlayerHurtbox(self, damage, MakeVector(0.16f, 0.06f), MakeVector(0.33f, -0.4f));
|
||||
}
|
||||
if(ntime > 1.0f && self->attackInput == 1)
|
||||
return PlayerJabA();
|
||||
if(!veqf(self->moveInput, ZeroVector) && ntime > 1.05f)
|
||||
return PlayerWalk();
|
||||
if(ntime >= 1.f)
|
||||
|
@ -192,14 +191,14 @@ const State* PlayerAirHeavy_Update(Player* self, float deltaTime) {
|
|||
const static DamageEventData damage = {
|
||||
.damageAmount = 6,
|
||||
.knockdown = 1,
|
||||
.stun = 0.5f,
|
||||
.stun = 0.75f,
|
||||
.knockback = 0.15f
|
||||
};
|
||||
const float ntime = animation_sprite_get_time_normalized(self->currentAnimation);
|
||||
if(ntime > 0.25f && self->animationTriggers == 0) {
|
||||
PlayerHurtbox(self, damage, MakeVector(0.1f, 0.06f), MakeVector(0.3f, -0.4f));
|
||||
++self->animationTriggers;
|
||||
size_t frame = sprite_get_tile(self->sprite);
|
||||
if(frame == 1) {
|
||||
PlayerHurtbox(self, damage, MakeVector(0.07f, 0.07f), MakeVector(0.3f, -0.38f));
|
||||
}
|
||||
const State* result = PlayerJump_Update(self, deltaTime);
|
||||
return result == PlayerJump() ? PlayerAirHeavy() : result;
|
||||
return (result == PlayerJump()) ? PlayerAirHeavy() : result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue