Beispiel #1
0
	void Charstats::calculatedamage(Weapon::WpType wtype)
	{
		int32_t primary = getprimary(wtype);
		int32_t secondary = getsecondary(wtype);
		maxdamage = static_cast<int32_t>(
			(primary + secondary) * static_cast<float>(attack) / 100
			);
		mindamage = static_cast<int32_t>(
			((primary * 0.9 * mastery) + secondary) * static_cast<float>(attack) / 100
			);
	}
Beispiel #2
0
	void CharStats::close_totalstats()
	{
		totalstats[Equipstat::ACC] += calculateaccuracy();

		for (auto iter : percentages)
		{
			Equipstat::Value stat = iter.first;
			int32_t total = totalstats[stat];
			total += static_cast<int32_t>(total * iter.second);
			set_total(stat, total);
		}

		int32_t primary = getprimary();
		int32_t secondary = getsecondary();
		int32_t attack = gettotal(Equipstat::WATK);
		float multiplier = damagepercent + static_cast<float>(attack) / 100;
		maxdamage = static_cast<int32_t>((primary + secondary) * multiplier);
		mindamage = static_cast<int32_t>(((primary * 0.9f * mastery) + secondary) * multiplier);
	}