Ezzz-dev / Nostalrius

Nostalrius is a 7.7 Tibia Clone Project based on The Forgotten Server 1.2 and CipSoft files.
99 stars 67 forks source link

1h/2h weapon blocking creatures #22

Closed ghost closed 5 years ago

ghost commented 5 years ago

i cant figure out what it is, but it seems to be way off

pretty sure you should be able to block 1 creature with only a weapon equipped, and 2 creatures if you have a shield instead, and if have both equipped it should use the one with highest defense

here is a quick test i did on realots using giant sword vs an orc with 15 sword skill

https://i.imgur.com/JAMTsDE.jpg

also, currently i can have 100 sword skill and the orc still hits me for 18 with giant sword (def:22), even with a magic sword (def:35) it hits for 15+, and if i equip a wooden shield (def:14) and 10 shielding skill btw, it barely hits me ever.

tldr: something is wrong with weapon blocking.

Ezzz-dev commented 5 years ago

Fixed, I forgot to use the weapon's skill type within the getDefense function, meaning that players would have defense skill = 2 when using a giant sword (the skill type).

https://github.com/TwistedScorpio/Nostalrius/commit/000460265cdc954b09b62378644869f355cbd862

ghost commented 5 years ago

shouldn't fightmode_balance be in this statement?

int32_t Player::getDefense() if (attackMode == FIGHTMODE_ATTACK) { totalDefense -= 4 * totalDefense / 10; } else if (attackMode == FIGHTMODE_DEFENSE) { totalDefense += 8 * totalDefense / 10; }

ghost commented 5 years ago

also what about blocking 1 monster for weapon, and 2 if have shield

Ezzz-dev commented 5 years ago

shouldn't fightmode_balance be in this statement?

int32_t Player::getDefense() if (attackMode == FIGHTMODE_ATTACK) { totalDefense -= 4 * totalDefense / 10; } else if (attackMode == FIGHTMODE_DEFENSE) { totalDefense += 8 * totalDefense / 10; }

No, balance fightmode makes no changes to the total defense or total attack of a player, only the others two do.

also what about blocking 1 monster for weapon, and 2 if have shield

This is already working and is accurate, this was the only issue by wielding two handed weapons the player skill used in the formulas was less than 10 hence why you kept getting ridiculous damage, if you find any other issues related, please, let me know.

ghost commented 5 years ago

also i did some tests again with full rare set on 43 shielding (full def) a monk hits for around 66 100 shielding (full def) a monk hits for around 70

goesraphael commented 2 years ago

Broken Link

Fixed, I forgot to use the weapon's skill type within the getDefense function, meaning that players would have defense skill = 2 when using a giant sword (the skill type).

https://github.com/TwistedScorpio/Nostalrius/commit/000460265cdc954b09b62378644869f355cbd862