This commit is contained in:
aozhiwei 2023-03-28 13:25:56 +08:00
parent 68ddbb136c
commit 024b9ddece
4 changed files with 19 additions and 2 deletions

View File

@ -892,3 +892,13 @@ float BattleDataContext::GetBrainLifePct()
{ {
return hero_ability_->GetBrainLifePct(); return hero_ability_->GetBrainLifePct();
} }
float BattleDataContext::GetSkillCdPct()
{
return 0.0f;
}
float BattleDataContext::GetRescueTimePct()
{
return 0.0f;
}

View File

@ -62,6 +62,8 @@ struct BattleDataContext
float GetHeroTotalAtk(); float GetHeroTotalAtk();
float GetExtRecoverHp(); float GetExtRecoverHp();
float GetBrainLifePct(); float GetBrainLifePct();
float GetSkillCdPct();
float GetRescueTimePct();
void SetReviveCoin(int num); void SetReviveCoin(int num);
int GetReviveCoin(); int GetReviveCoin();

View File

@ -711,7 +711,7 @@ void Player::HumanInteraction(Human* hum)
return; return;
} }
int downed_relive_time = mt::Param::GetIntParam("downed_relive_time") * 1000; int downed_relive_time = mt::Param::GetIntParam("downed_relive_time") * 1000;
downed_relive_time -= GetAbility()->GetAttrAbs(kHAT_RescueTime); downed_relive_time *= 1 + GetBattleContext()->GetRescueTimePct();
downed_relive_time = std::max(0, downed_relive_time); downed_relive_time = std::max(0, downed_relive_time);
StartAction( StartAction(
AT_Rescue, AT_Rescue,

View File

@ -54,7 +54,12 @@ void Skill::Initialzie()
int Skill::GetCd() int Skill::GetCd()
{ {
return meta->skill_cd() * 1000; if (meta->IsTurnOverSkill() ||
meta->skill_type() == kPassiveSkill) {
return meta->skill_cd() * 1000;
} else {
return meta->skill_cd() * 1000 * (1 + owner->GetBattleConetxt()->GetSkillCdPct());
}
} }
int Skill::GetPassedTime() int Skill::GetPassedTime()