BlueGit

blue-star tribegen

tweaks

timfa Tim · pushed by timfa

Authored 2026-01-29 · 9 months ago

Hash
8bb1fbc64bb252cdc974941214cbd60bdeaee753
Parent
e468b3f4
3 files changed +6 −6
web/js/app.js +3 −3
@@ -601,7 +601,7 @@ class TribeGenApp
601 601 row.innerHTML = `
602 602 <label>
603 603 <input type="checkbox" class="participant-checkbox" data-id="${kobold.id}">
604 <strong>${kobold.name}</strong> (${kobold.age}y - ${kobold.ageCategory})
604 <strong>${kobold.name}</strong> (${kobold.ageCategory != "egg" ? `${kobold.age}y - ${kobold.ageCategory}` : 'egg'})
605 605 </label>
606 606 `;
607 607 const cb = row.querySelector('.participant-checkbox');
@@ -610,7 +610,7 @@ class TribeGenApp
610 610 {
611 611 row.innerHTML = `
612 612 <div class="participant-disabled">
613 <span>${kobold.name} (${kobold.age}y - ${kobold.ageCategory})</span>
613 <span>${kobold.name} (${kobold.ageCategory != "egg" ? `${kobold.age}y - ${kobold.ageCategory}` : 'egg'})</span>
614 614 <span class="disabled-reason">${reason}</span>
615 615 </div>
616 616 `;
@@ -1006,7 +1006,7 @@ class TribeGenApp
1006 1006 const severity = injury.severity ?? injury.severity ?? 1;
1007 1007
1008 1008 el.innerHTML = `
1009 <div class="injury-name">${name} (Severity: ${severity})</div>
1009 <div class="injury-name">${name}</div>
1010 1010 <div class="injury-desc">${desc}</div>
1011 1011 `;
1012 1012
@@ -601,7 +601,7 @@ class TribeGenApp
601 row.innerHTML = `
601 row.innerHTML = `
602 <label>
602 <label>
603 <input type="checkbox" class="participant-checkbox" data-id="${kobold.id}">
603 <input type="checkbox" class="participant-checkbox" data-id="${kobold.id}">
604 <strong>${kobold.name}</strong> (${kobold.age}y - ${kobold.ageCategory})
604 <strong>${kobold.name}</strong> (${kobold.ageCategory != "egg" ? `${kobold.age}y - ${kobold.ageCategory}` : 'egg'})
605 </label>
605 </label>
606 `;
606 `;
607 const cb = row.querySelector('.participant-checkbox');
607 const cb = row.querySelector('.participant-checkbox');
@@ -610,7 +610,7 @@ class TribeGenApp
610 {
610 {
611 row.innerHTML = `
611 row.innerHTML = `
612 <div class="participant-disabled">
612 <div class="participant-disabled">
613 <span>${kobold.name} (${kobold.age}y - ${kobold.ageCategory})</span>
613 <span>${kobold.name} (${kobold.ageCategory != "egg" ? `${kobold.age}y - ${kobold.ageCategory}` : 'egg'})</span>
614 <span class="disabled-reason">${reason}</span>
614 <span class="disabled-reason">${reason}</span>
615 </div>
615 </div>
616 `;
616 `;
@@ -1006,7 +1006,7 @@ class TribeGenApp
1006 const severity = injury.severity ?? injury.severity ?? 1;
1006 const severity = injury.severity ?? injury.severity ?? 1;
1007
1007
1008 el.innerHTML = `
1008 el.innerHTML = `
1009 <div class="injury-name">${name} (Severity: ${severity})</div>
1009 <div class="injury-name">${name}</div>
1010 <div class="injury-desc">${desc}</div>
1010 <div class="injury-desc">${desc}</div>
1011 `;
1011 `;
1012
1012
web/src/Classes/Tribe.php +1 −1
@@ -606,8 +606,8 @@ class Tribe
606 606 }
607 607 }
608 608 }
609 $foodStory .= "\n" . $this->tryMate();
609 610 $foodStory .= "\nIt's {$this->currentSeason}.\n";
610 $foodStory .= $this->tryMate();
611 611
612 612 foreach ($this->kobolds as $kobold) {
613 613 if ($kobold->isDead()) {
@@ -606,8 +606,8 @@ class Tribe
606 }
606 }
607 }
607 }
608 }
608 }
609 $foodStory .= "\n" . $this->tryMate();
609 $foodStory .= "\nIt's {$this->currentSeason}.\n";
610 $foodStory .= "\nIt's {$this->currentSeason}.\n";
610 $foodStory .= $this->tryMate();
611
611
612 foreach ($this->kobolds as $kobold) {
612 foreach ($this->kobolds as $kobold) {
613 if ($kobold->isDead()) {
613 if ($kobold->isDead()) {
web/src/Events/FarmingEvent.php +2 −2
@@ -55,7 +55,7 @@ class FarmingEvent extends Event
55 55 $farmer = $explorers[$i];
56 56
57 57 if (!$farmer->checkStat('will')) {
58 $farmer->addInjury("cut");
58 $farmer->addInjury("smallCut");
59 59 $this->story .= "{$farmer->getName()} had an accident plowing the field, cutting {$farmer->his()} leg with the hoe.\n";
60 60 break;
61 61 }
@@ -84,7 +84,7 @@ class FarmingEvent extends Event
84 84 for ($i = 0; $i < count($explorers); $i++) {
85 85 $farmer = $explorers[$i];
86 86
87 $farmed = rand(0, $this->tribe->foodRequirements[$farmer->getAgeCategory()] * 3);
87 $farmed = rand(0, $this->tribe->foodRequirements[$farmer->getAgeCategory()] * 6);
88 88 $totalFood += $farmed;
89 89
90 90 if ($farmed > $mostFood) {
@@ -55,7 +55,7 @@ class FarmingEvent extends Event
55 $farmer = $explorers[$i];
55 $farmer = $explorers[$i];
56
56
57 if (!$farmer->checkStat('will')) {
57 if (!$farmer->checkStat('will')) {
58 $farmer->addInjury("cut");
58 $farmer->addInjury("smallCut");
59 $this->story .= "{$farmer->getName()} had an accident plowing the field, cutting {$farmer->his()} leg with the hoe.\n";
59 $this->story .= "{$farmer->getName()} had an accident plowing the field, cutting {$farmer->his()} leg with the hoe.\n";
60 break;
60 break;
61 }
61 }
@@ -84,7 +84,7 @@ class FarmingEvent extends Event
84 for ($i = 0; $i < count($explorers); $i++) {
84 for ($i = 0; $i < count($explorers); $i++) {
85 $farmer = $explorers[$i];
85 $farmer = $explorers[$i];
86
86
87 $farmed = rand(0, $this->tribe->foodRequirements[$farmer->getAgeCategory()] * 3);
87 $farmed = rand(0, $this->tribe->foodRequirements[$farmer->getAgeCategory()] * 6);
88 $totalFood += $farmed;
88 $totalFood += $farmed;
89
89
90 if ($farmed > $mostFood) {
90 if ($farmed > $mostFood) {