More changes

This commit is contained in:
KimLS 2017-06-08 19:55:25 -07:00
parent 7189994b78
commit d6890ad76d
4 changed files with 11 additions and 3 deletions

View File

@ -4301,7 +4301,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
// Crippling blows also have a chance to stun // Crippling blows also have a chance to stun
// Kayen: Crippling Blow would cause a chance to interrupt for npcs < 55, with a // Kayen: Crippling Blow would cause a chance to interrupt for npcs < 55, with a
// staggers message. // staggers message.
if (defender->GetLevel() <= 55 && !defender->GetSpecialAbility(IMMUNE_STUN)) { if (defender->GetLevel() <= 55 && !defender->GetSpecialAbility(UNSTUNABLE)) {
defender->Emote("staggers."); defender->Emote("staggers.");
defender->Stun(2000); defender->Stun(2000);
} }

View File

@ -1691,7 +1691,7 @@ luabind::scope lua_register_random() {
luabind::def("Int", &random_int), luabind::def("Int", &random_int),
luabind::def("Real", &random_real), luabind::def("Real", &random_real),
luabind::def("Roll", &random_roll_int), luabind::def("Roll", &random_roll_int),
luabind::def("Roll", &random_roll_real), luabind::def("RollReal", &random_roll_real),
luabind::def("Roll0", &random_roll0) luabind::def("Roll0", &random_roll0)
]; ];
} }

View File

@ -503,6 +503,12 @@ int Lua_NPC::GetRawAC() {
return self->GetRawAC(); return self->GetRawAC();
} }
int Lua_NPC::GetAvoidanceRating()
{
Lua_Safe_Call_Int();
return self->GetAvoidanceRating();
}
luabind::scope lua_register_npc() { luabind::scope lua_register_npc() {
return luabind::class_<Lua_NPC, Lua_Mob>("NPC") return luabind::class_<Lua_NPC, Lua_Mob>("NPC")
.def(luabind::constructor<>()) .def(luabind::constructor<>())
@ -604,7 +610,8 @@ luabind::scope lua_register_npc() {
.def("MerchantCloseShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantCloseShop) .def("MerchantCloseShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantCloseShop)
.def("SetMerchantProbability", (void(Lua_NPC::*)(void))&Lua_NPC::SetMerchantProbability) .def("SetMerchantProbability", (void(Lua_NPC::*)(void))&Lua_NPC::SetMerchantProbability)
.def("GetMerchantProbability", (uint8(Lua_NPC::*)(void))&Lua_NPC::GetMerchantProbability) .def("GetMerchantProbability", (uint8(Lua_NPC::*)(void))&Lua_NPC::GetMerchantProbability)
.def("GetRawAC", (int(Lua_NPC::*)(void))&Lua_NPC::GetRawAC); .def("GetRawAC", (int(Lua_NPC::*)(void))&Lua_NPC::GetRawAC)
.def("GetAvoidanceRating", &Lua_NPC::GetAvoidanceRating);
} }
#endif #endif

View File

@ -126,6 +126,7 @@ public:
void SetMerchantProbability(uint8 amt); void SetMerchantProbability(uint8 amt);
uint8 GetMerchantProbability(); uint8 GetMerchantProbability();
int GetRawAC(); int GetRawAC();
int GetAvoidanceRating();
}; };
#endif #endif