Ultima modifica:
Ciao.
"mwep" e' uno scaling che include:
- un valore randomico scelto dall'intervallo fra attacco magico minimo (value1) e attacco magico massimo (value2)
- incremento globale (value5)
C++:
void SetPolyVarForAttack(LPCHARACTER ch, CSkillProto* pkSk, LPITEM pkWeapon)
{
if (ch->IsPC())
{
if (pkWeapon && pkWeapon->GetType() == ITEM_WEAPON)
{
int iWep = number(pkWeapon->GetValue(3), pkWeapon->GetValue(4));
iWep += pkWeapon->GetValue(5);
int iMtk = number(pkWeapon->GetValue(1), pkWeapon->GetValue(2));
iMtk += pkWeapon->GetValue(5);
pkSk->SetPointVar("wep", iWep);
pkSk->SetPointVar("mtk", iMtk);
pkSk->SetPointVar("mwep", iMtk);
}
else
{
pkSk->SetPointVar("wep", 0);
pkSk->SetPointVar("mtk", 0);
pkSk->SetPointVar("mwep", 0);
}
}
else
{
int iWep = number(ch->GetMobDamageMin(), ch->GetMobDamageMax());
pkSk->SetPointVar("wep", iWep);
pkSk->SetPointVar("mwep", iWep);
pkSk->SetPointVar("mtk", iWep);
}
}
"number" e' semplicemente un numero random nell'intervallo rappresentato dai due valori fra parentesi.
"ar" e' un moltiplicatore che aumenta tanto piu' alto sono il livello e la destrezza del player, e viene rapportato al medesimo valore del bersaglio, che in quel caso viene definito "er".
C++:
float CalcAttackRating(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, bool bIgnoreTargetRating)
{
int iARSrc;
int iERSrc;
if (LC_IsYMIR()) // õ¸¶
{
iARSrc = MIN(gPlayerMaxLevelStats, pkAttacker->GetPolymorphPoint(POINT_DX));
iERSrc = MIN(gPlayerMaxLevelStats, pkVictim->GetPolymorphPoint(POINT_DX));
}
else
{
int attacker_dx = pkAttacker->GetPolymorphPoint(POINT_DX);
int attacker_lv = pkAttacker->GetLevel();
int victim_dx = pkVictim->GetPolymorphPoint(POINT_DX);
int victim_lv = pkAttacker->GetLevel();
iARSrc = MIN(gPlayerMaxLevelStats, (attacker_dx * 4 + attacker_lv * 2) / 6);
iERSrc = MIN(gPlayerMaxLevelStats, (victim_dx * 4 + victim_lv * 2) / 6);
}
float fAR = ((float)iARSrc + 210.0f) / 300.0f; // fAR = 0.7 ~ 1.0
if (bIgnoreTargetRating)
return fAR;
// ((Edx * 2 + 20) / (Edx + 110)) * 0.3
float fER = ((float)(iERSrc * 2 + 5) / (iERSrc + 95)) * 3.0f / 10.0f;
return fAR - fER;
}
"chain" e' un tipo di scaling usato solo dalla skill "Artiglio di Lampo", e ritorna un valore sempre piu' basso per ogni volta che la skill si ripete, e' essenzialmente cio' che diminuisce il danno di Artiglio di Lampo tanti piu' sono i bersagli coinvolti dalla skill.
C++:
// for SKILL_CHAIN lighting
public:
int GetChainLightningIndex() const { return m_iChainLightingIndex; }
void IncChainLightningIndex() { ++m_iChainLightingIndex; }
void AddChainLightningExcept(LPCHARACTER ch) { m_setExceptChainLighting.insert(ch); }
void ResetChainLightningIndex() { m_iChainLightingIndex = 0; m_setExceptChainLighting.clear(); }
int GetChainLightningMaxCount() const;
const CHARACTER_SET& GetChainLightingExcept() const { return m_setExceptChainLighting; }
C++:
m_pkSk->SetPointVar("chain", m_pkChr->GetChainLightningIndex());
m_pkChr->IncChainLightningIndex();
C++:
if (dwVnum == SKILL_CHAIN)
{
ResetChainLightningIndex();
AddChainLightningExcept(pkVictim);
}
C++:
if (pkTarget)
{
pkChrVictim->CreateFly(FLY_CHAIN_LIGHTNING, pkTarget);
pkChr->ComputeSkill(SKILL_CHAIN, pkTarget);
pkChr->AddChainLightningExcept(pkTarget);
}
else
{
sys_log(1, "%s use chainlighting, but find victim failed near %s", pkChr->GetName(), pkChrVictim->GetName());
}