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
Character
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 |
|
Player Variables (window.PlayerParty.members[0]
)