wer das liesst kann lesen
Project description
Documentation
Table of contents
Main Game
dazu gibts noch nichts zu sagen tbh, soll aber cool werden i guess
Entities
Import: Entities.py
Used to create entities like the player and npcs.
Methods:
- set name
- change health
- add item
- remove item by name
- remove item by index
- add effect
- show effects
- remove effect by name
- remove effect by index
- ! all methods return False on failure
set_name
Starts promt to set the player.name by the player
reads: self
writes: self.name
usage:
Hero = Entity()
Hero.set_name()
change_health
Changes the Player.health by adding "value"
reads: self
writes: self.health
usage:
Hero = Entity()
Hero.change_health(-10)
add_item
Adds item to inventory by using the item class.
reads: self, iname, itype
writes: self.inv
usage:
Hero = Entity()
Hero.add_item("item name","item type")
remove_item_by_name
Removes item from entity inventory by given name
reads: self, iname
writes: self.inv
usage:
Hero = Entity()
Hero.remove_item_by_name("Sword")
remove_item_by_index
Removes item from entity inventory by given index
reads: self, iname
writes: self.inv
usage:
Hero = Entity()
Hero.remove_item_by_index(0) #removes first item from inventory
#if no index given → deletes last item from inventory
add_effect
Appends effect to corresponding list of effects.
reads: self(obj), effect(obj)
writes: entity(oby) → {geffects, beffects, eeffects} → obj.effects
usage:
Hero = Entity()
poisoning = Effect()
Hero.add_effect(poisoning)
show_effects
Prints element.name of entity.effects[]
reads: self(obj), names(bool → default True)
writes: self(obj)
usage:
Hero = Entity()
poisoning = Effect()
Hero.add_effect(poisoning)
Hero.show_effects() #shows name for every effect
Hero.show_effects(False) #shows vars(effect) for every effect
remove_effect_by_name
Removes effect from entity by given name.
reads: self(obj), ename(str)
writes: self(obj)
usage:
Hero = Entity()
poisoning = Effect()
Hero.add_effect(poisoning)
Hero.remove_effect_by_name(poisoning.name)
remove_effect_by_index
usage:
change_stat
usage:
let_effects_take_effect
usage:
Levels
Items
Effects
Utils
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hsmm-0.0.1.tar.gz
.
File metadata
- Download URL: hsmm-0.0.1.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4282c803a277881c607c01e42b14b01ab657aedf74c2faef23896c9e6561f17a |
|
MD5 | 0b2086d66ca232ba84569a4aa84d9d51 |
|
BLAKE2b-256 | 7f9cfd698d63c8b9457c8b2c331614fdf25f734203f5dec9a622ee87f9f34901 |
File details
Details for the file hsmm-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: hsmm-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f15bbe8a54740db7d570c0df4a968a6a8b67fefb86c78cf1697e321f5cff825a |
|
MD5 | d6412a4b93356a8aa2f98f69520b9e51 |
|
BLAKE2b-256 | dbf628da9ff7459e4673bc40f60290f184713a4be042635378549d0ede602944 |