Ace Attorney Wiki
Flanqer (talk | contribs)
(throw in some debug code)
Flanqer (talk | contribs)
(not parent)
Line 164: Line 164:
   
 
function p.previousEntry(frame)
 
function p.previousEntry(frame)
local index = frame:getParent().args[1] or 1
+
local index = frame.args[1] or 1
local order = frame:getParent().args[2] or "original"
+
local order = frame.args[2] or "original"
 
 
 
if index > 1 and index <= table.maxn( episodeList[ order ] ) then
 
if index > 1 and index <= table.maxn( episodeList[ order ] ) then
return episodeList[order][index - 1] .. " (" .. index .. " , " .. order .. ")"
+
return episodeList[order][index - 1]
 
else
 
else
return "None" .. " (" .. index .. " , " .. order .. ")"
+
return "None"
 
end
 
end
 
end
 
end
   
 
function p.nextEntry(frame)
 
function p.nextEntry(frame)
local index = frame:getParent().args[1] or 1
+
local index = frame.args[1] or 1
local order = frame:getParent().args[2] or "original"
+
local order = frame.args[2] or "original"
 
 
 
if index > 0 and index < table.maxn( episodeList[ order ] ) then
 
if index > 0 and index < table.maxn( episodeList[ order ] ) then
return episodeList[order][index + 1] .. " (" .. index .. " , " .. order .. ")"
+
return episodeList[order][index + 1]
 
else
 
else
return "None" .. " (" .. index .. " , " .. order .. ")"
+
return "None"
 
end
 
end
 
end
 
end

Revision as of 15:08, 14 September 2019

Module for storing and manipulating various data about the cases/episodes throughout the Ace Attorney series. Pretty much replaced by a wikitext-based solution, but kept around as a reference.


-- Module for storing and manipulating various data about the cases/episodes
-- throughout the Ace Attorney series. WIP
-- Author: User:Capefeather

-- Done: Full episode release order list (Japan).
-- To do (maybe): Chronological case order, NA release order list, main series
-- only release order list

local p = {}

