Jump to content

Elin:Code Analysis/Ether Diseases: Difference between revisions

No edit summary
Line 1: Line 1:
{{spoiler}}
{{spoiler}}


==Ether Diseases (EA23.61)==
 
 
This page analyze the '''Ether Diseases''' of this world. The latest version this analysis is updated to is '''EA23.61 Hotfix3'''.
 
Be careful when adding information from here to the main wiki, since a lot of the information here is not obtainable unless you dig into codes.
 
== Ether Diseases ==
===Depiction of Ether Disease in code: an Index===
===Depiction of Ether Disease in code: an Index===
<syntaxhighlight lang="c#" line="1">
<syntaxhighlight lang="c#" line="1">
Line 175: Line 181:
* This code appears when a Karma negative modification need to be calculated. Your karma decrease will be cut to 30%, round down to nearest integer.
* This code appears when a Karma negative modification need to be calculated. Your karma decrease will be cut to 30%, round down to nearest integer.
* So -5 becomes -1, -1 becomes 0.
* So -5 becomes -1, -1 becomes 0.
=== Stupid (Dementia) ===
<syntaxhighlight lang="c#" line="1">
    case 1561:
ModBase(61, -a * 15, hide: false);
ModBase(76, -a * (4 + num / 3), hide: false);
break;
</syntaxhighlight>
* This disease decrease your mana by a flat 15, then decrease your MAG by (4 + Character LV / 3).
=== Weak (Weakening)===
<syntaxhighlight lang="c#" line="1">
    case 1560:
ModBase(60, -a * 15, hide: false);
ModBase(70, -a * (4 + num / 3), hide: false);
break;
</syntaxhighlight>
* This disease decrease your life by a flat 15, then decrease your STG by (4 + Character LV / 3).
=== Addict (Potion Addict) ===
<syntaxhighlight lang="c#" line="1">
    if (EClass.rnd(30) == 0 && EClass.pc.HasElement(1559))
{
List<Thing> list = EClass.pc.things.List((Thing a) => a.trait is TraitPotion, onlyAccessible: true);
if (list.Count > 0)
{
EClass.pc.Drink(list.RandomItem());
EClass.player.EndTurn();
}
}
</syntaxhighlight>
* For a 1/30 chance each round, you will consume a potion, and end your turn.
=== Rain (Living Humidifier) ===
<syntaxhighlight lang="c#" line="1">
    if (condition == Condition.Fine)
{
foreach (Chara member in EClass.pc.party.members)
{
if (member.HasElement(1558) && EClass.rnd(4) == 0)
{
condition = Condition.Rain;
Msg.Say("drawRain", member);
break;
}
}
}
</syntaxhighlight>
* Whenever it is time to set weather of the world, for EACH MEMBER of your team with this disease, 25% chance this will change the weather to rain.




[[Category: EN]]
[[Category: EN]]
[[Category: Elin Spoiler]]
[[Category: Elin Spoiler]]
362

edits