FIT2099 assignment
Scenario
In Elden Ring, several hostile creatures inhabit the "Lands Between". Some of
these creatures occupy different types of environments and will attack anyone
that gets too close to their territory. Please read thoroughly; some features
might be detailed in the latter sentences.
In the starting area, the following environments and creatures can be
encountered by the player.
REQ1: Environments & Enemies
A. Environments
1. Graveyard n
It is represented as n (lowercase N) and it is occupied by the "Heavy Skeletal
Swordsman" creatures. They can be spawned from the graveyard with a 27%
chance at each turn.
2. Gust of Wind &
It is represented as & (ampersand) and it can spawn "Lone Wolf" with a 33%
chance at every game turn.
3. Puddle of Water ~
It is represented as ~ (tilde) and it has a 2% chance of spawning a "Giant
Crab".
B. Enemies
One type of enemy could attack the other type. They, however, cannot attack
their type, e.g. Lone Wolf can attack a Giant Crab, but Lone Wolf cannot attack
another Lone Wolf (except for Giant Crab & Heavy Skeletal Swordsman since
their attack damage anything in their surrounding).
If an enemy is close (one block away) to the player, they will follow the player.
Otherwise, they will wander around the map. However, suppose an enemy of
one type is close to another type of enemy. In that case, they will attack withoutfollowing them, e.g. if a Giant Crab is close to a Lone Wolf, the Lone Wolf will
attack the Giant Crab without following it.
At each turn, Giant Crabs, Lone Wolves and Heavy Skeletal Swordsmen have
a 10% chance of being despawned (removed from the map) unless they are
following the player.
1. Heavy Skeletal Swordsman q
A hostile creature, represented by q (lowercase Q), that has 153 hit points and
carries around a weapon called Grossmesser.
This creature has the following unique ability: it can become a "Pile of Bones"
(represented by X (uppercase X)) for three (3) turns if killed by other enemies
or the player. If the Pile of Bones is not hit within the three turns, the Heavy
Skeletal Swordsman will be revived with full health.
2. Lone Wolf h
A hostile creature, represented by h (lowercase H), that has 102 hit points and
bites other creatures, including the player, dealing 97 damage with 95% attack
accuracy.
3. Giant Crab C
Another hostile creature, represented by C (uppercase C), that has 407 hit
points and slams other creatures, including the player, dealing 208 damage
with 90% attack accuracy.
Instead of only attacking one particular enemy in their surroundings, the Giant
Crab may also decide to slam all creatures within their surroundings (all 8
locations), dealing the same amount of damage with the same accuracy as
their targeted attack.
Note that since their slam area attack hits anything in their surroundings, they
may hit other Giant Crabs within the attack area.
Moreover, if a Giant Crab performs the slam area attack, actor A may get hit
while actor B may not (the probability is independent between each actor, i.e.
one actor getting hit does not mean another actor will also get hit)
C. Weapons
1. Grossmesser (?)
A curved sword, represented by ? (question mark), carried around by the
Heavy Skeletal Swordsman that deals 115 damage with 85% attack accuracy.This sword allows the user to attack a single enemy within their surroundings
or to perform a spinning attack, which attacks all creatures, including the player,
within the user’s surroundings. The damage dealt and the attack accuracy for
the targeted and the spinning attack is the same.
Note that since the spinning attack hits anything in the user’s surroundings, it
may hit other actors of the same type (Heavy Skeletal Swordsman A
performing the spinning attack may accidentally hit Heavy Skeletal
Swordsman B)
If the user performs the spinning attack, actor A may get hit while actor B may
not (the probability is independent between each actor, i.e. one actor getting hit
does not mean another actor will also get hit)
Edit: Grossmesser will be dropped by Heavy Skeletal Swordsman when they
are defeated by the player (after the pile of bones is destroyed).
Implementation Expectations
1. These grounds can be directly added to the string representation of the map
(i.e., ArrayList of strings to create a map).
2. You have the freedom to design your map with these ground components if
you can demonstrate all requirements.
3. The grounds can only spawn the enemies if no other actor is standing at
that location.
4. If the player carries multiple weapons, they can decide which weapon they
want to use for attacking the enemy if they have access to that weapon in their
weapon inventory.
5. The player can also attack the hostile creature with their intrinsic weapon. If
they choose to do this, they will punch the enemy, dealing 11 damage.
6. No actor should be able to enter the Wall, represented by # (the pound sign)
Any enemies should not be able to enter a Floor, represented by _ (the
underscore)
7. Area attack cannot be chosen by the player or performed by the enemy if
there is no one to attack in the surrounding.
8. To simplify the implementation, if the enemy has multiple weapons, they will
choose the first weapon in their inventory. They will use their intrinsic weapon
to attack if they do not have any weapon.
9. If the weapon the enemy holds has a special skill, the enemy has a 50%
chance of using the weapon skill.
10. The player should display their current hit points out of their maximum hit
points, e.g. (42/100)
11. You may use the following string to create your map:..nnnn................................................~~~
~~~~~~~~~~~~~~~~~~ ......................#####....######...
...............~~~~~~~~~~~~~~~~~~~~ ..nnnn................
#..___....____#...................~~~~~~~~~~~~~~~~~~~ .....
.............................__#....................~~~~~
~~~~~~~~~~~~~ ......................._____........#........
.............~~~~~~~~~~~~~~~~~ ......................#.....
......._#......................~~~~~~~~~~~~~~~~ ...........
...........#...........###................................
...... ....................................................
....................... ...................................
........................................
~~~~~~~~~~~.......................###___###...............
.................
~~~~~~~~~~~~......................__@_____#....nnnn.......
.................
~~~~~~~~~~~~~.....................#___U____...............
.................
~~~~~~~~~~~~......................#_____K_#....nnnn.......
.................
~~~~~~~~~~~.......................###___###...............
.................
~~~~~~~~~~..........................#___#.................
................. .........................................
.................................. ........................
................................................... .......
..........................................................
.......... ..####__##......................................
.....&&&......######..##... ..#.....__.....................
......................&&&......#....____.... ..#___........
......&&&..............................&&&........__.....
#... ..####__###.........&&&...............................
........_.....__.#... ....................&&&..............
.........................###..__###... ....................
..........................................................
...........
REQ2: Trader & Runes
ScenarioMerchants/Traders are actors that allow the player to purchase and sell certain
items or weapons. The player can find them scattered across the Lands
Between.
The player can purchase items or weapons from the merchants using runes,
the currency used in the game of Elden Ring. In this game version, hostile
creatures are the main source of runes. Defeating them will award the player a
certain amount of runes, as specified below.
A. Enemies
Heavy Skeletal Swordsman is a hostile creature that could be spawned from a
graveyard. If killed, this creature could generate any amount of runes within
the range of 35 and 892.
Lone Wolf is another inhabitant of the Lands Between that could generate any
amount of runes between 55 and 1470.
Finally, Giant Crab, if defeated by the player, generates 318 - 4961 runes.
NOTE that the player will only get runes from the hostile creatures if they
defeat them directly. In other words, if enemy A kills enemy B, the player will
not get the runes from enemy B's death. Additionally, if the enemy despawns,
the player will not get the runes from the despawned enemy.
B. Trader K
The trader that could be found on the first map is Merchant Kale, represented
by K (uppercase K). Merchant Kale sits around the building in the middle of the
map. In the current version of the game, Kale cannot move around, and the
player cannot attack them.
C. Weapons
Merchant Kale allows the player to purchase the following weapons:
1) Uchigatana for 5000 runes
2) Great Knife for 3500 runes
3) Club for 600 runes
Additionally, if the player carries any of these weapons in their inventory, the
player could decide to sell them to Kale for the following price.
1) Uchigatana for 500 runes
2) Great Knife for 350 runes3) Club for 100 runes
Grossmesser is a curved sword carried around by the Heavy Skeletal
Swordsman. This weapon cannot be purchased from Merchant Kale, but you
can sell it to Kale if you have one or more in your inventory. Grossmesser can
be sold for 100 runes.
Implementation Expectations
1. To simplify the implementation, an unlimited amount of weapons or items
can be purchased
2. To simplify the implementation, the player can carry multiple weapons of the
same type
3. The player should display the number of runes they are currently holding.
4. If the attacker can retrieve runes & the target can drop runes, display the
number of runes dropped when the target is killed.
5. If the actor does not have enough runes, allow them to choose a purchase
action, but fail when the action is executed.
6. Selling an item/weapon to a merchant will not add those items/weapons to
the merchant's inventory.
7. Enemies cannot purchase items from the merchant since enemies cannot
enter the Floor.
8. The enemy will not be able to attack the merchant since enemies cannot
enter the Floor.
REQ3: Grace & Game Reset
A. Flask of Crimson Tears
In Elden Ring, the enemies' attack deals a significant amount of damage, and
the player does not have a lot of hit points. To give the player a fighting chance,
the player will start the game with an item, the Flask of Crimson Tears. This
item can be consumed twice (maximum uses for now), and each time the
player uses it, their health will be restored by 250 points. Additionally, the
player cannot drop Flask of Crimson Tears.
B. Site of Lost Grace
The Site of Lost Grace is a unique ground in the game of Elden Ring,
represented by U (uppercase U). It allows the player to rest on it. When this
happens, the entire game will be reset (see the next section for more details on
game reset).C. Game Reset
Since the concept of death has been removed from the Lands Between during
the event of Elden Ring, nobody can truly die.
To implement this functionality, when the player dies (or if they rest at the
site of lost grace), the game will be reset.
When the game is reset, the following happens.
1) All enemies that can spawn from the grounds will be removed from the
map/despawn (including piles of bone - see REQ1: Heavy Skeletal
Swordsman's unique ability)
2) Assume all enemies are resettable, but enemies added in the future version
of the game may have different behaviour, i.e. they may not be removed from
the map when the game is reset.
3) The player's hit point will be reset to the maximum
4) The Flask of Crimson Tears will be reset to the maximum number of uses
Note that dropped weapons can be left on the ground if the world is reset (for
instance, if the player killed a Heavy Skeletal Swordsman before the game is
reset and the enemy dropped the Grossmesser, the Grossmesser will stay on
the ground after the game is reset)
Also, note that when the player dies, their weapons and items will not be
dropped.
Edit: when the player dies, they should respawn in the last site of lost grace
that they visited.
D. Runes
In relation to runes, the following happens when the player dies.
1) If the player "dies", their runes will be left on the location just before they
died (e.g. if they are starting from (1,1) and then died at (1,2), the runes should
appear in (1,1) instead of (1,2))
2) When the player stands on top of the dropped runes, the player should be
given the option to recover the dropped runes, e.g. Tarnished retrieves
Runes (value: 0)
3) If the player died again before grabbing the runes, the runes would
disappear. If the player rests at the site of lost grace, the runes will not
disappear.
4) The runes dropped by the player should be represented by $ (the dollar
sign).
Implementation Expectations1. You should display the number of uses the Flask of Crimson Tears has left
on the console.
2. The player can recover their runes (it will be added to the number of runes
that they currently hold)
3. You should display the value of the runes dropped by the player when they
died.
4. You should print the "YOU DIED" message when the player dies.
5. The first site of grace should be called The First Step.
REQ4: Classes (Combat Archetypes)
A. The Player
In the game of Elden Ring, the player, represented by @ (the at symbol), is
called Tarnished.
B. Classes/Combat Archetypes
Before the game begins, the player should be able to choose their starting
class (not to be confused with the object-oriented concept of classes).
These classes determine which weapon the player will start the game with and
the player's starting hit point.
In the current version of the game, the following classes are available as
options to the player when the game starts.
1. Samurai
If the player chooses the samurai class, they will start the game with
Uchigatana as their starting weapon. Their starting hit point will be 455.
2. Bandit
If the player chooses the bandit class, their starting hit point is 414, and they
start with the Great Knife in their weapon inventory.
3. Wretch
If the player chooses the Wretch class, they will start with 414 hit points and a
Club as their weapon.
C. Weapons1. Uchigatana )
A katana type, represented by ) (the close parenthesis), that is a starting
weapon of the Samurai class. It deals 115 damage with 80% attack accuracy
This weapon allows the user to perform "Unsheathe", a unique skill that deals
2x damage of the weapon with a 60% chance to hit the enemy.
2. Great Knife /
A dagger type, represented by / (the forward slash), that deals 75 damage
with a 70% hit rate. This is the starting weapon of the Bandit class.
This weapon allows the user to perform "Quickstep", a unique skill that deals
normal damage to the weapon to the enemy. After dealing with the damage,
the user will move away from the enemy, evading their attack.
3. Club !
A hammer type, represented by ! (the exclamation mark), that deals 103
damage with an 80% hit rate. The Wretch class starts with this weapon.
This weapon does not have any special skill.
Implementation Expectations
For the implementation of quickstep, you can choose any location within the
surroundings of the user to move them into (as long as there is no actor in the
new location).
REQ5: More Enemies (HD requirement)
Scenario
To keep our implementation faithful to the original game, let's increase the
difficulty of the game even more by adding more types of enemies!
Let's split the starting map into the Left (West) and Right (East) half.
On the West side of the map
1) Graveyard spawns Heavy Skeletal Swordsman
2) A Gust of Wind spawns Lone Wolf
3) A Puddle of Water spawns Giant Crab
On the East side of the map:1) A Graveyard spawns Skeletal Bandit
2) A Gust of Wind spawns Giant Dog
3) A Puddle of Water spawns Giant Crayfish
A. Enemies
Similar to the enemies found in REQ1
1) At each turn, Skeletal Bandit, Giant Dog and Giant Crayfish have a 10%
chance of being despawned (removed from the map) unless they are following
the player.
2) One type of enemy could attack the other type.
3) If an enemy is close (one block away) to the player, they will follow the
player. Otherwise, they will wander around the map. However, if an enemy of
one type is close to another type of enemy, they will attack without following
them.
4) If the game is reset, Skeletal Bandit, Giant Dog and Giant Crayfish should
be removed from the map/despawn.
1. Skeletal Bandit
1) A hostile creature, represented by b (lowercase B), that has 184 hit points
and carries around a weapon called Scimitar.
2) This creature has the following unique ability: it can become a pile of bones
(represented by X (uppercase X)) for 3 turns if killed by other enemies or the
player. If the pile of bones is not hit within the 3 turns, the skeletal bandit will be
revived with full health.
3) They have a 27% chance of being spawned from the graveyard found on
the East side of the map.
4) If defeated by the player, they drop 35 - 892 runes.
5) They are the same type as Heavy Skeletal Swordsman. Therefore, a
Skeletal Bandit cannot attack another Skeletal Bandit, a Skeletal Bandit cannot
attack Heavy Skeletal Swordsman, and vice versa (except for when an area
attack is performed, as it may accidentally hit other creatures of the same type)
2. Giant Dog
1) Another inhabitant of the Lands Between, represented by G (uppercase G),
that has 693 hit points and slams other creatures (single target attack),
including the player, with their head, dealing 314 damage with 90% accuracy.
2) In addition to the targeted attack, the Giant Dog may also decide to slam all
creatures within their surroundings (all 8 locations/squares), dealing the same
amount of damage with the same accuracy as their targeted attack. Note thatsince their slam area attack hits anything in their surroundings, they may hit
other enemies of the same type within the attack area.
3) If a Giant Dog performs the slam area attack, actor A may get hit while actor
B may not (the probability is independent between each actor, i.e. one actor
getting hit does not mean another actor will also get hit)
4) They have a 4% chance of being spawned from the Gust of Wind found on
the East side of the map.
5) If defeated by the player, they drop 313 - 1808 runes
6) They are the same type as Lone Wolf. Therefore, a Giant Dog cannot attack
another Giant Dog, a Giant Dog cannot attack Lone Wolf, and vice versa
(except for when an area attack is performed, as it may accidentally hit other
creatures of the same type)
Edit: slamming all creatures in their surroundings is the special skill of Giant
Dog.
3. Giant Crayfish
1) Another hostile creature, represented by R (uppercase R), that has 4803 hit
points and slams other creatures (single target attack), including the player,
with their giant pincer, dealing 527 damage with 100% accuracy.
In addition to the targeted attack, the Giant Crayfish may also decide to slam
all creatures within their surroundings (all 8 locations), dealing the same
amount of damage with the same accuracy as their targeted attack.
Note that since their slam area attack hits anything in their surroundings, they
may hit other enemies of the same type within the attack area.
2) If a Giant Crayfish performs the slam area attack, actor A may get hit while
actor B may not (the probability is independent between each actor, i.e. one
actor getting hit does not mean another actor will also get hit)
They have a 1% chance of being spawned from the puddle of water found on
the East side of the map.
3) If defeated by the player, they drop 500 - 2374 runes.
4) They are the same type as Giant Crab. Therefore, a Giant Crayfish cannot
attack another Giant Crayfish, a Giant Crayfish cannot attack Giant Crab, and
vice versa (except for when an area attack is performed, as it may accidentally
hit other creatures of the same type)
Edit: slamming all creatures in their surroundings is the special skill of Giant
Crayfish.
B. Weapons
1. Scimitar1) A curved sword, represented by s (lowercase S), carried around by the
Skeletal Bandit that deals 118 damage with 88% accuracy.
2) This sword allows the user to attack a single enemy within their
3) surroundings or to perform a spinning attack, which attacks all creatures,
including the player, within the user’s surroundings. The damage dealt and the
attack accuracy for the targeted and the spinning attack are the same.
4) Note that since the spinning attack hits anything in the user’s surroundings,
it may hit other actors of the same type.
5) If the user performs the spinning attack, actor A may get hit while actor B
may not (the probability is independent between each actor, i.e. one actor
getting hit does not mean another actor will also get hit)
6) This weapon can be purchased from Merchant Kale for 600 runes.
7) If this weapon is available in the player's weapon inventory, this weapon can
be sold for 100 runes.
Edit: Scimitar will be dropped by Skeletal Bandit when they are defeated by the
player (after the pile of bones is destroyed).
Implementation Expectations
1. The grounds can only spawn the enemies if no other actor is standing at
that location.
2. No actor should be able to enter the Wall, represented by # (the pound sign)
3. Any enemies should not be able to enter a Floor, represented by _ (the
underscore)
4. Area attack cannot be chosen by the player or performed by the enemy if
there is no one to attack in the surrounding.
5. To make the implementation simpler, if the enemy has multiple weapons,
they will choose the first weapon in their weapon inventory. If they do not have
any weapon, they will use their intrinsic weapon to attack.
6. If the weapon that the enemy holds has a special skill, the enemy has a 50%
chance of using the weapon skill.