Commit c889e8110d87f47a7f8ba60f068219795399dfa7

Authored by DarkGod
1 parent c0bd9cd2

lowercase

... ... @@ -23,62 +23,62 @@ require "bit"
23 23 --- Provide some helper functions for description
24 24 -- @classmod engine.generator.interface.ActorTalentsDescHelper
25 25 module(..., package.seeall, class.make)
26   -local acc, def, pp, sp, mp, ps, ss, ms = _t"Accuracy", _t"Defense", _t"Physical Power", _t"Spellpower", _t"Mindpower", _t"Physical Save", _t"Spell Save", _t"Mental Save"
  26 +local acc, def, pp, sp, mp, ps, ss, ms = _t"accuracy", _t"defense", _t"physical power", _t"spellpower", _t"mindpower", _t"physical save", _t"spell Save", _t"mental save"
27 27
28 28 _M.power_save_simple_pairs = {
29   - ap = { acc, ps },
30   - as = { acc, ss },
31   - am = { acc, ms },
32   - pp = { pp, ps },
33   - ps = { pp, ss },
34   - pm = { pp, ms },
35   - sp = { sp, ps },
36   - ss = { sp, ss },
37   - sm = { sp, ms },
38   - mp = { mp, ps },
39   - ms = { mp, ss },
40   - mm = { mp, ms },
  29 + ap = { acc, ps },
  30 + as = { acc, ss },
  31 + am = { acc, ms },
  32 + pp = { pp, ps },
  33 + ps = { pp, ss },
  34 + pm = { pp, ms },
  35 + sp = { sp, ps },
  36 + ss = { sp, ss },
  37 + sm = { sp, ms },
  38 + mp = { mp, ps },
  39 + ms = { mp, ss },
  40 + mm = { mp, ms },
41 41 }
42 42 _M.powers_saves = {
43   - a = acc,
44   - acc = acc,
45   - atk = acc,
46   - attack = acc,
47   - accuracy = acc,
48   - pp = pp,
49   - physicalpower = pp,
50   - sp = sp,
51   - spellpower = sp,
52   - mp = mp,
53   - mindpower = mp,
54   - d = def,
55   - def = def,
56   - defense = def,
57   - ps = ps,
58   - physicalsave = ps,
59   - ss = ss,
60   - spellsave = ss,
61   - ms = ms,
62   - mindsave = ms,
  43 + a = acc,
  44 + acc = acc,
  45 + atk = acc,
  46 + attack = acc,
  47 + accuracy = acc,
  48 + pp = pp,
  49 + physicalpower = pp,
  50 + sp = sp,
  51 + spellpower = sp,
  52 + mp = mp,
  53 + mindpower = mp,
  54 + d = def,
  55 + def = def,
  56 + defense = def,
  57 + ps = ps,
  58 + physicalsave = ps,
  59 + ss = ss,
  60 + spellsave = ss,
  61 + ms = ms,
  62 + mindsave = ms,
63 63 }
64 64 _M.powers = {
65   - p = pp,
66   - s = sp,
67   - m = mp,
  65 + p = pp,
  66 + s = sp,
  67 + m = mp,
68 68 }
69 69 _M.saves = {
70   - p = ps,
71   - s = ss,
72   - m = ms,
  70 + p = ps,
  71 + s = ss,
  72 + m = ms,
73 73 }
74 74
75 75 _M.concat = function(...)
76   - local arg = { ... }
77   - local transformed = {}
78   - for _, v in ipairs(arg) do
79   - transformed[#transformed + 1] = _M.powers_saves[v] or _t(tostring(v))
80   - end
81   - return transformed
  76 + local arg = { ... }
  77 + local transformed = {}
  78 + for _, v in ipairs(arg) do
  79 + transformed[#transformed + 1] = _M.powers_saves[v] or _t(tostring(v))
  80 + end
  81 + return transformed
82 82 end
83 83 _M.max = _M.concat
84 84
... ... @@ -88,23 +88,23 @@ _M.max = _M.concat
88 88 -- string: search in _M.powers/saves/powers_saves and replace with proper desc
89 89 -- tables: simply concat them with "/"
90 90 _M.vs = function(power, save)
91   - if not save and _M.power_save_simple_pairs[power] then
92   - local pair = _M.power_save_simple_pairs[power]
93   - return string.tformat("(%s vs %s)", pair[1], pair[2])
94   - end
95   - if type(power) == "table" then
96   - power = table.concat(power, "/")
97   - else
98   - power = _M.powers[power] or _M.powers_saves[power] or power
99   - end
100   - if type(save) == "table" then
101   - save = table.concat(save, "/")
102   - else
103   - save = _M.saves[save] or _M.powers_saves[save] or save
104   - end
105   - if power and save then
106   - return string.tformat("(%s vs %s)", power, save)
107   - else
108   - return _t"(Bypass Saves)"
109   - end
  91 + if not save and _M.power_save_simple_pairs[power] then
  92 + local pair = _M.power_save_simple_pairs[power]
  93 + return string.tformat("(%s vs %s)", pair[1], pair[2])
  94 + end
  95 + if type(power) == "table" then
  96 + power = table.concat(power, "/")
  97 + else
  98 + power = _M.powers[power] or _M.powers_saves[power] or power
  99 + end
  100 + if type(save) == "table" then
  101 + save = table.concat(save, "/")
  102 + else
  103 + save = _M.saves[save] or _M.powers_saves[save] or save
  104 + end
  105 + if power and save then
  106 + return string.tformat("(%s vs %s)", power, save)
  107 + else
  108 + return _t"(bypass saves)"
  109 + end
110 110 end
\ No newline at end of file
... ...