Ace Attorney Wiki
(Pretty sure this is how you make them invokable lol)
(Adding category)
(20 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
-- Author: User:Capefeather
 
-- Author: User:Capefeather
   
-- Done: Full episode release order list (Japan).
+
-- Done: Full episode release order list (Japan), chronological case order
-- To do (maybe): Chronological case order, NA release order list, main series
 
-- only release order list
 
   
 
local p = {}
 
local p = {}
   
  +
local episodeList = {
function index(list, keyword)
 
  +
for i, v in ipairs(list) do
 
if v == keyword then
+
["original"] = {
return i
+
"The First Turnabout",
end
+
"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''"
  +
}
  +
}
  +
  +
local function jumpToEntry(frame, shift)
  +
local tArgs = frame:getParent()
  +
if not(tArgs.args[1]) then
  +
tArgs = frame
 
end
 
end
  +
end
 
  +
local index = tonumber( tArgs.args[1] ) or 1
  +
local order = tArgs.args[2] or "chronological"
  +
local target = episodeList[order][index + shift]
   
  +
if index + shift > 0 and index + shift <= table.maxn( episodeList[ order ] ) then
function p.previousEntry(list, keyword)
 
if index(list, keyword) > 1 then
+
if order ~= "chronological" then
return "[[" .. list[index(list, keyword) - 1] .. "]]"
+
return "''[[" .. target .. "]]''"
  +
else
  +
return target
  +
end
 
else
 
else
 
return "None"
 
return "None"
Line 25: Line 182:
 
end
 
end
   
function p.nextEntry(list, keyword)
+
function p.previousEntry(frame)
  +
return jumpToEntry(frame, -1)
if index(list, keyword) < table.getn(list) then
 
return "[[" .. list[index(list, keyword) + 1] .. "]]"
 
else
 
return "None"
 
end
 
 
end
 
end
   
  +
function p.nextEntry(frame)
p.originalReleaseOrder = {
 
  +
return jumpToEntry(frame, 1)
"The First Turnabout",
 
  +
end
"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"
 
}
 
   
  +
return p
p.chronologicalOrder = {
 
-- "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''"
 
}
 
   
  +
--[[Category:Modules]]
return p
 

Revision as of 02:28, 16 December 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), chronological case order

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''"
    }
}

local function jumpToEntry(frame, shift)
    local tArgs = frame:getParent()
    if not(tArgs.args[1]) then
        tArgs = frame
    end
 
    local index = tonumber( tArgs.args[1] ) or 1
    local order = tArgs.args[2] or "chronological"
    local target = episodeList[order][index + shift]

    if index + shift > 0 and index + shift <= table.maxn( episodeList[ order ] ) then
        if order ~= "chronological" then
            return "''[[" .. target .. "]]''"
        else
            return target
        end
    else
        return "None"
    end
end

function p.previousEntry(frame)
    return jumpToEntry(frame, -1)
end

function p.nextEntry(frame)
    return jumpToEntry(frame, 1)
end

return p

--[[Category:Modules]]