-
Notifications
You must be signed in to change notification settings - Fork 0
/
design.txt
1264 lines (948 loc) Β· 41.6 KB
/
design.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
DESIGN FOR POTIONS AND PYTHONS ALPHA
Contents:
SECTION 1 - reading this code project
SECTION 2 - Fundamental objects
SECTION 3 - Room objects and world implementation
SECTION 4 - Saving and loading game data
SECTION 5 - parsing and interpreting user input
SECTION 6 - weapons, armor and combat
SECTION 7 - spells and effects
SECTION 8 - food, crafting, and cooking
SECTION 9 - creature behavior and NPCs
SECTION 1 - reading this code project
code styleguide
description of each file in source code
definition of "command", "verb", "action", "object", "source", "P", "W" and other terms (like "d")
SECTION 2 - Fundamental Objects (Game, items, creatures, the player)
Game
items
creature stats and creatures
status conditions
the player
SECTION 3 - room objects and world implementation/design
room
passages and room exits (passages should not be contained in other objects, passage connections must not conflict with room exits)
world network design
object search methodology (and the object tree)
SECTION 4 - saving and loading and menu
menu functions
intro animation
background data parsing functions
world file, and saving methodology
world file, and parsing methodology
discuss attributes and writeAttributes
SECTION 5 - parsing and interpreting
input processing, parsing, interpreting, executing methodology
go function methodology
attack function methodology
equip function methodology (equipping doesnt remove it from your inventory), but carrying allows something to be equipped while not in your inv?
effects methodology
spell methodology
SECTION 6 - weapons, armor, equipment, and combat
SECTION 7 - spells and effects
SECTION 8 - food, crafting, and cooking
SECTION 9 - creature behavior and NPCs
NOTES ON THE CONVENTIONS AND FORMATTING USED IN THIS CODE PROJECT
-source files are named with capital letters to distinguish them from python modules
-tabs are used for indentation, not spaces
-the standard maximum line-width is 80 characters for this code, with few exceptions
-functions should not exceed 40 lines in length, including line breaks
-functions typically use camelCase for naming, see 3 exceptions below
-Action functions are named with single capitalized words. Action functions are functions in Parser.py that are called as a result of player commands, or methods which are called by a corresponding Parser.py action function. For instance, the Look() function, which may call a Look() method on an item. This is to distinguish these functions from certain python keywords and built-ins
-functions with names that are multiple abbreviated words are purely lowercase
-the Creature methods which return the ability score for a creature are denoted purely in capital letters, such as MXHP(), and ATCK()
-classes are named with capitalized first-letters
-typically, instances of objects are either denoted with capital letters, or with words. For example, an instance of the Item() class may either be I, item, or some other word depending on the use case.
-the global objects P, W, and G refer to the Player, World, and Game objects
-typically, capital S refers to a "source" item. That is, an item which contains another item, usually called I.
-strings are denoted with "", unless it is necessary to use a string that contains " in it, in which case, the entire function of relevance uses '' to denote strings
-strings which are concatenated with variables are formatted using f-string formatting, however the + operator is used when there are only two terms to concatenate. For example;
f"There is no '{obj.name}' here"
f"There is {listObjects()} in this room"
"You take the " + item.name
GAMEPLAY MECHANIC GOALS:
-lore/easter eggs are conveyed to the player in engaging but mysterious ways
-players can get a well-formatted display and description of their stats
-enemies and player have a perception system
-save ability and checkpoints, where respawn occurs if players die
-npcs have dynamic communication options which interact with RP
-combat can happen in a dynamic way, which may not always end in a death
-tinkering can be done to create and adapt items magically
-global events can occur which persistently alter something about the world
-rooms are persistent globally
-spells can occur and affect the game in many unique ways
-fun cheat codes? (git, excelsior)
CORE CODE DESIGN:
some file contains base framework;
player class, room class, item class
okay so some file contains all room objects in the world
another file contains all creatures objects in the world
another file contains all item objects in the world
main will probably contain the parser, player object and all action functions
a txt file contains the save, which includes:
all player stats
current room
all rooms in the world and their contents/settings? <- hard part
certain global event variables
in main
there are two major objects
player
game (containing currentroom, prevroom, and time)
player contains all player attributes and methods
currentroom contains a room object of the room the player is currently in
prevroom represents the last room object that was currentroom
time represents the number of player actions taken since the game's beginning
FRAMEWORK OF THE GAME
every room contains a set of string room names denoting its connected rooms
main() runs a parsing loop, that loops taking valid input
when parser encounters a valid command, it runs, calls an action function, which may do various things.
The move() action will check for valid commands, and triage which room to move to, if any possible given the command. This will take the correct room object stored in currentroom's set of room connections, initialize the new room, set previous room to current room and set current room equal to new room, then call current room's "enter" function, which will print the initial room description and take care of some initial things
Most other valid actions either alter some feature of the room object, some item in the room, something about the player object, or do some of each.
Additionally, certain commands do external things, like save the game, cancel last action, or print useful info for the player
HOW PARSING INPUT WORKS (EXAMPLE)
```
What will you do?
> I will attack the Green Snake, with my Iron Sword.
```
In the above example, the user provides the raw input:
"I will attack the Green Snake, with my Iron Sword."
- input processing in processCmd():
First, the raw input is turned to lowercase:
"i will attack the green snake, with my iron sword."
Then, the input is purified by removing extraneous symbols:
"i will attack the green snake with my iron sword"
Then, the input is split by spaces into a list of words:
["i","will","attack","the","green","snake","with","my","iron","sword"]
Next, articles and determiners (and other extraneous words) are removed:
["attack","green","snake","with","iron","sword"]
The nounify() step combines words which appear to be a single meaningful term:
["attack","green snake","with","iron sword"]
- parsing input in parse():
the verb is assumed to be the first term of the processed command:
verb = "attack"
If the command is multiple terms, the preposition is found (if it exists) by comparing each term to a set of known prepositions. In this case:
prep = "with"
if there are more terms, the direct object is assumed to be the first term after the verb that is not a preposition. In this case:
dobj = "green snake"
if there are still more terms, the indirect object is the first term after the preposition or direct object. In this case:
iobj = "iron sword"
So parse() assigns terms to verb, dobj, iobj, and prep. Often, some or all of these parts may not exist in the user input, in which case they are set to the value of None.
You might notice that, if a direct object is not given, 'dobj' will be set to what is actually the indirect object, and 'iobj' will remain None. Usually, this is acceptable, and the action functions are designed to handle this situation.
The nature of this input parser is such that it cannot accurately parse input with more than these four important parts. It cannot properly interpret arbitrarily complex input.
Once these four parts are determined from parsing, the verb is used to identify the corresponding action function to call with the other three parts as parameters. Like so:
actionFunc(dobj,iobj,prep)
At which point the action function may ask for more input, do additional interpretation, or execute the action.
ROOM:
room has several attributes:
name - every room must have a unique name
description
size?
allexits: set of adjacent rooms (n, ne, e, se, s, sw, w, nw, u, d, b)
exits: set of directions denoting accessible adjacent rooms
allcontents: set of all items and creatures in the room
contents: set of booleans denoting which items and creatures are 'hidden' or not
additional room booleans and characteristics
#note: each object should contain a list of objects it is adjacent to in the room. Any objects adjacent to eachother must share all adjacent objects
#currently in question: should room store a 2d array of items which are passable/impassable.
#alternative answer: objects all participate in an adjacency matrix as discussed above, but they include a distance factor ranging from (adjacent, near, far, distant, on top of, under, within?) and room include a size factor (small, medium, large, vast)
#idea about movement (in or out of combat): movement determines how many steps it takes you to change from adj,near,far,distant or any of those in between. And in that "time" span it takes you to move, other creatures can do things.
#ex. you move from adj to far, which is a constant distance of 50, your movement is 30, so it takes you two steps to move, meanwhile the goblin could attack twice.
room methods:
init
repr
describe exits
describe contents
describe #gonna be elaborate
NOTES WHEN MAKING A ROOM:
- every room must have a unique name which is NOT also a term in any of the game's data sets (except the World dict, which consists entirely of Room names)
- by convention and necessity, room names must be lowercase (since user input is always lowercase and string comparisons are frequently done with room names)
- every room exit must refer to the name of an existing room (otherwise runtime errors will occur)
-pay attention to room exits. Generally, a connection between any two rooms should be two-way. That is, if "glen" has a northern exit to "big tree", "big tree" should have a southern exit to "glen". Exceptions to this recommendation are allowed but should only be used when there's good in-game reason to do so
-every item in the room must be of an existing item class
-every creature in the room must of an existing creature class
ITEM:
An item is any object in the game which can be interacted with which is not a room and which is not a creature. Specifically, an item can exist within a room's contents, within another item's contents, or within a Creature's inventory (including Player's inventory)
The simplest item has attributes; name, description, weight, and durability.
Items of class Weapon() come with a number of additional attributes regarding their statistics as a utility in combat.
Items of class Box() come with a boolean "open" attribute and a list of "contents" of Items they contain.
Items of class Sign() contain a "text" attribute"
Items of class Switch() contain an "effect" attribute, which is a string which is used with the global "effects" dict, mapping these strings to Effect functions. Effect functions affect the World in some way.
NOTES WHEN MAKING AN ITEM:
- Items do not necessarily have to have unique name, but there are parsing limitations when multiple items have the same name. Only give two items the same name if they are identical or negligibly distinct to a user.
- Items names should NOT be a term which also exists in any of the game's data sets (except the Items dict, which consists entirely of Item names). There are cases where code will be unable to reliably parse the ambiguity between an item name and some other important term, like the direction "up", or the word "toward", for instance.
- When adding an item, make sure its class exists in the Objects.py Items dict
- The order of attributes matters! when writing the attributes into the World data file, the attributes must be in the correct order as defined in the __init__ method of the class
PLAYER:
NAME - player-defined name
RACE - what character race you are, each race gets a stat bonus to two stats
DESCRIPTION - player-defined character description
BASE - defined as a dict of 10 pairs
DERIVED - defined as a dict of 24 pairs
LV - level (int)
player level, initially 1, ranges 1-20
XP - experience (int)
player experience points, initially 0, ranges.. to 100,000??
RP - reputation points (int)
reputation you've built for yourself, initially 0, ranges -100 to 100. Having a higher charisma improves your potential to alter your RP
HP - current hit points (int)
initially max, ranges 0 to MXHP
MP - current mana points (int)
initially max, ranges 0 to MXHP
MONEY - defined as a list [cp, sp, gp, pp]
represented by % & $ @
INVENTORY - defined as a list [] containing objects of class item, infinite size
GEAR - a dict of many pairs, each one representing a slot in which an item can be equipped. Included player's hands, clothing, and additional items.
STATUS - a set of all status effects currently affecting the player
LEVELING:
XP - experience points
amount of experience player has amassed
gained by fighting, killing, socializing, praying, etc.
LV - level
player level, ranging 1 - 20
determined by XP
LV = min1(floor( 5*log10(x/10) ))
QP - quality points
amount of experience player has with different attributes called qualities.
determined by level and race
the lowest any stat can begin at is 1
different races get an initial bonuses to any qualities totaling +10
Total quality points should be 7 + 3*LV,
i.e., the player has 1 in all ten qualities at level 1, and gains 3 points total with each level up
upon leveling up the player allocates the 3 new points to the categories of their choice, in any amount they would like
BASE STATS: also called qualities, a players base stats determine all other stats, they can increase with level, and can be temporarily increased or decreased by magical effects. Each base stat affects a set of derived stats
STR - ATCK, BRDN, ATHL
SPD - ATSP, MVMT
SKL - ACCU, CRIT, ATHL, SLTH, TNKR
STM - MXHP, MXMP, RESC, MVMT, ATHL, ENDR
CON - ATSP, DFNS, MXHP, CAST, CSSP, BRDN, MVMT, ENDR
CHA - PRSD, DCPT
INT - CAST, SPLS, RITL, SLTH, TNKR, INVS, KNLW, DCPT
WIS - MXMP, CAST, CSSP, INVS, PRSD
FTH - CAST, RSNC, LOOT, RITL
LCK - ACCU, EVSN, CRIT, LOOT, KNWL
ITEM WEIGHT REFERENCES:
1 wt = 1/4 lb ==> 1 lb = 4 wt
iron key: 1 (1/4 lb)
glass shard: 1 (1/4 lb)
glass bottle: 2 (1/2 lb)
potion: 4 (1 lb)
shortsword: 8 (2 lbs)
longsword: 20 (5 lbs)
giantsword: 40 (10 lbs)
person: 600 (150 lbs)
ITEM DURABILITY REFERENCES:
(assuming no magical reinforcement)
breadroll: 2
glass bottle: 3
iron key: 5
golden key: 6
wooden sign: 8
wooden table: 9
wooden chest: 10
bronze bell: 12
stone statue: 14
soft sword: 15
hard sword: 18
WEAPON STATS:
weight
affects ATSP, MVMT
ranging 1 - 20
might
affects ATCK
ranging 1 - 20
sleight
affects ACCU
ranging 1 - 20
sharpness
affects CRIT
ranging 1 - 20
range
affects HIT%
ranging 1 - 20
reach
affects attack distance
ranging whatever
ARMOR STATS:
weight
affects CAST, CSSP, MVMT
ranging 1 - 20
protection
affects DFNS
ranging whatever
SHIELD STATS:
weight
affects ATSP
ranging 1 - 20
protection
affects DFNS
ranging whatever
DERIVED STATS:
24 stats, also called abilites. These stats can be affected by base stats, other derived stats, and the player's equipment. These stats affect the actions taken by the player, including attacks, casting spells, and social interaction. Each derived stat has a formula it is determined by.
ACCU - accuracy
50 + 2*SKL + LCK + weapon.sleight
chance to hit against enemy evasion
ATCK - attack
STR d weapon.might
the amount of max possible damage to the opponent before their damage reduction
ATSP - attack speed
SPD - min0(weapon.weight - CON) - min0(shield.weight - CON)
number of attacks against enemy attack speed
combat order?
EVSN - evasion
2*ATSP + LCK
chance to not be hit against enemy accuracy
ability to escape restraint
CRIT - critical hit
SKL + LCK + weapon.sharpness
chance of a double-damage hit
DFNS - defense
CON + armor.protection + shield.protection
physical damage negation
MXHP - max hit point
LV*CON + STM
capacity of total health
MXMP - max magic points
LV*WIS + STM
capacity of total magic
CAST - casting bonus
WIS + FTH + INT - min0(armor.weight - CON)
bonus applied to various magical effects
CSSP - casting speed
WIS - min0(inventory.weight - BRDN) - min0(armor.weight - CON)
speed to cast a spell
SPLS - number of spells
2*INT
the maximum number of spells known
RESC - resistance
2*FTH + STM
magical damage negation
BRDN - burden
CON*STR + 20
maximum inventory carrying capacity without being hindered
2*BRDN is hard maximum inventory carrying capacity
MVMT - movement
SPD + STM + 10 - min0(inventory.weight - BRDN) - min0(armor.weight - CON) OR mount MVMT
movement distance
turn order
LOOT - item drop rate
2*LCK + FTH
the rate and tier at which items and gold are dropped by enemies
RITL - ritual
2*FTH + LCK
ability to cast magical rituals and healing spells
ATHL - athletics
STR + SKL + STM
ability to achieve physical activities
ENDR - endurance
2*STM + CON
ability to endure things (poison, holding breath, regeneration, etc.)
SLTH - stealth
2*SKL + INT - min0(inventory.weight - BRDN)
ability to hide
TNKR - tinker
2*INT + SKL
ability to craft items
quality of cooked items
quality of repaired items
INVS - investigation
2*WIS + INT
ability to investigate
ability to perceive hiding creatures
KNWL - knowledge
2*INT + LCK
chance to know things
PRSD - persuasion
2*CHA + WIS
ability to persuade
DCPT - deception
2*CHA + INT
ability to deceive
SWITCHES, LEVERS, BUTTONS:
A switch is a superclass which contains levers and buttons
Switches can be interacted with (via "use","pull","switch","press",etc.)
When a switch is "triggered", it calls a specific effect which affects something about the world. In data, switches are stored with a string which refers to a function stored in the effects dict (at the bottom of Objects.py)
This function is called when a switch is "triggered"
Levers are switches that have 2 states; on or off. They change something when switched "on", and have the reverse effect when switched "off"
Buttons are switches that simply do something when they are triggered. There can be permanent buttons, which can only be triggered once, or recurring buttons which can be triggered multiple times.
Traps are switches that are triggered when the player performs an action other than "pull","switch", or "press". In other words, a switch which is triggered unintentionally by the player. Typically, a trap can only be triggered once, i.e. it has an attribute which begins as "off" and can only be changed to "on"
WHAT CAN SWITCHES DO? (EXAMPLES)
They can change the gamemode
They can make an item or creature appear in the room
Can alter something about an item, creature, or fixture in the room
They can reveal a door to another room
They can alter a players stats or status
They can alter something in a different room in the world
A GENERIC ACTION FUNCTION:
if prepositions are invalid, return false
if dobj or iobj values are required but not provided, ask for them
search for required iobj and dobj objects in room or on player:
if they do not exist, return false
if required iobj and dobj do not have the necessary attributes, return
if the item object is affected in some way, call the relevant item methods
if the player object is affected in some way, call relevant player methods
return True
TYPES OF ACTION FUNCTIONS:
-no-prep function: functions which cannot take a preposition value:
-single-prep functions: functions which take a single prepositon, usually "with"
-multi-prep functions: functions which take a number of possible prep values
-inventory search function: functions which search the player inv for an item
-room item search function: functions which search room contents for an item
-room creature search function: search room occupants for a creature
-room search functions: search room for an item or creature
-item search function: search room and player inv for an item
-object search function: search room and player inv for creature or item
CHEAT CODES:
huzzah
excelsior
godmode
oogabooga
opensesame
faex
deus vult
pepe
madmax
IDEAS FOR CREATURES/NPCS:
generally, three categories of creatures,
person, monster, animal
"villain" - subclass; big bad version of person
"boss" - subclass; big bad version of a monster
"beast" - subclass; big bad version of an animal
all creatures have two stats associated with behavior toward the player:
fondness: -100 to 100, represents how much they like the player, a creature with high fondness for the player is less likely to act aggressively toward the player, and more likely to be persuaded or deceived by the player
fear: -100 to 100, represents how much they fear the player, a creature with high fear of the player is less likely to act aggressively toward the player, and less likely to be deceived by the player, but more likely to be persuaded
people have dialogue options for the player and can be communicated with, persuaded, or deceived.
monsters and animals cannot communicate with the player. Animals typically act more passively than monsters and have a limited set of actions they can take. Monsters can use items and weapons.
each person has an initial value for their fondness and fear of new strangers (meaning the player), but upon meeting the player each time, their values deviate from that initial value with a firstImpression() function, which takes in several factors, including the player's amount gear, their type of gear, and their reputation points and sets their fondness and fear values. fear and fondness change with very subsequent meeting with the player to a lesser degree based on the same factors.
fondness and fear are changed by specific dialogue options pursued by the player, and specific actions taken by the player taken toward the creature. additionally, dialogue options the player has with a given person are dependent upon how fond or fearful the person is.
These values can also change, for monsters and animals as well, based on certain actions like giving gifts, buying and selling merchandise, attacking, healing, or casting a spell
//note: creatures should contain a value which indicates how it will be addressed e.g. "The goblin", "Goblin", "a goblin", "goblins"
MAKING AN ATTACK:
turn order is determined by ATSP:
order is highest to lowest attack speed,
ties are settled by the highest SPD
ties of SPD are settled by 'attacker goes first'
number of attacks is determined:
n = floor(ATSP / target.ATSP) //maybe
for each attack:
chance to hit is determined:
if weapon.ranged
HIT = min1(max99(ACCU - target.EVSN)) - min0(dist(player, target) - weapon.range)
else
HIT = min1(max99(ACCU - target.EVSN))
percentage roll to HIT
chance to crit is rolled
attack is rolled:
attack = STR d weapon.might
if critical
attack *= 3
damage is calculated:
damage = min0(attack - target.DFNS)
damage is dealt:
enemy.hp -= damage
#called in the enemy object, dmgtype passed as well
EQUIPPING ITEMS/WEAPONS:
ASSIGNING WEAPONS AND SHIELDS
CASTING A SPELL:
really just depends...
DAMAGE TYPES:
p: piercing [phys] - weapons that can stab
s: slashing [phys] - weapons that can slice
b: bludgeoning [phys] - weapons that can crush
f: fire [elem] - weapons that can burn [can cause burning condition]
c: cold [elem] - weapons that can freeze [can cause frozen condition]
l: lightning [elem] - weapons that can shock [can cause paralyzed condition]
t: thunder [elem] - weapons that can burst [can cause deafened condition]
a: acid [elem] - weapons that can corrode
x: poison [elem] - weapons that can poison (duh)
n: necrotic [mag] - weapons that drain lifeforce
r: radiant [mag] - weapons that imbue holiness
v: force [mag] - weapons that evoke magical force
i: psychic [mag] - weapons that harm the mind
e: essential [dev] - weapons that transcend the universe
STATUS EFFECTS:
status conditions exist in the creatures status list as list pairs
of condition name and duration.
negative durations have special meanings:
-1 means the condition is inflicted by being in the current room. It will end when the player leaves the room or when the room's condition's duration ends
-2 means the condition is permanent until it is removed by some general source
-3 or lower means the condition is permanent until removed by a specific source
rooms have status effects too. And rooms can harbor condition which afflict creatures in the room with other status conditions. When this happens, the room condition's name will contain the information about the condition to inflict upon the creatures. For instance, if a room is filled with poisonous gas for 30 time units and will poison all creatures that enter until they leave (or until the rooms condition wears off). the rooms condition pair would be of the form:
["afflict poisoned -1", 30]
if the room is simply on fire for 10 more time units, and will ignite any creatures in the room for 15 units, even leaving the room will not save them after being set ablaze. In this case, the room's condition pair would be of the form:
["afflict on fire 15", 10]
curses;
weakness - lowers STR
slowness - lowers SPD
clumsiness - lowers SKL
tiredness - lowers STM
illness - lowers CON
timidity - lowers CHA
stupidity - lowers INT
insanity - lowers WIS
apathy - lowers FTH
calamity - lower LCK
blessings;
brawniness - raises STR
swiftness - raises SPD
prowess - raises SKL
liveliness - raises STM
toughness - raises CON
felicity - raises CHA
sagacity - raises INT
lucidity - raises WIS
fidelity - raises FTH
prosperity - raises LCK
CONDITION IDEAS:
'cool' with glasses or something so it says "you are cool"
raising a base stat
raising a derived stat
lowering a base stat
lowering a derived stat
resistance to a damage type
invulnerability to a damage type
vulnerability to a damage type
raising fondness of creature - raises fondness by some int for a creature name
raising fear of creature - raises fondness by some int for a creature name
insanity - creature might act randomly instead of based on input criteria
rage (aggression for all targets)
ire (aggression for a target)
bloodied - could change creature behavior, also useful for certain effects
lignified - creature cannot move and is flammable
petrified - creature cannot move and is not flammable and is much heavier
frozen - creature cannot move and is immune to cold damage
paralyzed - creature cannot move or act
restrained - creature cannot attack, cast, or use items
burning - creature takes damage every turn
poisoned - creature takes damage every turn
sleep - creature will not act and will wake up if they are damaged
blinded - creature cannot see, it influences their perception inputs
deafened - creature cannot hear, it influences their perception inputs
prone - creature moves more slowly??? idk here
hindered - creature is slowed
spellbound - cant cast
disguised - creature appears to be something/someone else (idk how to do this)
polymorphed - creature has entirely different stats and abilities (maybe store all previous stats in a JSON string)
invisible - creature is perfectly hidden
flying - creature can move freely in any direction
waterbreathing - cannot drown
feather fall - cannot take fall damage
gaseous form - can fly and is intangible
truesight - can see invisible things
darkvision - can get full descriptions in darkness
opulence - double money recieved
chefskiss - better at cooking
greenthumb - good at planting or something
in a sphere/bubble - immune to physical damage, can't attack, drop, take
hunters mark - idk??? ....
thornshield - (thornskin maybe), when taking physical melee damage, deal damage to damager
EQUIPMENT PROPERTIES:
WEAPON;
nimble - bonus to attack speed
keen - weapon doesn't lose sharpness
striker - increased chance to hit/crit
flaming - sets enemy on fire
venom - poisons enemy
frost - freezes enemy
brilliant
bright
ironweave
brave
breaker
magic
razor
searing
mithril
gold
silver
steel
iron
bronze
tin
wood
glass
ARMOR;
sanguine - overflow defense heals
fortitude - invulnerability to a dmg type
patient
valorous
robust
phoenix - fire damage
mithril
gold
silver
steel
iron
bronze
leather
cloth
ITEM IDEAS:
main types of magic items:
rings - passive buffs
wands - effect like "__ spells cast with this have bonus"
staves - effect like "__ spells cast with this have bonus"
scroll - allows you to learn a spell
tome - allows you to learn multiple spells
gear - wearable, can have passive effects or active effects
Norman items;
Norman's sword
Norman's shield
Norman's etc.
holy water
the magic map
Camphor Staff (or sm othr tree idk) Gingko Staff? etc,
willow staff, banyan, aspen, birch, baobab, elm, sycamore, oak, pine, cyprus
Pantalon
Step Reckoner
(Magic?) Umbrella
Shrunken heads
dunce hat
Magic Teapot (or just a normal teapot idk)
Cloak of Bees
Estoc
The Master Boomerang - (always comes back no matter what u do with it)
Raygun (that deals E damage)
Paragon Blade
Nebula Shroud/Cloak
Durendal
Caliburn
Tyrfing (Cursed)
Shamshir (Poisonous)
Carnwennan (Shadow Dagger)
Sci-fi set
(Newton/Gravity Something)
Raygun (Lazer Mauser)
Gauss Rifle (Coilgun)
Lorentz Rifle (Railgun)
Maxwell Cannon (Plasma Cannon)
Faraday Shield (Lightning Shied)
An item set named after all the greek letters (super powerful)
each one has a magical effect associated with each of the 24 derived stats
Alpha sword CRIT
Beta axe ATCK
Delta cloak SLTH
Gamma bow ACCU
Epsilon ring CSSP
Zeta wand CAST
Eta flask MXHP
Theta gauntlet TNKR
Iota key KNWL
Kappa horn DCPT
Lambda lyre PRSD
Mu stone MXMP
Nu dagger ATSP
Xi amulet RITL
Omicron tome SPLS
Pi compass LOOT
Rho pack BRDN
Sigma tunic EVSN
Tau hammer ATHL
Upsilon glaive ENDR
Phi helm RESC
Chi torch INVS
Psi boots MVMT
Omega shield DFNS
FOOD AND CONSUMABLE ITEMS:
consumable items can heal hp, regenerate mp, and add or remove status effects.
cooked/constructed meals have effects that are greater than the sum of their parts. different food groups tend to provide different benefits
proteins/meats - vastly increase hp, synergize well in meals
grains/starches - moderately increase hp, cheapest/most common
fruits - minimally increase hp, each fruit adds a different status effect
veggies - minimally increase hp and mp, can remove bad status effects
mushrooms - have one significant benefit and one debuff
dairy - minimally increase hp and mp, can remove bad status effects
alcohol - same effects as fruit, but adds drunkeness
water - raises hp and mp by 2
Potions are bottled items that have different effects. Types of potions are:
Red, Orange, Yellow, Green, Blue, Purple
Pale Red, Pale Orange, Pale Yellow, Pale Green, Pale Blue, Pale Purple
Dark Red, Dark Orange, Dark Yellow, Dark Green, Dark Blue, Dark Purple
Bright Red, Bright Orange, Bright Yellow, Bright Green, Bright Blue, Bright Purple
Clear, Pink, Brown, Black, Grey, White
Bronze (defense), Silver (speed), Gold (atk/dmg/crit)
Fruits:
Apple - reduces disease conditions (special apple for special diseases?)
Banana
Blueberry
Blackberry
Cherry
Coconut
Cowberry
Cranberry
Currant (Black) - physical resistance
Currant (Red) - elemental resistance
Currant (White) - magical resistance
Dragonfruit - firebreath? fly? fire resistance?
Durian - bonus to endurance or wpn durability?
Elderberry
Fig
Ghostberry - ghost effects? gaseous form? cold resistance (as snowberry)?
Gojiberry - something awesome, remove all bad conditions?
Goldenberry - double money gained?
Gooseberry - bonus to luck?
Grape
Grapefruit - temporarily raises MXMP
Guava
Huckleberry
Juniperberry
Kiwi
Kumquat - something with mp
Lemon - improved spells
Lime - improved spells some other way
Loquat
Lychee
Mango
Mulberry - immune to bleed?
Muskmelon - immune to poison
Olive
Orange - double regen of MP
Passionfruit - bonus to social interaction (love stat)
Peach
Pear
Persimmon
Pitanga
Plum
Pricklepear - thornshield
Pineapple
Pomegranate
Quince
Raspberry
Seaberry - water breathing
Starfruit
Strawberry
Watermelon - water walking?
WORLD DESIGN IDEAS:
several different "dungeons" exist in the the world
however, I dont want them to be super "temple-y" like Legend of Zelda. that feels too restrictive, i want the world to feel less linear/sequential and a bit more open-ended
so these dungeons are generally just clusters of room nodes in the world graph that match a certain theme or aesthetic, and they have different general difficulty levels
-regular forest (starting location)
-the gallery
-hinterlands
-mobile massive wizard school (with portal entrances around the world)
-a buried giant (inside of which is a dungeon? rooms like "giant foot")
-haunted manor, abandoned manor on a hill thats v spooky
-ancient mystical forest, full of illusions thats difficult to navigate
-the catacombs, simple basic religious dungeon under a giant old cathedral
-atlantis, underwater castle thats coral reef themed and fun, entered by getting to an island somewhere
-caverns, early dungeon that is large underground caverns
-necropolis, a massive sandy persian themed graveyard
-"the tower", tower of ___, hundreds of floors, considered scary and forbidden by nearby townsfolk, probably one of the most dangerous dungeons
-skyland, a beanstalk leads to a giants house? or smth on a floating cloud?
-labyrinth, underground labyrinth (maybe library themed), that has magical connections to all kinds of places all over the world
-mineshaft, underground mines maybe
-spaceship, extra idea maybe with aliens lol
- in the alien spaceship have a recording or text log of a dead captain/space explorer