Difference between revisions of "Template:Tt/Compu/Tabs"

From Corruption of Champions II
Jump to navigation Jump to search
m
m (if statement for non specific resistances)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><center><table border=3; style="width:100%; text-align:center">
+
<includeonly><table border=3; style="width:100%; text-align:center">{{#switch:{{{1|}}}|MentDMG|PhysDMG|SpelDMG|TeasDMG|WeapDMG=<caption>Apply Defensive Reductions</caption>}}<tr><td>'''Attacker'''</td><td></td><td>'''Defender'''</td></tr>{{#switch:{{{1|}}}|AoeATK|EvaATK|MagATK|MenATK|PhyATK|TeaATK|WeaATK=<tr><td>Accuracy</td><td>vs</td><td>{{#switch:{{{1|}}}|AoeATK|EvaATK|WeaATK=Evasion|PhyATK=Physical Resist|MagATK=Magic Resist|MenATK|TeaATK=Mental Resist}}</td></tr>|WeapDMG|PhysDMG=<tr><td>Armor Penetration</td><td>-</td><td>Armor</td><td>=</td><td>'''Defense'''</td></tr>|SpelDMG=<tr><td>Spell Penetration</td><td>-</td><td>Ward</td><td>=</td><td>'''Defense'''</td></tr>|MentDMG|TeasDMG=<tr><td>Temptation</td><td>-</td><td>Focus</td><td>=</td><td>'''Defense'''</td></tr>}}{{#switch:{{{1|}}}|MentDMG|PhysDMG|SpelDMG|TeasDMG|WeapDMG=<tr><td colspan="5">If '''Defense''' is > 0:<br/><code>Damage <nowiki>*</nowiki> (100 /<br/>(100 + Defense))</td></tr>}}{{#switch:{{{1|}}}|MentDMG|PhysDMG|SpelDMG|TeasDMG|WeapDMG={{#if:{{{2|}}}|<tr><td colspan="5">Apply '''{{{2|}}} Resistance''' by <code>Damage - (Damage <nowiki>*</nowiki> (Resistance / 100))</code></td></tr>}}}}{{#switch:{{{1|}}}|AoeATK|EvaATK|MagATK|MenATK|PhyATK|TeaATK|WeaATK={{#switch:{{{2|}}}|Charm|Spell=<tr><td>+Catalyst Accuracy</td><td>'''Catalyst Bonus'''</td><td>/</td></tr>}}}}{{#switch:{{{1|}}}|AoeATK|EvaATK|MagATK|MenATK|PhyATK|TeaATK|WeaATK={{#if:{{{3|}}}{{{4|}}}|<tr><td>{{{3|}}}</td><td>'''Other Bonus'''</td><td>{{{4|}}}</td></tr>}}}}</table></includeonly><noinclude>
<tr><td>'''Attacker'''</td><td></td><td>'''Defender'''</td></tr>
+
 
<tr><td>Accuracy</td><td>vs</td><td>{{#switch:{{{1|}}}|Physical=Physical<br>Resist|Magic=Magic<br>Resist|Mental=Mental<br>Resist}}</td></tr>
 
{{#switch:{{{2|}}}|Charm|Spell=<tr><td>+Catalyst Accuracy</td><td>'''Catalyst Bonus'''</td><td>/</td></tr>}}
 
{{#if:{{{3|}}}{{{4|}}}|<tr><td>{{{3|}}}</td><td>'''Other Bonus'''</td><td>{{{4|}}}</td></tr>}}
 
</table></center>
 
</includeonly><noinclude>
 
 
==Documentation==
 
==Documentation==
*'''1st Parameter''' - Hit Type
+
*'''1st Parameter''' - Table Type (i.e. is it to calculate if an attack hits or to how damage is calculated)
**<code>Physical</code> <code>Magic</code> <code>Mental</code> <code>Evasion</code>
+
**Attack Table: <code>AoeATK</code> <code>EvaATK</code> <code>MagATK</code> <code>MenATK</code> <code>PhyATK</code> <code>TeaATK</code> <code>WeaATK</code>
*'''2nd Parameter''' - Has Catalyst Bonus? (is it Spell or Charm)
+
**Damage Table: <code>MentDMG</code> <code>PhysDMG</code> <code>SpelDMG</code> <code>TeasDMG</code> <code>WeapDMG</code>
**<code>Spell</code> <code>Charm</code> if yes
+
*The next set of parameters '''depends on if its an attack or damage table''':
*'''3rd & 4th Parameter''' - Other Bonuses/Negatives for accuracy (e.g. <code>+25</code> <code>-100</code>)
+
**Attack Table
**3rd for Attacker, 4th for Defender
+
***'''2nd Parameter''' - Includes catalyst bonus? (either <code>Charm</code> or <code>Spell</code>, or leave blank)
 +
***'''3rd & 4th Parameter''' - If there are any other bonuses or negatives to the attacker's accuracy (3) or the target's defense (4)
 +
**Damage Table
 +
***'''2nd Parameter''' - Name of the Element/Resistance type
  
 
==Usage==
 
==Usage==
*Test: {{tt|1=Test|2={{tt/Compu/Tabs|Magic|Spell|+25|-20}}}}
+
This template is to be primarily used within [[Template:tt/Compu]], hence it being an extension name.
**{{tt|1=Test 2|2={{tt/Compu/Tabs|Physical|||-30}}}}
+
*<code><nowiki>{{tt/Compu|MentDMG|Fire}}</nowiki></code> {{tt/Compu|MentDMG|Fire}}
 +
*<code><nowiki>{{tt/Compu|AoeATK|Spell|+20|-50}}</nowiki></code> {{tt/Compu|AoeATK|Spell|+20|-50}}
 +
*<code><nowiki>{{tt/Compu|MentDMG|Frost}}</nowiki></code> {{tt/Compu|MentDMG|Frost}}
 +
*<code><nowiki>{{tt/Compu|AoeATK|Spell||-50}}</nowiki></code> {{tt/Compu|AoeATK|Spell||-50}}
 +
[[Category:Useable templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 10:16, 8 April 2025


Documentation

  • 1st Parameter - Table Type (i.e. is it to calculate if an attack hits or to how damage is calculated)
    • Attack Table: AoeATK EvaATK MagATK MenATK PhyATK TeaATK WeaATK
    • Damage Table: MentDMG PhysDMG SpelDMG TeasDMG WeapDMG
  • The next set of parameters depends on if its an attack or damage table:
    • Attack Table
      • 2nd Parameter - Includes catalyst bonus? (either Charm or Spell, or leave blank)
      • 3rd & 4th Parameter - If there are any other bonuses or negatives to the attacker's accuracy (3) or the target's defense (4)
    • Damage Table
      • 2nd Parameter - Name of the Element/Resistance type

Usage

This template is to be primarily used within Template:tt/Compu, hence it being an extension name.

  • {{tt/Compu|MentDMG|Fire}} (Mental DamageCompute Mental Damage
    Apply Defensive Reductions
    AttackerDefender
    Temptation-Focus=Defense
    If Defense is > 0:
    Damage * (100 /
    (100 + Defense))
    Apply Fire Resistance by Damage - (Damage * (Resistance / 100))
    Final Damage will have a random effectiveness of 95% to 105%
    )
  • {{tt/Compu|AoeATK|Spell|+20|-50}} (AOE Attack [+ Bonus]Attempt a AOE Attack
    AttackerDefender
    AccuracyvsEvasion
    +Catalyst AccuracyCatalyst Bonus/
    +20Other Bonus-50
    )
  • {{tt/Compu|MentDMG|Frost}} (Mental DamageCompute Mental Damage
    Apply Defensive Reductions
    AttackerDefender
    Temptation-Focus=Defense
    If Defense is > 0:
    Damage * (100 /
    (100 + Defense))
    Apply Frost Resistance by Damage - (Damage * (Resistance / 100))
    Final Damage will have a random effectiveness of 95% to 105%
    )
  • {{tt/Compu|AoeATK|Spell||-50}} (AOE Attack [+ Bonus]Attempt a AOE Attack
    AttackerDefender
    AccuracyvsEvasion
    +Catalyst AccuracyCatalyst Bonus/
    Other Bonus-50
    )