local episodeList = {

    ["original"] = {
        "The First Turnabout",
        "Turnabout Sisters",
        "Turnabout Samurai",
        "Turnabout Goodbyes",
        "The Lost Turnabout",
        "Reunion, and Turnabout",
        "Turnabout Big Top",
        "Farewell, My Turnabout",
        "Turnabout Memories",
        "The Stolen Turnabout",
        "Recipe for Turnabout",
        "Turnabout Beginnings",
        "Bridge to the Turnabout",
        "Rise from the Ashes",
        "Turnabout Trump",
        "Turnabout Corner",
        "Turnabout Serenade",
        "Turnabout Succession",
        "Turnabout Visitor",
        "Turnabout Airlines",
        "The Kidnapped Turnabout",
        "Turnabout Reminiscence",
        "Turnabout Ablaze",
        "Turnabout Target",
        "The Imprisoned Turnabout",
        "The Inherited Turnabout",
        "The Forgotten Turnabout",
        "The Grand Turnabout",
        "On a Dark and Stormy Night",
        "English Turnabout",
        "Mysterious Labyrinthia",
        "The Fire Witch",
        "The Great Witch",
        "The Golden Court",
        "A Taste of Despair",
        "Secrets of the Underground Ruins",
        "The Story's End",
        "The Final Witch Trial",
        "The Last Inquisitor",
        "The First Story",
        "Reunion",
        "London",
        "Another Visit",
        "Flour Everywhere",
        "At the Market",
        "Awkward Moments",
        "Making Money",
        "Tavern Tale",
        "Festival Fever",
        "Shady Types",
        "Fire Festival",
        "A Fond Farewell",
        "Turnabout Countdown",
        "The Monstrous Turnabout",
        "Turnabout Academy",
        "The Cosmic Turnabout",
        "Turnabout for Tomorrow",
        "Turnabout Reclaimed",
        "The Adventure of the Great Departure",
        "The Adventure of the Unbreakable Speckled Band",
        "The Adventure of the Runaway Room",
        "The Adventure of the Clouded Kokoro",
        "The Adventure of the Unspeakable Story",
        "The Foreign Turnabout",
        "The Magical Turnabout",
        "The Rite of Turnabout",
        "Turnabout Storyteller",
        "Turnabout Revolution",
        "Phoenix Wright: Asinine Attorney",
        "Apollo Justice: Asinine Attorney",
        "Turnabout Time Traveler",
        "The Adventure of the Blossoming Attorney",
        "The Memoirs of the Clouded Kokoro",
        "The Return of the Great Departed Soul",
        "Twisted Karma and His Last Bow",
        "The Resolve of Naruhodō Ryūnosuke"
    },
    ["chronological"] = {   
        -- "Murder of Klimt van Zieks",
        -- "Murder of Genshin Asōgi",
        "''The Adventure of the Great Departure''",
        "''The Adventure of the Unbreakable Speckled Band''",
        "''The Adventure of the Runaway Room''",
        "''The Adventure of the Clouded Kokoro''",
        "''The Memoirs of the Clouded Kokoro''",
        "''The Adventure of the Unspeakable Story''",
        "''The Adventure of the Blossoming Attorney''",
        "''The Return of the Great Departed Soul''",
        "''Twisted Karma and His Last Bow''",
        "''The Resolve of Naruhodō Ryūnosuke''",
        "IS-7 Incident",
        "Class trial",
        "DL-6 Incident",
        "Assassination attempt of Amara Sigatar Khura'in", -- probably will change name
        "SS-5 Incident",
        -- "Kidnapping of Dahlia Hawthorne",
        "KG-8 Incident",
        -- "Death of Manuel",
        "''Turnabout Reminiscence''",
        "''Turnabout Beginnings''",
        "''Turnabout Memories''",
        "SL-9 Incident",
        -- "Suicide of Celeste Inpax",
        -- "Zak & Valant's Quick-Draw Shootem",
        -- "Grey Surgical Clinic malpractice incident",
        "''The First Turnabout''",
        "''Turnabout Sisters''",
        "''Turnabout Samurai''",
        "''Turnabout Goodbyes''",
        "''Rise from the Ashes''",
        -- "Incident with Léon",
        "''Reunion, and Turnabout''",
        "''The Lost Turnabout''",
        "''Turnabout Big Top''",
        "''Farewell, My Turnabout''",
        "''The Stolen Turnabout''",
        "''Recipe for Turnabout''",
        "''Bridge to the Turnabout''",
        "''Turnabout Airlines''",
        "''The Kidnapped Turnabout''",
        "''Turnabout Visitor''",
        "''Turnabout Ablaze''",
        "''Turnabout Target''",
        "''The Imprisoned Turnabout''",
        "''The Inherited Turnabout''",
        "''The Forgotten Turnabout''",
        "''The Grand Turnabout''",
        -- "''Turnabout Succession''",
        "UR-1 Incident",
        -- "Shooting of Wocky Kitaki",
        "''Turnabout Trump''",
        "''Turnabout Corner''",
        "''Turnabout Serenade''",
        "''Turnabout Succession''",
        -- "Death of Azura Summers",
        "''The Monstrous Turnabout''",
        "''Turnabout Reclaimed''",
        "''Turnabout Academy''",
        -- "Buff residence arson incident",
        "''The Cosmic Turnabout''",
        "''Turnabout Countdown''",
        "''Turnabout for Tomorrow''",
        "''The Foreign Turnabout''",
        "''The Magical Turnabout''",
        "''The Rite of Turnabout''",
        "''Turnabout Storyteller''",
        "''Turnabout Revolution''",
        "''Turnabout Time Traveler''"
    }
}

function p.previousEntry(frame)
    local index = frame.args[1] or 1
    local order = frame.args[2] or "original"
  
    if index > 1 and index <= table.maxn( episodeList[ order ] ) then
        return episodeList[order][index - 1]
    else
        return "None"
    end
end

function p.nextEntry(frame)
    local index = frame.args[1] or 1
    local order = frame.args[2] or "original"
  
    if index > 0 and index < table.maxn( episodeList[ order ] ) then
        return episodeList[order][index + 1]
    else
        return "None"
    end
end

return p