{"id":49990842,"url":"https://github.com/0marrkvi0/database_implementation_rpg_dbs","last_synced_at":"2026-05-19T05:00:34.985Z","repository":{"id":300070029,"uuid":"1005113477","full_name":"0MarrkvI0/Database_implementation_RPG_DBS","owner":"0MarrkvI0","description":"Final optimization of the database design and creation of a working database including custom tables, attributes, indexes, stored procedures and test scenarios. (subject_DBS)","archived":false,"fork":false,"pushed_at":"2025-06-19T20:11:41.000Z","size":1023,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-05T09:06:28.638Z","etag":null,"topics":["index","postgresql-database","testing"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0MarrkvI0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-19T17:32:04.000Z","updated_at":"2025-06-19T20:13:15.000Z","dependencies_parsed_at":"2026-05-19T05:00:18.754Z","dependency_job_id":null,"html_url":"https://github.com/0MarrkvI0/Database_implementation_RPG_DBS","commit_stats":null,"previous_names":["0marrkvi0/database_implementation_dbs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0MarrkvI0/Database_implementation_RPG_DBS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0MarrkvI0%2FDatabase_implementation_RPG_DBS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0MarrkvI0%2FDatabase_implementation_RPG_DBS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0MarrkvI0%2FDatabase_implementation_RPG_DBS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0MarrkvI0%2FDatabase_implementation_RPG_DBS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0MarrkvI0","download_url":"https://codeload.github.com/0MarrkvI0/Database_implementation_RPG_DBS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0MarrkvI0%2FDatabase_implementation_RPG_DBS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33203112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"online","status_checked_at":"2026-05-19T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["index","postgresql-database","testing"],"created_at":"2026-05-19T05:00:15.896Z","updated_at":"2026-05-19T05:00:34.976Z","avatar_url":"https://github.com/0MarrkvI0.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Turn-Based RPG Combat System – PostgreSQL Implementation\n\n**Autor:** Martin Kvietok  \n**Predmet:** Database Systems  \n**Fakulta:** Fakulta informatiky a informačných technológií, STU Bratislava  \n\n## Popis projektu\n\nToto zadanie sa zameriava na implementáciu RPG bojového systému v PostgreSQL. Projekt obsahuje definíciu tabuliek, procedúr, logiky súbojov, regenerácie, manipulácie s predmetmi a logovania udalostí.\n\n## Obsah\n\n### Funkcie a procedúry\n\n- `p_rest_character` – Simulácia odpočinku postavy a regenerácia zdravia a AP.\n- `p_enter_combat` – Zapojenie postavy do prebiehajúceho súboja.\n- `p_reset_round` – Ukončenie aktuálneho kola a začatie nového.\n- `p_loot_item` – Získanie predmetu z bojiska postavou.\n- `p_effective_spell_cost` – Výpočet efektívnej ceny kúzla pre postavu.\n- `p_cast_spell` – Zoslanie kúzla vrátane výpočtu AP, zásahu a účinkov.\n\n### Výpočty a modelovanie\n\n- Efektívne poškodenie a cena kúzla sú počítané pomocou hráčových atribútov, vybavenia a kúzla.\n- Redukcia poškodenia zohľadňuje brnenie cieľa.\n\n### Indexy\n\nProjekt obsahuje optimalizované indexy pre rýchle vyhľadávanie:\n\n- `idx_character_attr_pair`\n- `idx_combat_participant_alive`\n- `idx_inventory_item_is_equipped`\n- `idx_combat_item_is_taken`\n- `idx_round_time`\n\n### Zmeny oproti predchádzajúcim verziám\n\n- Nové akcie predmetov (liečenie, znižovanie AP, zvyšovanie poškodenia)\n- Pridané časové stopy k bojom (`start_time`, `end_time`)\n- Rozšírené typy udalostí v `combat_log` (`login`, `winner`, `round_start`, `round_end`)\n\n## Testovanie a spustenie\n\n**Poradie krokov:**\n\n1. Spustiť `create_db.sql` – vytvorenie schémy databázy\n2. Spustiť všetky skripty `p_*.sql` – uložené procedúry\n3. Spustiť `init_db.sql` – naplnenie testovacími dátami\n4. Spustiť testy v poradí:\n   - `test_p_rest.sql`\n   - `test_p_enter_combat.sql`\n   - `test_p_loot_item.sql`\n   - `test_p_cast_spell.sql`\n   - `test_p_reset_round.sql`\n5. Vytvoriť pohľady zo skriptov `v_*.sql`\n\n## Použitá technológia\n\n- **PostgreSQL** – relačná databáza pre spracovanie hierarchie a logiky súbojov\n- **PL/pgSQL** – jazyk pre procedurálne funkcie a trigger logiku\n- **UML diagramy** – modelovanie správania funkcií\n\n## Diagramy\n\n- Fyzický model databázy\n- UML aktivity pre každú funkciu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0marrkvi0%2Fdatabase_implementation_rpg_dbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0marrkvi0%2Fdatabase_implementation_rpg_dbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0marrkvi0%2Fdatabase_implementation_rpg_dbs/lists"}