Fronz-Tec – The Spirit of a glory Future

Alte Projekte angeschaut: Fallout Story Generator

Schon wieder ein neues Format? Langsam besteht dieser Blog nur aus neuen Formaten. Dieses Format ist aber etwas aussergewöhnliches. In diesem Format schaue ich Projekte an, die ich vor einiger Zeit gemacht habe und kommentiere diese.

In dieser Ausgabe: Fallout Story Generator (Steht bereits im Titel).

Dies ist ein kleines Programm, welches ich vor langer Zeit einmal entwickelt habe. Es generiert eine zufällige Fallout-Geschichte aufgrund zufällig generierten Werten.

Das Programm würde ich, wenn ich es heute entwickeln würde, anders umsetzen und die Fehler verbessern, die ich damals gemacht habe.

Ich versuche hier einmal zu erklären, wie das Progamm funktioniert, und was ich wohl dabei gedacht habe, als ich es entwickelte, auch wenn dies teilweise sehr schwer ist. Vorallem die mühsamen, nichtssagenden Variablen-Namen, die ich damals gemacht habe macht das Nachvollziehen um ein Vielfaches schwerer.

<style type="text/css">
  #show{
    display: none;
  }
  #show2{
    display: none;
  }

</style>

Hier ist das CSS. Es befindet sich im Html-File und ich habe keine Ahnung, wofür es genau ist, bzw. weshalb es überhaupt existiert. Bisher habe ich die Verwendung noch nicht gefunden, aber etwas sollte nicht angezeigt werden….

<h2 align="center">Your S.P.E.C.I.A.L Stats are:<br>

  S: <span id="demo12"></span>

  P: <span id="demo12a"></span>

  E: <span id="demo12b"></span>

  C: <span id="demo12c"></span>

  I: <span id="demo12d"></span>

  A: <span id="demo12e"></span>

  L: <span id="demo12f"></span>

</h2>
<hr>

Das ist nun die ersten Zeilen des Programms (Head- und Body-Tags habe ich mal weggelassen in dieser Anschauung). Hier werden die S.P.E.C.I.A.L. Attribute angezeigt, die zufällig generiert werden.

Man kann hier bereits sehen, wie toll die Benennung ist (Ironisch).

<h3 align="center">You are listening to <span id="radio"></span></h3>
<hr>

Dann kommt der Radiosender, den man hört. Die Bezeichnung der ID ist hier wenigstens besser. Wie man hier sieht (und auch beim vorherigen Code-Ausschnitt) habe ich damals, warum auch immer, die Ausrichtung direkt im Tag definiert, anstatt in CSS eine Klasse zu erstellen.

<h4 align="center"><span id="demo13"></span><br><span id="demo13a"></span><br><span id="demo13b"></span><br><span id="demo13c"></span><br><span id="demo13d"></span><br><span id="demo13e"></span><br><span id="demo13f"></span><br>You have <span id="demo14"></span> Healthpoints at the beginning</h4>
<button onclick="location.reload()" align="center">New Story</button>
<hr>

Nun kommt…ähm… Was genau ist das? Aufgrund der tollen Bezeichnungen habe ich keine Ahnung, was hier genau ausgegeben wird. Wie man dann später im JavaScript herausfindet, geben die “demo13”-spans Texte aus, die erscheinen, wenn ein S.P.E.C.I.A.L.-Attribut den Wert “1” hat. “demo14” gibt dann die Healthpoints aus.

Der Button für eine neue Geschichte ist auch ein Meisterwerk (wie das gesamte Programm). Einfach die gesamte Seite neu laden, um dann neue Werte zu generieren.

<h4><span id="begin"></span><br>Day 1:<br>You started to write your Journal. It is a <span id="demo"></span> Day at the <span id="demo1"></span> of <span id="demo2"></span>. You are <span id="demo3"></span>. Your weapon is <span id="demo4"></span>.<br>
Day <span id="tage"></span>:<br>You travel <span id="demo11"></span> Days and found <span id="demo5"></span> at <span id="demo6"></span>. A <span id="demo7"></span> appears which <span id="demo8"></span>. You <span id="demo9"></span>. You get <span id="demo10"></span>. After a while, you are attacked by Raiders. You fight. You get <span id="demo15"></span>

Zu viele IDs, die den Namen “demo” haben. Ich weiss nicht was schlimmer ist; dass die Benennung so furchtbar ist, oder dass die Reihenfolge der Nummerierung so komplett falsch ist.

