Draft:Two Worlds:Heal: Difference between revisions

The Two Worlds Wiki - Documenting Two Worlds since 2008.
Jump to navigation Jump to search
Fandom Two Worlds>Phicr
(Add formulas for HP restoration and MP consumption.)
Fandom Two Worlds>Phicr
(Use code blocks instead of hijacking tables)
Line 13: Line 13:
|additionalduration=
|additionalduration=
|additionalmana=
|additionalmana=
}}</onlyinclude>Heal is a [[magic]] spell that restores HP. Healling power is calculated using the formula:
}}</onlyinclude>Heal is a [[magic]] spell that restores HP. Healling power is calculated using the formula:<syntaxhighlight lang="julia">
{| class="article-table"
(cards * spell_booster_level * 100) + (air_school_level * cards * 100)
|<code>(cards * spell_booster_level * 100) + (air_school_level * cards * 100)</code>
</syntaxhighlight>
|}


* <code>cards</code> = Number of heal cards
* <code>cards</code> = Number of heal cards
Line 29: Line 28:




Mana consumption is calculated by the formula:
Mana consumption is calculated by the formula:<syntaxhighlight lang="julia">
{| class="article-table"
45 + floor(max(0, cards + air_school_level + spell_booster_level - 3) * 5.75)
|<code>45 + floor(max(0, cards + air_school_level + spell_booster_level - 3) * 5.75)</code>
</syntaxhighlight>
|}


* floor(x): Function, rounds number to the nearest integer less than <code>x</code>.
* floor(x): Function, rounds number to the nearest integer less than <code>x</code>.

Revision as of 20:22, January 19, 2021

Template:ItemInfoBoxHeal is a magic spell that restores HP. Healling power is calculated using the formula:<syntaxhighlight lang="julia"> (cards * spell_booster_level * 100) + (air_school_level * cards * 100) </syntaxhighlight>

  • cards = Number of heal cards
  • spell_booster_level = Level increased by spell boosters
  • air_school_level = Level of air school

Examples:

  • 3 cards, 0 spell boosters, air school level 1: 0 + (1 * 3 * 100) HP = 300 HP
  • 3 cards, 0 spell boosters, air school level 15: 0 + (15 * 3 * 100) HP = 4500 HP
  • 3 cards, 2 spell boosters, air school level 10: (3 * 3 * 100) + (15 * 3 * 100) HP = 900 + 4500 HP = 5400 HP


Mana consumption is calculated by the formula:<syntaxhighlight lang="julia"> 45 + floor(max(0, cards + air_school_level + spell_booster_level - 3) * 5.75) </syntaxhighlight>

  • floor(x): Function, rounds number to the nearest integer less than x.
    • Examples: floor(1.2) = 1, floor(2.7) = 2
  • max(x,y): Function, returns the greatest number among its arguments.
    • Examples: max(1,2) = 2, max(0,-2) = 0
  • cards, air_school_level, spell_booster_level: same as above formula

Examples:

  • 1 card, 0 spell boosters, air school level 1: 45 + floor(max(0, -1) * 5.75) MP = 45 + floor(0 * 5.75) MP = 45 + 0 MP = 45 MP
  • 3 cards, 0 spell boosters, air school level 1: 45 + floor(max(0, 1) * 5.75) MP = 45 + floor(1 * 5.75) MP = 45 + 6 MP = 51 MP
  • 3 cards, 0 spell boosters, air school level 15: 45 + floor(max(0, 15) * 5.75) MP = 45 + floor(15 * 5.75) MP = 45 + 86 MP = 131 MP
  • 3 cards, 2 spell boosters, air school level 15: 45 + floor(max(0, 18) * 5.75) MP = 45 + floor(18 * 5.75) MP = 45 + 103 MP = 148 MP