8,756
edits
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
local zlib = mw.ext.zlib | local zlib = mw.ext.zlib | ||
local | local utilTable = require('Module:Table Utility') | ||
local data = require('Module:CryptogullJr/Data') | local data = require('Module:CryptogullJr/Data') | ||
local p = {} | local p = {} | ||
Line 23: | Line 23: | ||
local version = decoded["gameversion"] | local version = decoded["gameversion"] | ||
local genotype = decoded["modules"][1]["data"]["Genotype"] | local genotype = decoded["modules"][1]["data"]["Genotype"] | ||
local | local classCalled = "Calling: " | ||
local | local extCalled = "Mutations: " | ||
local subtype = decoded["modules"][2]["data"]["Subtype"] | local subtype = decoded["modules"][2]["data"]["Subtype"] | ||
local | local baseStat = 10 | ||
local stats = nil | local stats = nil | ||
local | local bonusInt = {} | ||
local exts = {} | local exts = {} | ||
local bonus = { | local bonus = { | ||
Line 41: | Line 41: | ||
if genotype == "True Kin" then | if genotype == "True Kin" then | ||
-- if true kin, stats are [3] and cybernetics are [4] | -- if true kin, stats are [3] and cybernetics are [4] | ||
classCalled= "Caste: " | |||
extCalled = "Cybernetics: " | |||
stats = decoded["modules"][3]["data"]["PointsPurchased"] | stats = decoded["modules"][3]["data"]["PointsPurchased"] | ||
-- No cybernetics means extra toughness | -- No cybernetics means extra toughness | ||
Line 58: | Line 58: | ||
end | end | ||
for | -- add 10 to stats chosen... | ||
stats[ | for statName, statValue in pairs(stats) do | ||
stats[statName] = stats[statName] + baseStat | |||
end | end | ||
for name, num in pairs( | -- Add stat bonuses from subtype and mutations/cybernetics... | ||
local bonusInt= data.getTotalStatBonuses(subtype, ext) | |||
for name, num in pairs(bonusInt) do | |||
if num > 0 then | if num > 0 then | ||
bonus[name] = "+" .. num | bonus[name] = "+" .. num | ||
Line 90: | Line 91: | ||
ego = attributes["Ego"] .. bonus["Ego"], | ego = attributes["Ego"] .. bonus["Ego"], | ||
extname = extnameIn, | extname = extnameIn, | ||
exts = | exts = utilTable.concat(exts, ", ") | ||
} | } | ||
} | } |