Ich versuche einmal zu raten, was die “demos” ausgeben könnten, ohne im JavaScript nachzusehen. Der Text gibt einige Hinweise, was es ausgeben könnte.

  • demo: Ich denke, es gibt das Wetter aus.
  • demo1 & demo2: Diese könnten eine Ortsangabe sein.
  • demo3: Vielleicht Persönlichkeit…?
  • demo4: Offensichtlich die Waffe, die man hat.
  • demo11: Anzahl der Tage, wobei “tage” den Tag des Journaleintrags ausgibt.
  • demo5: Fünf nach Elf…  Vermutlich ein Fund.
  • demo6: Den Ort, wo man den Fund aus “demo5” findet.
  • demo7: Eine Begegnung.
  • demo8: Keine Ahnung.
  • demo9: Wieder keine Ahnung. Etwas mit dem Charakter, oder so…
  • demo10: Etwas das man erhält?
  • demo15: Wieder etwas das man erhält?
<div id="show"> You get <span id="reward2a"></span> You have <span id="demo14a"></span> Healthpoints left. You take <span id="med"></span>. Now you have <span id="restores"></span> Healthpoints. After some hours you are attacked by a <span id="attack"></span> and get <span id="schaden"></span><div id="show2">You become <span id="reward2"></span>. You also have <span id="gesundheit"></span> Healthpoints left. You start to travel to New Vegas.<br>

Hier wird das “show” & “show2” also verwendet. Ich wusste, dass es wichtig ist!

Hier ist das CSS. Es befindet sich im Html-File und ich habe keine Ahnung, wofür es genau ist, bzw. weshalb es überhaupt existiert. Bisher habe ich die Verwendung noch nicht gefunden, aber etwas sollte nicht angezeigt werden….

-Zitat von vorhin

Vielleicht habe ich den Nutzen angezweifelt… Im JavaScript wird dieses div sichtbar gemacht, wenn eine gewisse Bedingung erfüllt wird. Aber zum JavaScript komme ich später.

Als ich dieses Projekt wieder gefunden habe, habe ich ein wenig an meine guten Englisch-Noten gezweifelt. Vielleicht habe ich es extra so schlecht geschrieben, als eine Art Parodie? Das rede ich mir jedenfalls ein…

