Skip to content

Commit d05820d

Browse files
authored
Merge pull request #17 from shrimpza/605
Monster Hunt 605
2 parents d51e43f + 15711d2 commit d05820d

File tree

6 files changed

+61
-7
lines changed

6 files changed

+61
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 604 to 605:
4+
- Remove automatically assigning monsters to team
5+
- Show monster names better, "KrallElite" becomes "Krall Elite"
6+
- Grammatically correct escape message
7+
38
## 603 to 604:
49
- Fix saving of game rule settings
510
- Refactor scoring implementation, including default scores for more monster types

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Monster Hunt is a team based modification for Unreal Tournament comprising two
44
new game types, Monster Hunt, Monster Arena, and Monster Defence.
55

6+
![](https://i.imgur.com/N6g9JBj.gif)
7+
![](https://i.imgur.com/RnnNFtV.gif)
8+
![](https://i.imgur.com/2tK2kiZ.gif)
9+
![](https://i.imgur.com/YxNhO7u.gif)
10+
611
In *Monster Hunt*, you and your team of hunters (humans or bots) must work your
712
way through the level while killing everything that stands in your way.
813
Monsters you'll face range from the tiny but deadly Pupae, to slimy Sliths

buildscript/buildconfig.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ SCRIPTS_DIR=$(dirname $(realpath $0))
77

88
export name="Monster Hunt"
99
export package=MonsterHunt
10-
export build=604
11-
export version=604
10+
export build=605
11+
export version=605
1212
export packagefull=$package
1313
export packagedist=$package$version
1414
export debug=1

resources/Help/MonsterHunt/ReadMe.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,13 @@ <h2 id="credits">Credits</h2>
287287
<section>
288288
<h2 id="history">Release History</h2>
289289

290+
<h3>Release 11 (605)</h3>
291+
<ul>
292+
<li>Remove automatically assigning monsters to team
293+
<li>Show monster names better, "KrallElite" becomes "Krall Elite"
294+
<li>Grammatically correct escape message
295+
</ul>
296+
290297
<h3>Release 10 (604)</h3>
291298
<ul>
292299
<li>Fix saving of game rule settings
@@ -470,11 +477,14 @@ <h2>License</h2>
470477
</p>
471478
<p>
472479
You are free to:
480+
</p>
473481
<ul>
474482
<li><b>Share</b> - copy and redistribute the material in any medium or format
475483
<li><b>Adapt</b> - remix, transform, and build upon the material
476484
</ul>
477-
Under the following terms:
485+
<p>
486+
Under the following terms:
487+
</p>
478488
<ul>
479489
<li><b>Attribution</b> - You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do
480490
so in
@@ -486,7 +496,6 @@ <h2>License</h2>
486496
<li><b>No additional restrictions</b> - You may not apply legal terms or technological measures that legally restrict others from doing
487497
anything the license permits.
488498
</ul>
489-
</p>
490499
</section>
491500

492501
</body>

src/Classes/MonsterHunt.uc

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ function bool IsRelevant(Actor Other) {
9494
pawn = ScriptedPawn(Other);
9595
if (pawn != None) {
9696
SetPawnDifficulty(MonsterSkill, pawn);
97+
pawn.MenuName = FancyName(pawn);
9798

9899
if (Level.NetMode != NM_DedicatedServer) {
99100
if (pawn.Shadow == None) pawn.Shadow = Spawn(class'MonsterShadow', pawn);
@@ -138,9 +139,43 @@ function SetPawnDifficulty(int MonsterSkill, ScriptedPawn S) {
138139
if (bGameStarted) S.AttitudeToPlayer = ATTITUDE_Hate;
139140
else S.AttitudeToPlayer = ATTITUDE_Ignore;
140141
}
142+
}
143+
144+
function String FancyName(Pawn Other, optional Bool upperArticle) {
145+
local ScriptedPawn S;
146+
local String baseName, newName, c;
147+
local int i, a, p;
148+
149+
S = ScriptedPawn(Other);
150+
if (S == None) return Other.MenuName;
151+
152+
baseName = S.MenuName;
153+
if (baseName == "") baseName = GetItemName(String(S.class));
154+
155+
newName = Left(baseName, 1);
156+
for (i = 1; i < Len(baseName); i++) {
157+
c = Mid(baseName, i, 1);
158+
p = Asc(Mid(baseName, i-1, 1));
159+
a = Asc(c);
160+
if (a >= 65 && a <= 90 && p >= 97 && p <= 122) newName = newName @ c;
161+
else newName = newName $ c;
162+
}
163+
164+
return newName;
165+
}
166+
167+
function String UppercaseFirst(String S) {
168+
local String trimmed, c;
169+
local int i, start;
170+
171+
for (i = 0; i < Len(S); i++) {
172+
if (Mid(S, i, 1) != " ") {
173+
trimmed = Mid(S, i);
174+
break;
175+
}
176+
}
141177

142-
S.TeamTag = 'MHMonsterTeam';
143-
S.Team = 128;
178+
return Caps(Left(trimmed, 1)) $ Mid(trimmed, 1);
144179
}
145180

146181
function AddDefaultInventory(pawn PlayerPawn) {

src/Classes/MonsterHuntDefence.uc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function bool IsRelevant(Actor Other) {
142142
function monsterEscaped(ScriptedPawn escapee) {
143143
MonsterReplicationInfo(GameReplicationInfo).Escapees++;
144144

145-
BroadcastMessage(escapee.GetHumanName() @ EscapedMessage, false, 'MonsterCriticalEvent');
145+
BroadcastMessage(UppercaseFirst(escapee.GetHumanName()) @ EscapedMessage, false, 'MonsterCriticalEvent');
146146

147147
if (MonsterReplicationInfo(GameReplicationInfo).Escapees >= MaxEscapees) EndGame("Monsters Escaped");
148148
}

0 commit comments

Comments
 (0)