Make it to Los Angeles
Build your career, gain fans, release hits, and survive the rap world.
/* ---------------- CHARACTERS ---------------- */ const chars = { Hustopher:{money:0,health:100,hype:20,fans:5,followers:50,rep:10,city:"Owensboro"}, Swoop:{money:0,health:100,hype:25,fans:10,followers:200,rep:15,city:"Louisville"}, Xando:{money:0,health:100,hype:15,fans:5,followers:100,rep:5,city:"Indianapolis"} };
const cities=["Owensboro","Louisville","St Louis","Chicago","Denver","Vegas","Los Angeles"]; const travelCost=[0,50,80,100,120,150,0];
let p; let days=30; let cityIndex=0; let merch={shirts:0,hoodies:0,stickers:0}; let dailyLog=[]; let sideActionsLeft=3; let billboard=[]; let singles=[];
/* ---------------- UPDATE UI ---------------- */ function update(){ document.getElementById("name").innerText=p.name; document.getElementById("city").innerText="Location: "+p.city; document.getElementById("days").innerText="Days Left: "+days;
document.getElementById("stats").innerHTML=
"Money: $" + p.money +
"
Health: " + p.health +
"
Hype: " + p.hype +
"
Fans: " + p.fans +
"
Rep: " + p.rep;
document.getElementById("social").innerHTML= "Followers: " + p.followers;
document.getElementById("merch").innerHTML=
"Shirts: " + merch.shirts +
"
Hoodies: " + merch.hoodies +
"
Stickers: " + merch.stickers;
renderMap(); }
/* ---------------- START GAME (WORDPRESS SAFE) ---------------- */ function startGame(){
let name=document.getElementById("artistName").value||"Unnamed Artist"; let route=document.getElementById("route").value;
let keys=Object.keys(chars); let pick=keys[Math.floor(Math.random()*keys.length)];
p={...chars[pick]}; p.name=name;
if(route==="Rich") p.money=1000; if(route==="Popular") p.followers+=300; if(route==="Street") p.money=300;
days=30; cityIndex=0;
document.getElementById("intro").style.display="none"; document.getElementById("game").style.display="block";
update(); nextEvent(); }
/* ---------------- MAP ---------------- */
function renderMap(){
let html="";
cities.forEach((c,i)=>{
html+=(i===cityIndex?"["+c+"]":c);
if(i
let pick=e[Math.floor(Math.random()*e.length)];
eventBox.innerText=pick.text;
let btn=document.createElement("button"); btn.innerText="Do it"; btn.onclick=()=>{ pick.action(); update(); };
choices.appendChild(btn); }
/* ---------------- NEXT DAY ---------------- */ function nextDay(){ days--;
if(days<=0){
return endGame();
}
update();
nextEvent();
}
/* ---------------- TRAVEL ---------------- */
function travel(){
if(cityIndex
fetch("/wp-admin/admin-ajax.php", { method:"POST", headers:{"Content-Type":"application/x-www-form-urlencoded"}, body:new URLSearchParams({ action:"raptrail_save_score", name:p.name, result:result, followers:p.followers, money:p.money, rep:p.rep }) });
alert("Career Result: " + result); location.reload(); }
🏆 Rap Trail Leaderboard
- No scores yet.