From d5fb2e8091b6cc2c5077e435c53507a8cc381bec Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sun, 14 Mar 2021 12:48:04 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'=D0=9D=D0=B0=D0=B1=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B8=D0=B3=D1=80=D0=BE=D0=BA=D0=B0'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...B2-%D0%B8%D0%B3%D1%80%D0%BE%D0%BA%D0%B0.md | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/%D0%9D%D0%B0%D0%B1%D1%80%D0%BE%D1%81%D0%BA%D0%B8-%D0%BF%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80%D0%BE%D0%B2-%D0%B8%D0%B3%D1%80%D0%BE%D0%BA%D0%B0.md b/%D0%9D%D0%B0%D0%B1%D1%80%D0%BE%D1%81%D0%BA%D0%B8-%D0%BF%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80%D0%BE%D0%B2-%D0%B8%D0%B3%D1%80%D0%BE%D0%BA%D0%B0.md index 5280eb8..c256039 100644 --- a/%D0%9D%D0%B0%D0%B1%D1%80%D0%BE%D1%81%D0%BA%D0%B8-%D0%BF%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80%D0%BE%D0%B2-%D0%B8%D0%B3%D1%80%D0%BE%D0%BA%D0%B0.md +++ b/%D0%9D%D0%B0%D0%B1%D1%80%D0%BE%D1%81%D0%BA%D0%B8-%D0%BF%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80%D0%BE%D0%B2-%D0%B8%D0%B3%D1%80%D0%BE%D0%BA%D0%B0.md @@ -64,6 +64,62 @@ function health($level, $endurance = 10) { |20|467|1868| |50|2627|10508| +### Другой вариант +```PHP +function health_new($vit) { + // 1 -45, 2 -40, 3 -35, 4 -30, 5 -25, 6 -20, 7 -15, 8 -10, 9 -5, 10 0. + // 3 * $vit + (-50 + 5 * $vit)% + $percentageChange = -50 + 5 * $vit; + $baseHealth = 3 * $vit; + $bonus = ($baseHealth / 100) * $percentageChange; + $final = $baseHealth + $bonus; + return $final; +} +``` + +|vit|result +|-|- +|1_new|1.65(2) +|2_new|3.6(4) +|3_new|5.85(6) +|4_new|8.4(8) +|5_new|11.25(11) +|6_new|14.4(14) +|7_new|17.85(18) +|8_new|21.6(22) +|9_new|25.65(26) +|10_new|30(30) +|11_new|34.65(35) +|12_new|39.6(40) +|13_new|44.85(45) +|14_new|50.4(50) +|15_new|56.25(56) +|16_new|62.4(62) +|17_new|68.85(69) +|18_new|75.6(76) +|19_new|82.65(83) +|20_new|90(90) +|21_new|97.65(98) +|22_new|105.6(106) +|23_new|113.85(114) +|24_new|122.4(122) +|25_new|131.25(131) +|26_new|140.4(140) +|27_new|149.85(150) +|28_new|159.6(160) +|29_new|169.65(170) +|30_new|180(180) +|31_new|190.65(191) +|32_new|201.6(202) +|33_new|212.85(213) +|34_new|224.4(224) +|35_new|236.25(236) +|36_new|248.4(248) +|37_new|260.85(261) +|38_new|273.6(274) +|39_new|286.65(287) +|40_new|300(300) + ## Профильный урон * **Сила** — наносит урон физическому щиту, потом здоровью. Можно бить только того, кто перед тобой. * **Ловкость** — наносит урон физическому щиту, потом здоровью. Можно бить любого по выбору.