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
(Use code blocks instead of hijacking tables)
Fandom Two Worlds>Phicr
(More information added to the mana cost formula, formatting)
Line 3: Line 3:
|name=Heal
|name=Heal
|image=[[File:Magic_Heal.jpg]]
|image=[[File:Magic_Heal.jpg]]
|magiccircle=
|magiccircle=1
|firstcard=
|firstcard= 1500 HP
|firstduration=
|firstduration=
|firstmana=
|firstmana= 120
|secondcard=
|secondcard= 3000 HP
|secondduration=
|secondduration=
|secondmana=
|secondmana= 125
|additionalcard=
|additionalcard=
|additionalduration=
|additionalduration=
|additionalmana=
|additionalmana=
}}</onlyinclude>Heal is a [[magic]] spell that restores HP. Healling power is calculated using the formula:<syntaxhighlight lang="julia">
}}</onlyinclude>Heal is an air [[magic]] spell that restores HP.
<br />
 
==Formulas==
 
===HP Restoration===
Healling power is calculated using the formula:<syntaxhighlight lang="julia">
(cards * spell_booster_level * 100) + (air_school_level * cards * 100)
(cards * spell_booster_level * 100) + (air_school_level * cards * 100)
</syntaxhighlight>
</syntaxhighlight>


* <code>cards</code> = Number of heal cards
*<code>cards</code> = Number of heal cards
* <code>spell_booster_level</code> = Level increased by [[Spell Booster|spell boosters]]
*<code>spell_booster_level</code> = Level increased by [[Spell Booster|spell boosters]]
* <code>air_school_level</code> = Level of air school
*<code>air_school_level</code> = Level of air school


Examples:
Examples:


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




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


* floor(x): Function, rounds number to the nearest integer less than <code>x</code>.
*round(x): Function, rounds number to the nearest integer from <code>x</code>. Ties are rounded to the nearest even.
** Examples: <code>floor(1.2) = 1</code>, <code>floor(2.7) = 2</code>
** Examples: <code>round(1.2) = 1</code>, <code>round(2.7) = 3</code>, <code>round(3.5) = 4</code>, <code>round(4.5) = 4</code>
* <code>max(x,y)</code>: Function, returns the greatest number among its arguments.
*<code>max(x,y)</code>: Function, returns the greatest number among its arguments.
** Examples: <code>max(1,2) = 2</code>, <code>max(0,-2) = 0</code>
**Examples: <code>max(1,2) = 2</code>, <code>max(0,-2) = 0</code>
* <code>cards</code>, <code>air_school_level</code>, <code>spell_booster_level</code>: same as above formula
*<code>cards</code>, <code>air_school_level</code>, <code>spell_booster_level</code>: same as HP restoration formula


Examples:
Examples:
Line 42: Line 49:
* 1 card, 0 spell boosters, air school level 1: <code>45 + floor(max(0, -1) * 5.75)</code> MP = <code>45 + floor(0 * 5.75)</code> MP = <code>45 + 0</code> MP = 45 MP
* 1 card, 0 spell boosters, air school level 1: <code>45 + floor(max(0, -1) * 5.75)</code> MP = <code>45 + floor(0 * 5.75)</code> MP = <code>45 + 0</code> MP = 45 MP
* 3 cards, 0 spell boosters, air school level 1: <code>45 + floor(max(0, 1) * 5.75)</code> MP = <code>45 + floor(1 * 5.75)</code> MP = <code>45 + 6</code> MP = 51 MP
* 3 cards, 0 spell boosters, air school level 1: <code>45 + floor(max(0, 1) * 5.75)</code> MP = <code>45 + floor(1 * 5.75)</code> MP = <code>45 + 6</code> MP = 51 MP
* 3 cards, 0 spell boosters, air school level 15: <code>45 + floor(max(0, 15) * 5.75)</code> MP = <code>45 + floor(15 * 5.75)</code> MP = <code>45 + 86</code> MP = 131 MP
*3 cards, 0 spell boosters, air school level 15: <code>45 + floor(max(0, 15) * 5.75)</code> MP = <code>45 + floor(15 * 5.75)</code> MP = <code>45 + 86</code> MP = 131 MP
* 3 cards, 2 spell boosters, air school level 15: <code>45 + floor(max(0, 18) * 5.75)</code> MP = <code>45 + floor(18 * 5.75)</code> MP = <code>45 + 103</code> MP = 148 MP
*3 cards, 2 spell boosters, air school level 15: <code>45 + floor(max(0, 18) * 5.75)</code> MP = <code>45 + floor(18 * 5.75)</code> MP = <code>45 + 103</code> MP = 148 MP
 
This result is still off by one sometimes, so more research is necessary to find the exact formula.


<br />
<br />
[[Category:Air Magic]]
[[Category:Air Magic]]

Revision as of 21:21, January 19, 2021

Template:ItemInfoBoxHeal is an air magic spell that restores HP.

Formulas

HP Restoration

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 Cost

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

  • round(x): Function, rounds number to the nearest integer from x. Ties are rounded to the nearest even.
    • Examples: round(1.2) = 1, round(2.7) = 3, round(3.5) = 4, round(4.5) = 4
  • 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 HP restoration 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

This result is still off by one sometimes, so more research is necessary to find the exact formula.