Editing
Isotopeia:Electron neutrino
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Quality}} Electron neutrinos (symbolized as <code>elnn</code>, <code>en</code>, V<sub>e</sub>, or <math>V_e</math>) are the 1st of the three currencies in Isotopeia. == In prestige == Each <math>1.5\cdot10^{21}</math> electron neutrinos contributes 1 positron to the prestige counter. == In the source code == The electron neutrino counter is a variable written as <code>elnncn</code>, and is stored in <code>localStorage</code> as <code>JSON.parse(localStorage.getItem("ucc"))[1]</code>. To increment the counter by your <math>V_e / c</math> (electron neutrinos per click), use <code>electronn(elnpc)</code>, which increments the ELECTRON Neutrinos by the ELectroN Neutrinos Per Click. The (hopefully accurate) counter of <math>V_e / s</math> (electron neutrinos per second) can be found in the variable <code>elnps</code> and recalculated using <code>updatePerSecond()</code>. === <code>BuildingEN</code> === The class-ified implementation of electron buildings can be found under the name <code>BuildingEN</code> in <code>buildinglib.js</code>. The constructor contains 5 positional arguments: * <code>price</code>: the price of the building, * <code>name</code>: the display name of the building (shown to the user), * <code>ps</code>: the per-second gain of the building with 0 positrons, * <code>rspot</code>: the index of the building, which is auto-defined in <code>jtopia.js</code>. ==== Variables ==== The following list contains all of the methods contained and implemented in <code>BuildingEN</code>. ===== <code>int count</code> ===== The number of buildings owned globally by the player. ===== <code>int initPrice</code> ===== The starting price of the building, unaffected by any number of the building. ===== <code>str name</code> ===== The display name of the building that is shown to the player in places like the button name for purchasing the buildin g ===== <code>str id</code> ===== The camelCase-named identifier for the building. This ID should avoid abbreviating unless the building's name is subjectively "too long." ===== <code>double ps</code> ===== The amount this building provides per second, unbuffed by positrons. ==== Methods ==== The following list contains all of the methods implemented in <code>BuildingEN</code>. ===== <code>void .buy(int n = 1)</code> ===== Purchases the amount <code>n</code> (by default, <code>1</code>) of an electron neutrino building, if you have the required electorn neutrinos. ===== <code>void .interval()</code> ===== Starts an interval to gain <code>this.ps</code> electron neutrinos per second. This is added to the <code>intervals</code> variable so that it can be cleared later. ===== <code>void .buildUI(bool isModded = false)</code> ===== Constructs the UI/purchase menu for this building. Note that <code>isModded</code> is not needed and should always be unset or <code>false</code>, but this is by default <code>false</code>. ===== <code>void .refreshCount()</code> ===== Refreshes this building's internal count for how many there are of this building. This affects the price calculated via an recursive function defined as follows: <math> p_{n+1} = \left \lfloor 1.25p_n \right \rfloor </math> ...where <math>p_{n+1}</math> is defined as the new price for this building after <math>n</math> buildings, <math>n</math> as the current number of buildings owned, <math>p_n</math> as the previous building price. <math>p_0</math> is also defined as the initial price of the building, as <code>this.price</code> in code. ===== <code>void .refreshIntervals()</code> ===== <code>refreshIntervals</code> simply starts <code>this.count</code> intervals after refreshing the count using <code>.refreshCount()</code>. Note that this method does <b>not</b> restart current intervals, but instead starts new ones.
Summary:
Please note that all contributions to matthyWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
MatthyWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Quality
(
edit
)
Template:QualityStars
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Isotopeia
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information