Page: [root]/scripts/facshuf.erb | src | log | faq | css

<h1> List of factions in Alpha Centauri, shuffled and trimmed to 7 entries, because default randomizing sucks </h1>

<p> Makes sure you get your fair share of alien adversaries! </p>

<form action="" method="get">
<p> Player number: <input type="number" name="players" min="1" max="7" value="<%=paramsplayers || 2%>" /> <input type="submit" value="reroll" /> </p>
</form>
<p>Player <strong><%= rand((paramsplayers || 2).to_i) %></strong> is hosting </p>

<%
alllist = "Spartan Federation
Gaia's Stepdaughters
University of Planet
Peacekeeping Forces
Human Hive
Lord's Believers
Morgan Industries
Cult of Planet
Cybernetic Consciousness
Data Angels
Free Drones
Nautilus Pirates
Manifold Usurpers
Manifold Caretakers".split("\n")

faclist = alllist.shuffle[0..6]

while (faclist.include? "Manifold Usurpers") ^ (faclist.include? "Manifold Caretakers")
faclist = alllist.shuffle[0..6]
end
%>
<p>
<%= faclist.join("<br />").html_safe %>
</p>


Last edited: Voker57 on 2014-09-14 19:00:55 +0400
Powered by bitcheese wiki engine