buff add lock time
This commit is contained in:
parent
4219d34053
commit
ea150936fa
@ -212,6 +212,7 @@ void InternalShot(Creature* c,
|
|||||||
#if 1
|
#if 1
|
||||||
{
|
{
|
||||||
bool is_player = c->IsPlayer();
|
bool is_player = c->IsPlayer();
|
||||||
|
bool is_car = c->IsCar();
|
||||||
float bullet_born_angle = c->GetAttackDir().CalcAngleEx(a8::Vec2::RIGHT);
|
float bullet_born_angle = c->GetAttackDir().CalcAngleEx(a8::Vec2::RIGHT);
|
||||||
if (c->GetAttackDir().y > 0.00001f) {
|
if (c->GetAttackDir().y > 0.00001f) {
|
||||||
bullet_born_angle = -bullet_born_angle;
|
bullet_born_angle = -bullet_born_angle;
|
||||||
@ -528,6 +529,9 @@ int Creature::AddBuff(Creature* caster,
|
|||||||
buff->add_frameno = room->GetFrameNo();
|
buff->add_frameno = room->GetFrameNo();
|
||||||
buff->xtimer_attacher.xtimer = &room->xtimer;
|
buff->xtimer_attacher.xtimer = &room->xtimer;
|
||||||
buff->Init();
|
buff->Init();
|
||||||
|
if (buff->meta->i->lock_move()) {
|
||||||
|
IncDisableMoveTimes();
|
||||||
|
}
|
||||||
list_add_tail(&buff->effect_entry, &buff_effect_[buff->meta->i->buff_effect()]);
|
list_add_tail(&buff->effect_entry, &buff_effect_[buff->meta->i->buff_effect()]);
|
||||||
if (buff->meta->i->depend_effect() != 0 &&
|
if (buff->meta->i->depend_effect() != 0 &&
|
||||||
IsValidBuffEffect(buff->meta->i->depend_effect())) {
|
IsValidBuffEffect(buff->meta->i->depend_effect())) {
|
||||||
@ -816,6 +820,9 @@ void Creature::RecalcBuffAttr()
|
|||||||
|
|
||||||
void Creature::OnBuffRemove(Buff& buff)
|
void Creature::OnBuffRemove(Buff& buff)
|
||||||
{
|
{
|
||||||
|
if (buff.meta->i->lock_move()) {
|
||||||
|
DecDisableMoveTimes();
|
||||||
|
}
|
||||||
switch (buff.meta->i->buff_effect()) {
|
switch (buff.meta->i->buff_effect()) {
|
||||||
case kBET_Sprint:
|
case kBET_Sprint:
|
||||||
{
|
{
|
||||||
@ -1012,6 +1019,7 @@ bool Creature::CanUseSkill(int skill_id)
|
|||||||
if (HasBuffEffect(kBET_Vertigo) ||
|
if (HasBuffEffect(kBET_Vertigo) ||
|
||||||
HasBuffEffect(kBET_Jump) ||
|
HasBuffEffect(kBET_Jump) ||
|
||||||
HasBuffEffect(kBET_Fly) ||
|
HasBuffEffect(kBET_Fly) ||
|
||||||
|
HasBuffEffect(kBET_MachineGun) ||
|
||||||
HasBuffEffect(kBET_Sprint)) {
|
HasBuffEffect(kBET_Sprint)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2510,6 +2518,7 @@ bool Creature::FreezeOperate()
|
|||||||
if (!freeze) {
|
if (!freeze) {
|
||||||
freeze = GetBuffByEffectId(kBET_Vertigo) ||
|
freeze = GetBuffByEffectId(kBET_Vertigo) ||
|
||||||
GetBuffByEffectId(kBET_Driver) ||
|
GetBuffByEffectId(kBET_Driver) ||
|
||||||
|
GetBuffByEffectId(kBET_MachineGun) ||
|
||||||
GetBuffByEffectId(kBET_Passenger);
|
GetBuffByEffectId(kBET_Passenger);
|
||||||
}
|
}
|
||||||
return freeze;
|
return freeze;
|
||||||
|
@ -265,6 +265,11 @@ class Creature : public MoveableEntity
|
|||||||
int GetDisableAttackDirTimes() { return disable_attack_dir_times_ ; };
|
int GetDisableAttackDirTimes() { return disable_attack_dir_times_ ; };
|
||||||
void SetDisableAttackDirTimes(int times) { disable_attack_dir_times_ = times; };
|
void SetDisableAttackDirTimes(int times) { disable_attack_dir_times_ = times; };
|
||||||
|
|
||||||
|
void IncDisableMoveTimes() { ++disable_move_times_ ; };
|
||||||
|
void DecDisableMoveTimes() { --disable_move_times_ ; };
|
||||||
|
int GetDisableMoveTimes() { return disable_move_times_ ; };
|
||||||
|
void SetDisableMoveTimes(int times) { disable_move_times_ = times; };
|
||||||
|
|
||||||
void DoRecoilForce(int distance);
|
void DoRecoilForce(int distance);
|
||||||
void WinSkillExp(int win_exp);
|
void WinSkillExp(int win_exp);
|
||||||
float GetAttrAbs(int attr_id);
|
float GetAttrAbs(int attr_id);
|
||||||
@ -339,6 +344,7 @@ private:
|
|||||||
|
|
||||||
int disable_move_dir_times_ = 0;
|
int disable_move_dir_times_ = 0;
|
||||||
int disable_attack_dir_times_ = 0;
|
int disable_attack_dir_times_ = 0;
|
||||||
|
int disable_move_times_ = 0;
|
||||||
|
|
||||||
a8::Vec2 skill_dir_;
|
a8::Vec2 skill_dir_;
|
||||||
float skill_param1 = 0;
|
float skill_param1 = 0;
|
||||||
|
@ -1894,6 +1894,9 @@ void Human::_UpdateMove(int speed)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (GetDisableMoveTimes() > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
a8::UnSetBitFlag(status, CS_Collisioning);
|
a8::UnSetBitFlag(status, CS_Collisioning);
|
||||||
do {
|
do {
|
||||||
|
@ -363,6 +363,7 @@ message Buff
|
|||||||
optional string exclude_spec_race = 28;
|
optional string exclude_spec_race = 28;
|
||||||
optional int32 dead_remove = 29;
|
optional int32 dead_remove = 29;
|
||||||
optional int32 no_immune = 30;
|
optional int32 no_immune = 30;
|
||||||
|
optional int32 lock_move = 31;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Drop
|
message Drop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user