Engine:修订间差异
来自Corruption of Champions II Bilingual Wiki
更多操作
src->MicroTG 无编辑摘要 |
src->MicroTG Add more stuff |
||
| 第5行: | 第5行: | ||
== Basic Details == | == Basic Details == | ||
Unlike [https://wiki.smutosaur.us/CoC/Main_Page Corruption of Champions], which was written in [[wikipedia:ActionScript#ActionScript 3.0 | Action Script 3.0]], [[Main Page | Corruption of Champions 2]] is written in [[wikipedia:Javascript | Javascript]], allowing for easier cross-platform support. The engine itself pulls heavily from the original Corruption of Champions, with data structures remaining almost identical. The functionality has been rewritten for Javascript. | Unlike [https://wiki.smutosaur.us/CoC/Main_Page Corruption of Champions], which was written in [[wikipedia:ActionScript#ActionScript 3.0 | Action Script 3.0]], [[Main Page | Corruption of Champions 2]] is written in [[wikipedia:Javascript | Javascript]], allowing for easier cross-platform support. The engine itself pulls heavily from the original Corruption of Champions, with data structures remaining almost identical. The functionality has been rewritten for Javascript. | ||
== Data Structures == | |||
{|class="wikitable" | |||
|+ Character | |||
! Property !! Type !! Description !! Notes | |||
|- | |||
| <code>name</code> || <code>string</code> || Character name|| | |||
|- | |||
| <code>cName</code> || <code>string?</code> || Unknown || | |||
|- | |||
| <code>soloCombatPrefix</code> || <code>string</code> || Used in combat somewhere, presumably prefixing some element of combat text || | |||
|- | |||
| <code>reagents</code> || <code>Object<number, number></code> || [[Reagents]] (ingredients) currently held by the character || | |||
{|class="wikitable" | |||
|+ Reagent Numberings | |||
! Key !! Reagent Name | |||
|- | |||
| 1 || [[Reagents#Mandrake Root | Mandrake Root]] | |||
|- | |||
| 2 || [[Reagents#Yew Branch | Yew Branch]] | |||
|- | |||
| 3 || [[Reagents#Soft Mud | Soft Mud]] | |||
|- | |||
| 4 || [[Reagents#Laurel Sprig | Laurel Sprig]] | |||
|- | |||
| 5 || [[Reagents#Tall Reed | Tall Reed]] | |||
|- | |||
| 6 || [[Reagents#Turgid Mushroom | Turgid Mushroom]] | |||
|- | |||
| 7 || [[Reagents#Sweet Cream | Sweet Cream]] | |||
|- | |||
| 8 || [[Reagents#Chestnut | Chestnut ]] | |||
|- | |||
| 9 || [[Reagents#Wild Melon | Wild Melon]] | |||
|- | |||
| 10 || [[Reagents#Juicy Peach | Juicy Peach]] | |||
|- | |||
| 11 || [[Reagents#Lush Orchid | Lush Orchid]] | |||
|- | |||
| 12 || [[Reagents#Musky Sap | Musky Sap]] | |||
|- | |||
| 13 || [[Reagents#Motherwort | Motherwort]] | |||
|} | |||
|} | |||
== Variables == | |||
Below are important variables. | |||
=== Player Party (<code>window.PlayerParty</code>) === | |||
{|class="wikitable" | |||
! Javascript Variable Name !! Type !! Description !! Notes | |||
|- | |||
| <code>PlayerParty.members</code> || Array || Array of characters in the players party. Player Character is stored at index <code>0</code> || | |||
|} | |||
=== Player Variables (<code>window.PlayerParty.members[0]</code>) === | |||
2018年9月22日 (六) 16:28的最新版本
This page details the internal workings of the CoC 2 engine
Basic Details
Unlike Corruption of Champions, which was written in Action Script 3.0, Corruption of Champions 2 is written in Javascript, allowing for easier cross-platform support. The engine itself pulls heavily from the original Corruption of Champions, with data structures remaining almost identical. The functionality has been rewritten for Javascript.
Data Structures
| Property | Type | Description | Notes | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
string |
Character name | |||||||||||||||||||||||||||||
cName |
string? |
Unknown | |||||||||||||||||||||||||||||
soloCombatPrefix |
string |
Used in combat somewhere, presumably prefixing some element of combat text | |||||||||||||||||||||||||||||
reagents |
Object<number, number> |
Reagents (ingredients) currently held by the character |
|
Variables
Below are important variables.
Player Party (window.PlayerParty)
| Javascript Variable Name | Type | Description | Notes |
|---|---|---|---|
PlayerParty.members |
Array | Array of characters in the players party. Player Character is stored at index 0 |