首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代写CS1010S、代做Python编程语言
项目预算:
开发周期:
发布时间:
要求地区:
CS1010S, Semester II, 2024/2025 — Mission 6 1
National University of Singapore
School of Computing
CS1010S: Programming Methodology
Semester II, 2024/2025
Mission 6
Role Playing Game (RPG)
Release date: 7th April 2025
Due: 21st April 2025, 23:59
Required Files
• mission06-template.py
• engine.py
Background
There are many different RPG nowadays like Final Fantasy (Figure. 1), World of Warcraft,
or Dota. In this mission, we will implement 5 character classes to run our very own
turn-based RPG!
Figure 1: Example of turn-based combat in Final Fantasy VII. Two teams of characters,
each with unique abilities and roles, take turns to attack each other.
CS1010S, Semester II, 2024/2025 — Mission 6 2
Information
This mission consists of 5 tasks.
The following consists of the ADTs that have been implemented for you within engine.py.
engine.py is the foundation for this mission, so be sure to examine the provided class
definitions in the file, which will guide you in building and expanding your own classes.
Villager ADT
A Villager represents a character with attributes such as health, mana, strength, and
intelligence. Villager serves as the base class for all classes that you will create.
Constructor
• Villager() -> villager
Mutators
• set_max_health(health) -> None
• set_max_mana(mana) -> None
• set_strength(strength) -> None
• set_intelligence(intelligence) -> None
• set_cost(cost) -> None
Accessors
• get_max_health() -> max_health
• get_health() -> health
• get_max_mana() -> max_mana
• get_mana() -> mana
• get_strength() -> strength
• get_intelligence() -> intelligence
• get_cost() -> cost
Operations
• is_alive() -> bool
• heal(amount) -> None
• use_mana(amount) -> None
• regen_mana(amount) -> None
• receive_damage(damage) -> None
• act(ally_team, enemy_team) -> None
CS1010S, Semester II, 2024/2025 — Mission 6 3
Team ADT
A Team represents a collection of villagers participating in the Trial of Ancients. It provides
utility methods to manage and interact with the villagers.
Constructor
• Team(name) -> team
Mutators
• add_villager(villager) -> None
Accessors
• get_name() -> name
• get_all_alive() -> list_of_villagers
• get_all_dead() -> list_of_villagers
• get_num_alive() -> int
• get_num_dead() -> int
• get_rand_alive() -> villager
• get_rand_dead() -> villager
Game ADT
The Game class is the core component for simulating combat between two teams in the
Trial of Ancients. It alternates turns between the two teams, allowing their champions
to take actions until one team is completely defeated.
Constructor
• Game(gold, avail_types, play, seed) -> game
Creates a new game with the specified gold, available character types, play mode
(decides whether to show each round or not), and seed for random generator.
Mutators
• simulate() -> None
Runs the simulation, alternating turns until one team wins.
CS1010S, Semester II, 2024/2025 — Mission 6 4
Task 1: Fighter (4 marks)
A Fighter is a Villager that is brave and skilled while specializing in physical combat.
Fighters possess high health and strength, allowing them to deal significant damage
to their enemies. They are resilient champions who use brute force to dominate the
battlefield. The Fighter’s actions focus on targeting and attacking a random opponent,
showcasing their prowess in direct combat.
1. Implement the class, Fighter.
The constructor does not take any parameters. The fighter has 1200 Health and
100 Strength while costing 100 Gold.
2. Implement the method, act(), which would be called when the fighter is chosen to
act during their team’s turn.
When the fighter acts, he chooses a random enemy that is alive to attack, dealing
damage equal to his strength.
Sample execution:
# Team A fighter acts on an opponent fighter
" Team A member Fighter acts ."
" Hurt enemy Fighter for 100 damage ."
" Fighter hurt with remaining hp 1100 ."
Task 2: Mage (4 marks)
A Mage is a Villager skilled in harnessing magical energy to strike their foes or replenish
their mana. Mages have lower health but possess high intelligence, allowing them to
deal significant damage. During their turn, a Mage will either attack a random enemy
using their intelligence stat, consuming mana in the process, or regenerate mana if their
reserves are low. This strategic flexibility makes them valuable in any team.
1. Implement the class Mage, inherited from the Villager class.
The constructor does not take any parameters. The mage has 800 Health,400
Intelligence, 50 max mana, while costing 200 Gold.
2. Implement the method act(), which would be called when the mage is chosen to
act during their team’s turn.
When the mage acts, he chooses a random enemy that is alive to attack, dealing
damage equal to their intelligence, while consuming 20 mana in the process. If
the mage’s mana is less than 20, the mage will instead go into meditation, which
regenerates 30 mana instead of attacking the enemy.
Sample execution:
# Team A mage acts on an opponent fighter
" Team A member Mage acts ."
" Hurt enemy Fighter for 400 damage ."
" Fighter hurt with remaining hp 800."
# Team A mage acts , but does not have enough mana
" Team A member Mage acts ." # Mage has 10 mana
" Recovered mana to 40."
CS1010S, Semester II, 2024/2025 — Mission 6 5
Task 3: Berserker (3 marks)
The Berserker class is a Fighter who becomes more dangerous as they take damage.
Berserkers thrive in high-pressure situations, delivering devastating blows when their
health is low.
1. Implement the class, Berserker, inherited from the Fighter class.
The constructor does not take any parameters. A berserker has the same base
stats as a fighter (1200 health, 100 strength) but costs 200 gold. However, They
deal double damage if their health is lower than half of their maximum health.
2. Implement the method, get_strength(), which returns double the strength if the
berserker’s health is less than or equal to half of its maximum health, and regular
strength otherwise.
Sample execution:
# Team A berserker with more than half health acts on an opponent fighter
" Team A member Berserker acts ."
" Hurt enemy Fighter for 100 damage ."
" Fighter hurt with remaining hp 1100 ."
# Team A berserker with less than half health acts on an opponent fighter
" Team A member Berserker acts ."
" Hurt enemy Fighter for 200 damage ."
" Fighter hurt with remaining hp 1000 ."
Task 4: Archmage (4 marks)
The Archmage class is a Mage capable of casting devastating area-of-effect spells. Arch mages are formidable champions who can turn the tide of battle in critical moments.
1. Implement the class, Archmage, inherited from the Mage class.
The constructor does not take any parameters. An archmage has the same base
stats as a mage (800 health, 400 intelligence, 50 mana) but costs 600 gold.
2. Implement the method, act(), which behaves differently depending on the situ ation:
• If the archmage is the last ally alive and has at least 20 mana, they cast KABOOM!,
dealing double their intelligence as damage to all enemies and consuming 20
mana.
• Otherwise, the archmage behaves like a regular mage, attacking a random
enemy or regenerating mana if their reserves are low.
Sample execution:
# Team A archmage acts , casting KABOOM ! on all opponents
" Team A member Archmage acts ."
" Only one standing . Cast KABOOM ! on every enemy alive !"
" Hurt enemy Fighter for 800 damage ."
" Hurt enemy Mage for 800 damage ."
CS1010S, Semester II, 2024/2025 — Mission 6 6
Task 5: Necromancer (4 marks)
The Necromancer class is a mage with the ability to revive fallen allies. Necromancers
bring a unique strategic advantage to their team by restoring defeated champions to
continue the fight.
1. Implement the class, Necromancer, inherited from the Mage class.
The constructor does not take any parameters. A necromancer has the same base
stats as a mage (800 health, 400 intelligence, 50 mana) but costs 400 gold.
2. Implement the method, act(), which behaves differently depending on the situ ation:
• If the necromancer has at least 20 mana and there are dead allies, they revive
a random ally with half of their maximum health rounded down to the nearest
one (e.g., 400/800 or 350/701), consuming 20 mana in the process.
• Otherwise, the necromancer behaves like a regular mage, attacking a random
enemy or regenerating mana if their reserves are low.
Sample execution:
# Team A necromancer acts , reviving an ally
" Team A member Necromancer acts ."
" Reviving Fighter with 600 hp."
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代写busn2037 fundamentals of...
2025-04-28
代写stor 572 simulation for ...
2025-04-28
代写int104 – artificial int...
2025-04-28
代写bms5021 s1 2025 - topic ...
2025-04-28
代做thermodynamics - semeste...
2025-04-28
代做ccch9041 the rule of law...
2025-04-28
代做ec224 stata commands for...
2025-04-28
代写“laboratory” exercise代...
2025-04-28
代做int104 – artificial int...
2025-04-28
代做assignment 2代做python程...
2025-04-28
代做musi 1310 assignment 7代...
2025-04-28
代做bioc0003 capstone assess...
2025-04-28
代做fundamentals of water en...
2025-04-28
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!