Day <span id="tage2"></span>:<br>You needed <span id="tage2a"></span> Days to reach New Vegas. On the way you get <span id="comp"></span> as Companion. You get a Level-Up! Now your Health is <span id="level"></span> Healthpoints! Since the NCR had won the Battle of Hoover Damm, New Vegas have changed a lot. The Strip is bigger and free for everyone. You go inside a new Casino called '<span id="casino"></span>'. You play <span id="game"></span> in the Casino and <span id="win"></span>. A drunken guy told you about a wonderfull city with the Name 'New York'. You want go to New York.<br>Day <span id="tage3"></span>:<br>You need <span id="tage3a"></span> Days to reach New York City. On the Way, your Companion died.(I'm also sad about that..) and <span id="verrückt"></span> New York is very radioactive. Just in Manhattan exploded 6 Atombombs. You take Rad-X and Rad-Away and wear your Chemical-Suit. You seea Vault Door under the Ruins of the Empire State Building. You go inside...<br>To be continued.</div></div></h4>

Habe ich eigentlich schon erwähnt, dass die Formatierung des Codes furchtbar ist? Nein? Die Formatierung des Codes ist furchtbar, wie auch die Rechtschreibung. Nur um das mal gesagt zu haben.

<span id="verrückt"></span>

Die ID passt hier perfekt. Es ist tatsächlich verrückt, ein “ü” zu verwenden. Weshalb nur?!

<script type="text/javascript">

Nun kommt die tiefsten Abgründe dieses Projektes; Das JavaScript.

var color =["#633517","#a6001a","#e06000","#ee9600","#ffab00","#004d33","#00477e","#4C6A92","#92B6D5","#838487","#B93A32","#D8AE47"];
var site = ["bad", "wierd", "strange", "sunny", "cold", "boring", "hot", "dark", "sad", "funny", "nice", "new", "special", "normal","stormy","rainy","foggy","cloudy"];
var ort = ["Town", "City","Community", "Ruins", "Village", "Wasteland", "Base", "Vault","Institute", "Casino", "Factory","Café", "Park","Radio","Hotel","Motel","Jail","Outpost"];

Bisher nichts Besonderes.

var ortschaft =["Megaton", "Tenpenny Tower", "Goodsprings", "Diamond City", "Boston","Goodneighbor","New Vegas", "Sierra Madre", "Big MT.", "Shinderdale", "Nuka World","Raven Rock", "a random Place","Far Harbor","Washington DC.","New Reno","Galaxy News Radio","Covenent", "WRVR","Diamond City Radio","Vault City","Vault-Tec HQ","the Pitt","Ronto","Atomcity","Paradise Falls","Vault 1080","Vault 101","Vault 21","Vault 111","Vault 114","Vault 13","Junktown","Boston Commons","Pentagon","New York","New Orleans","The Fens","Vault 19","Vault 118"];

Einige kreative Orte. Vorallem “a random place”.

var person =["Courier six(not that one from Fallout New Vegas)", "the lone Wanderer(not that one from Fallout 3)", "the sole Wanderer(not that one from Fallout 4)","a Ghul","a paladin of the Brotherhood of steel","Dessert Ranger","a raider","a scientist from the Institute","a member of the Enclave","a soldier of Caesar's Legion","a soldier of the NCR","a member of the Brotherhood of Steel Outcast","a member of the Illuminati(They still exists!)","a Synth"];

Ein paar kreative Charaktere für die Geschichte.

var waffe =["a Pipe Gun","the Fat-Man","a Laser Gun","a Plasma Gun","a Rifle","just your hands","a Gatling-Laser","a Minigun","a Double-Barrel Shotgun","some gun you found in a trash can","a pistol you found at a dead body","a 44. Magnum","a .45 Magnum"," a.357 Pistol","a Sniper","a Minigun","a Little Boy","an Alien Blaster","a Junk-Jet","Gauss Rifle"];

Einige Waffen…

var fund =["a Nuka Cola", "a Vault-Boy Bubblehead", "20 Caps", "Ammo","a new loacation","a strange thing","a Grognak Comic","a Vault 13 Suit","a Sunset Sarsaparilla","a Nuka Cola Victory","a Nuka Cola Wild", "a Nuka Cola Quantum", "a Vault 77 Suit","a bottle water","20000 Caps under the sea","Nuka Cola Orange","Nuka Cola Grape","a rare Nuka Cola Clear(Prototyp)","Nuka Cola Quartz","Vim!","a T-45 Power Armor","a T-51 Power Armor","a T-60 Power Armor","a X-01 Power Armor", "a Raider Power Armor","1 Cap","a Vault 101 Suit","Pip-Boy 3000 Mk 3","Pip-Boy 3000 Mk 4","Pip-Boy 2000","You're Special Book","a Illuminati Power Armor","the Book: Illuminatiam: The first Testament(Buy it in the Real World and find the Truth! It costs just about 10$ on Amazom!)"];

Fundsachen, die man finden kann. Was es mit der letzten Sache auf sich hat? Ich habe keine Ahnung, warum ich das hinzugefügt habe. Vermutlich irgendein Inside-Joke, an den ich mich nicht mehr erinnere.

var enemy=["wild Ghul","Ghul","member of the Enclave","random Guy","Stranger","Slave","Synth","Raider","Glitch","Bug","ERROR","corrupted Savefile","Mr. Handy","Mr. Gutsy","Dog","Idiot","Institute Runner","Supermutant","Vault-Dweller","Gunner","Boomer","Mirelurk","Rad-Scorpion","Assasin","Slaver","chinese Soldier"];

Bugs und Glitches, wie auch ein Corrupted Savefile können zum Gegner werden.

var gefühl=["is friendly to you","is neutral to you","is loving you","have random feelings to you","hates you","want to kill you","following you","is liking you","want you to join him","want do something strange to you."];

Findet ihr den (bzw. die) Fehler?

var aktion=["kill him","burying him alive","help him","sell him to Slavers","bring him to the Institute","make something wierd with him","eating his flesh","burning him alive","trade with him","talk with him for a while","ignoring him","steal everything he have","throw stones at him","read with him a book","play with him Pip-Fall on your Pip-Boy"];

Tolle Aktionen, die man zufällig tun kann.

var reward=["bad Karma","good Karma", "10xp", "random XP","20xp","50xp","100xp","10 Caps","100 Caps", "200 Caps","Ammo","666 Caps","a Vault 1080 Terminal Graphic Card","Water","Scrap","something you believe it is a finger of a Human"];

Auch sehr kreative Belohnungen.

var medikamente=["Stimpak","Buffout","Water","Dirty Water","Aqua Pura","Brhamin Meat","Radroach Meat","Human Flesh","Nuka Cola","Deezer's Lemonade","random Drugs","something you found in the toilet"];
var companion=["Strong","Piper","Veronica","Paladin Danse","Curie","Fawkes","Dogmeat","Nick Valentine","Cait","ED-E","a random guy","Homer Simpson(He is now in Fallout!)","Fronz-Tec","a Synth","Nuka-Bot","Codsworth","Mr. House","the Storyteller","Rex","the King","Dessert Ranger","Duke Nukem","Doom Marine","Vault Boy","Vault Girl","Vault-Tec Guy","a talking Skeleton","That Fronz(Youtube Channel of Fronz-Tec)","Super Mario","General Autumn","Victor","Preston Garvey"];

So viele Anspielungen.

var casinoname=["Lucky Mushroom","The Mushroom Cloud","The Cloud","Mega-Luxe","Vault 21 Resort","The Two-headed Bear Casino","Casino Madness","Courier Casino","Lucky 21 Casino & Resort","Casino of Refreshment","The Trumpf Casino","Flamingo","Luxory","Lone Wanderer Casino","The wanderer Casino","Three (insane) Dogs","Glory Americana Casino","Victor's Inn","Fronz-Tec Casino & Resort"];
var casinogame=["Roullette","Slot Machine","Black Jack","Poker","Lotto"];
var casinowin=["you win 20 Caps","you lose 20 Caps","you win 100 Caps","you lose 100 Caps","you win 200 Caps"," you lose 200 Caps","you win 1000 Caps","you lose 1000 Caps","you lose 2000 Caps","you lose everything","you win 1 Cap","you win the Highroller-Suite","you lose your house","win a can of Beans"];

Hier einige Sachen, die sich dann auf den New Vegas Part der Geschichte beziehen.

var anfang=["You are born in Vault 101-b (The same Experiment as Vault 101). You spend your whole life in this Vault. The Vault-Door are closed since the Bombs destroyed Humanity. But now, you Father somehow leaved the Vault and caused Trouble. Now you are leaving the Vault and discover the Wasteland.","You have a nice Life with your family in the New California Republic. But during the second Battle of Hoover Damm, your Family was killed by soldiers of Ceasar's Legion. Without a purpose now, you wandering around the Wasteland of the United States to find a new meaning of Life.","You remember nothing....","You was grew up in the City of New Reno. You are addicted to Jet and other Chems. You lived in a small, ugly house. Some Day, after a Night with a Party. You woke up somewhere you was never before. 'What happend to me?' you ask yourself....","A Long Time ago, before the War, that doomed Humanity, you fight at the Battle of Anchorage. You died at the Battlefield. Many years after, the Enclave found your frozen body and brought you back to live. You lived some years at the Enclave Base in Anchorage before you leaved Anchorage and wandering around the Wasteland","Ronto: North-Commenwealth: This was your Home. But you never liked Ronto. You heared about a City named 'New Vegas', but you don't know where it is. You begin your Journey to find fabulous New Vegas.","October 2077 Commonwealth of Pennsylvenia: It was a nice Day in the area of Washington DC. But it should be the last Day of the great country known as the United States. Atombombs destroyed this great Nation. You had 'Luck'. You have a place at Vault 112! You are trapped for over 200 years in a virtual World. A man or girl called 'the lone Wanderer' rescuede you. You survived the Rescue from Vault 112. You are now in a whole new World!","You was shot in the Head. Now you have no memory about your Life...","After the Victory of the Institute over the Brotherhood of Steel, the Enclave came back to the Commonwealths of the Wasteland. America will be rebuild! What have it to do with your Life? I don't know! Imagine something cool for your Life!","You was a member of the Illuminati before the great War. You and the other members of the Illuminati was putten into gyrosleep. You woke up in the Year 2291."];

Verschiedene Anfangsgeschichten. Ziemlich seltsam, aber kreativ!

var radioactivity=["Galaxy News Radio","Radio Enclave","Diamond City Radio","Raider Radio","WRVR","Radio Freedom","Agathas Song","Old World Tunes","Radio Illuminati","Radio New Vegas","Radio Mojave","Classical Music","Black Mountain Radio","Some random Radio Music by a random guy from a random Radio Station(That is the Name of the Radio! Don't blame me!)",];

Verschiedene Radiostationen. “radioactivity”, wirklich sehr kreativ.

var verrücktedinge=["you get a tatoo of Sugar Bombs on your head.","you was the person who killed your own Companion!","you killed children","you become a ugly Ghul!","you become a member of the Fanclub of Giddyup Buttercup","you get tatoos of random things on your whole body.","you destroyed the Institute.","you find nuclear weapons and launch it to Vault 13!","you become a kidnapper.","you become addicted to Psycho.","you eat a Toast with human flesh","you become rich","you selled your own child to Slavers!","you burned down Diamond City.","you selled drugs to children!","your Savefile become corrupted! You had to begin Fallout again!","you get a tatoo of Sugar Bombs on your head and tatoos of random things on your whole body, you was the person who killed your own Companion, you killed children, become an ugly wild Ghul, you become a member of the Fanclub of Giddyup Buttercup, you destroyed the Institute, find nuclear weapons and launch it to Vault 13, become a kidnapper, you become addicted to Psycho, eat a Toast with human flesh, you selled your own child to Slavers, burned down Diamond City and you selled drugs to children! You are a very bad Person!","you was a nice person.","You helped the Brotherhood of Steel to help the Commonwealth.","You became rich!","You found all Vault-Boy Bubbleheads! Congratulations!"];

Diese verrückten Dinge sind tatsächlich verrückt.

var verrück = verrücktedinge.length;
var ver = Math.floor((Math.random() * verrück ));

document.getElementById("verrückt").innerHTML = verrücktedinge[ver];

var radios = radioactivity.length;
var radi = Math.floor((Math.random() * radios ));

document.getElementById("radio").innerHTML = radioactivity[radi];

var anfa = anfang.length;
var anfan = Math.floor((Math.random() * anfa ));

document.getElementById("begin").innerHTML = anfang[anfan];
var casiog = casinogame.length;
var casig = Math.floor((Math.random() * casiog ));

document.getElementById("game").innerHTML = casinogame[casig];

var casiow = casinowin.length;
var casiw = Math.floor((Math.random() * casiow ));

document.getElementById("win").innerHTML = casinowin[casiw];
var casio = casinoname.length;
var casi = Math.floor((Math.random() * casio ));

document.getElementById("casino").innerHTML = casinoname[casi];
var b = site.length;
var a = Math.floor((Math.random() * b ));

document.getElementById("demo").innerHTML = site[a];

var c = ort.length;
var d = Math.floor((Math.random() * c ));

document.getElementById("demo1").innerHTML = ort[d];

var e = color.length;
var f = Math.floor((Math.random() * e ));

document.getElementById("body").style.background = color[f];

var g = ortschaft.length;
var h = Math.floor((Math.random() * g ));

document.getElementById("demo2").innerHTML = ortschaft[h];

var i = person.length;
var j = Math.floor((Math.random() * i ));

document.getElementById("demo3").innerHTML = person[j];

var k = waffe.length;
var l = Math.floor((Math.random() * k ));

document.getElementById("demo4").innerHTML = waffe[l];

var m = fund.length;
var n = Math.floor((Math.random() * m ));

document.getElementById("demo5").innerHTML = fund[n];

var o = ortschaft.length;
var p = Math.floor((Math.random() * o ));

document.getElementById("demo6").innerHTML = ortschaft[p];

var q = enemy.length;
var r = Math.floor((Math.random() * q ));

document.getElementById("demo7").innerHTML = enemy[r];

var s = gefühl.length;
var t = Math.floor((Math.random() * s ));

document.getElementById("demo8").innerHTML = gefühl[t];

var u = aktion.length;
var v = Math.floor((Math.random() * u ));

document.getElementById("demo9").innerHTML = aktion[v];

var w = reward.length;
var x = Math.floor((Math.random() * w ));

document.getElementById("demo10").innerHTML = reward[x];

var wa = reward.length;
var xa = Math.floor((Math.random() * wa ));

document.getElementById("reward2").innerHTML = reward[xa];

var wb = reward.length;
var xb = Math.floor((Math.random() * wb ));

document.getElementById("reward2a").innerHTML = reward[xb];
var y = Math.floor((Math.random() * 250 )+1);

document.getElementById("demo11").innerHTML = [y];

var yy = y + 1;
document.getElementById("tage").innerHTML = [yy];
var yyy = Math.floor((Math.random() * 250 )+1);
document.getElementById("tage2a").innerHTML = [yyy];

var yyyy = yyy + yy;
document.getElementById("tage2").innerHTML = [yyyy];

var yyyyy = Math.floor((Math.random() * 365 )+30);
document.getElementById("tage3a").innerHTML = [yyyyy];

var yyyyyy = yyyyy + yyyy;
document.getElementById("tage3").innerHTML = [yyyyyy];
var companio = companion.length;
var compani = Math.floor((Math.random() * companio ));

document.getElementById("comp").innerHTML = companion[r];

var z = Math.floor((Math.random() * 10 )+1);

document.getElementById("demo12").innerHTML = [z];

var za = Math.floor((Math.random() * 10 )+1);

document.getElementById("demo12a").innerHTML = [za];

var zb = Math.floor((Math.random() * 10 )+1);

document.getElementById("demo12b").innerHTML = [zb];

var zc = Math.floor((Math.random() * 10 )+1);

document.getElementById("demo12c").innerHTML = [zc];

var zd = Math.floor((Math.random() * 10 )+1);

document.getElementById("demo12d").innerHTML = [zd];

var ze = Math.floor((Math.random() * 10 )+1);

document.getElementById("demo12e").innerHTML = [ze];

var zf = Math.floor((Math.random() * 10 )+1);

document.getElementById("demo12f").innerHTML = [zf];

var health = Math.floor((Math.random() * 300 )+50);

document.getElementById("demo14").innerHTML = [health];

var aa = Math.floor((Math.random() * 350 )+1);

 

So wird die Ausgabe generiert. Einfach furchtbar.

if (aa>=health) {
    document.getElementById("demo15").innerHTML = [aa] + " Demage! You are Dead! Game Over";

}
else{
    document.getElementById("demo15").innerHTML = [aa] + " Demage! You survived the attack and killed all Raiders.";
    document.getElementById('show').style.display = "block";
    health = health- aa;
    document.getElementById("demo14a").innerHTML = [health];
}
var medan = medikamente.length;
var medau = Math.floor((Math.random() *medan));

document.getElementById("med").innerHTML = medikamente[medau];
var restore = Math.floor((Math.random() * 200 )+20);
health = health + restore;

document.getElementById("restores").innerHTML = [health];
var en = enemy.length;
var ene = Math.floor((Math.random() * en ));

document.getElementById("attack").innerHTML = enemy[ene];

var aaa = Math.floor((Math.random() * 300 )+10);

if (aaa>=health) {
    document.getElementById("schaden").innerHTML = [aaa] + " Demage! You are Dead! Game Over";

}
else{
    document.getElementById("schaden").innerHTML = [aaa] + " Demage! You survived the attack and killed the enemy";
    document.getElementById('show2').style.display = "block";
    health = health- aaa;
    document.getElementById("gesundheit").innerHTML = [health];
}

Schadenssystem, welches den Charakter auch sterben lassen kann. Wie das gesamte Projekt einfach nur furchtbar. Aber auch aufschlussreich, wie sehr ich mich verbessert habe.

Ich denke “Demage” war auch ein Inside-Joke damals… Hoffe ich jedenfalls.

var levup1 = Math.floor((Math.random() * 500 )+350);
health = levup1;
document.getElementById("level").innerHTML = [levup1];

Ich habe sogar eine Art Levelsystem eingebaut? Es steigert jedenfalls die Gesundheit.

    if(zd == 1){
        document.getElementById("demo13d").innerHTML = "You are very Dumb. You just can say Ugh and Ugha-Hugh";
    }
    if(z == 1){
        document.getElementById("demo13").innerHTML = "You are very weak. You can't even carry 5 pounds!";
    }
    if(za == 1){
        document.getElementById("demo13a").innerHTML = "You have a very low Perception. You just can see about 4 metres.";
    }
    if(zb == 1){
        document.getElementById("demo13b").innerHTML = "You have a very low Endurance. You just can run 10 metres without a break.";
    }
    if(zc == 1){
        document.getElementById("demo13c").innerHTML = "You have a very low Charisma. Everyone hates you!";
    }
    if(ze == 1){
        document.getElementById("demo13e").innerHTML = "You have a very low Agility. You just can walk 10 steps without falling dwon to the ground!.";
    }
    if(zf == 1){
        document.getElementById("demo13f").innerHTML = "You have a no Luck! Nothing good happens to you ;(";
    }
</script>

Und mit den Ausgaben bei niedrigen S.P.E.C.I.A.L. Werten endet das JavaScript und somit auch der Code.

Mein Fazit:

Es war amüsant, ein altes Projekt wieder auszugraben, auch wenn es ziemlich furchtbar ist.

 

Nächster in Artikel

Vorheriger in Artikel

Antworten

© 2024 Fronz-Tec

Thema von Anders Norén