Difference between revisions of "YOF Editor"

From The Coursebooks Wiki
Jump to navigation Jump to search
(Code Logic)
(Code Logic)
Line 23: Line 23:
  
 
If wpb is greater than str, then wpb = str
 
If wpb is greater than str, then wpb = str
Else
+
*Else
If wpb is less than or equal to str, wpb = wpb
+
**If wpb is less than or equal to str, wpb = wpb
  
 
If spm is greater than dex, then spm = dex
 
If spm is greater than dex, then spm = dex
Else
+
*Else
If spm is less than or equal to dex, spm = spm
+
**If spm is less than or equal to dex, spm = spm
  
 
Melee AV = wpb + spm
 
Melee AV = wpb + spm
  
 
If wpr is greater than dex, then wpr = dex
 
If wpr is greater than dex, then wpr = dex
Else
+
*Else
If wpr is less than or equal to dex, wpr = wpr
+
**If wpr is less than or equal to dex, wpr = wpr
  
 
Ranged AV = wpr
 
Ranged AV = wpr

Revision as of 05:35, 17 March 2016

This is the main page for the Year of Fire Editor, the web form we are kludgeing together to create characters online.

All pages for the YOF Editor will use the prefix YOF.

Base Test Idea

3 Proficiencies:

  • Weapon Proficiency, Bladed = wpb
  • Weapon Proficiency, Ranged = wpr
  • Special Proficiency, Melee = spm

2 Stats:

  • Strength = str
  • Dexterity = str

1 Radio button that indicates Ranged/vs bladed

Form spits out AV for ranged and melee at the end.

Code Logic

In this simple example, AV = appropriate proficiency, + special proficiency if applicable. The code needs to compare the proficiency to the stat and discard any points over the capping stat, then check to see if the special proficiency applies, and do the same with that. It needs to do this without changing the stats.

The logic should look something like this:

If wpb is greater than str, then wpb = str

  • Else
    • If wpb is less than or equal to str, wpb = wpb

If spm is greater than dex, then spm = dex

  • Else
    • If spm is less than or equal to dex, spm = spm

Melee AV = wpb + spm

If wpr is greater than dex, then wpr = dex

  • Else
    • If wpr is less than or equal to dex, wpr = wpr

Ranged AV = wpr

See Also

Nothing. You see nothing.