Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Commit

Permalink
Papercrafting and reading training (#1324)
Browse files Browse the repository at this point in the history
  • Loading branch information
PotatoTomahto authored Jun 18, 2024
2 parents 8d528f7 + c76b7ed commit c48dda3
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
61 changes: 61 additions & 0 deletions code/game/objects/items/rogueitems/literary.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

/obj/item/literary
name = "novice's guide to literature"
desc = "A book that teaches the alphabet, sentences of varying complexity, and common symbols, allowing readers to train their reading skills. The more advanced the guide, the higher the limit and the more literate you must be to study it."
icon = 'icons/roguetown/items/books.dmi'
icon_state = "book_1"
var/exppercycle = 5
var/minskill = 0
var/maxskill = 1
var/skilltoteach = /datum/skill/misc/reading

/obj/item/literary/apprentice
name = "apprentice's guide to literature"
icon_state = "book2_1"
minskill = 1
maxskill = 2
exppercycle = 8

/obj/item/literary/journeyman
name = "journeyman's guide to literature"
icon_state = "book3_1"
minskill = 2
maxskill = 3
exppercycle = 13

/obj/item/literary/expert
name = "expert's guide to literature"
icon_state = "book4_1"
minskill = 3
maxskill = 4
exppercycle = 20

/obj/item/literary/master
name = "master's guide to literature"
icon_state = "book5_1"
minskill = 4
maxskill = 5
exppercycle = 30

/obj/item/literary/attack_self(mob/user)
. = ..()
attemptlearn(user)

/obj/item/literary/proc/attemptlearn(mob/user)
if(user.mind && ishuman(user))
var/mob/living/carbon/human/H = user
var/userskill = H.mind.get_skill_level(skilltoteach)
var/intbonus = H.STAINT - 10
if(userskill < minskill)
to_chat(user, "<span class='warning'>This guide is too advanced for me to study!</span>")
return
if(userskill < maxskill)
to_chat(user, "You begin to study the [src.name]!")
if(do_after(H, 5 SECONDS))
user.mind.adjust_experience(skilltoteach, exppercycle + intbonus)
attemptlearn(user)
else
to_chat(user, "<span class='warning'>This guide is too simple for me to learn any more from!</span>")
return
else
return
45 changes: 45 additions & 0 deletions code/modules/roguetown/roguecrafting/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,48 @@
skillcraft = /datum/skill/craft/traps
craftdiff = 1
verbage = "put together"

/datum/crafting_recipe/roguetown/paperscroll
name = "scroll of parchment (x5)"
result = list(/obj/item/paper/scroll,
/obj/item/paper/scroll,
/obj/item/paper/scroll,
/obj/item/paper/scroll,
/obj/item/paper/scroll)
reqs = list(/obj/item/grown/log/tree/small = 1,
/datum/reagent/water = 50)
tools = list(/obj/item/rogueweapon/huntingknife = 1)
structurecraft = /obj/structure/fluff/dryingrack
craftdiff = 1

/datum/crafting_recipe/roguetown/readingscroll
name = "novice's guide to literature"
result = list(/obj/item/literary)
reqs = list(/obj/item/paper/scroll = 5)
tools = list(/obj/item/natural/feather)
req_table = TRUE
skillcraft = /datum/skill/misc/reading
craftdiff = 2
verbage_simple = "write"
verbage = "writes"

/datum/crafting_recipe/roguetown/readingscroll/apprentice
name = "apprentice's guide to literature"
result = list(/obj/item/literary/apprentice)
craftdiff = 3

/datum/crafting_recipe/roguetown/readingscroll/journeyman
name = "journeyman's guide to literature"
result = list(/obj/item/literary/journeyman)
craftdiff = 4

/datum/crafting_recipe/roguetown/readingscroll/expert
name = "expert's guide to literature"
result = list(/obj/item/literary/expert)
craftdiff = 5

/datum/crafting_recipe/roguetown/readingscroll/master
name = "master's guide to literature"
result = list(/obj/item/literary/master)
craftdiff = 6

1 change: 1 addition & 0 deletions roguetown.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,7 @@
#include "code\game\objects\items\rogueitems\instruments.dm"
#include "code\game\objects\items\rogueitems\keyrings.dm"
#include "code\game\objects\items\rogueitems\keys.dm"
#include "code\game\objects\items\rogueitems\literary.dm"
#include "code\game\objects\items\rogueitems\magic.dm"
#include "code\game\objects\items\rogueitems\natural.dm"
#include "code\game\objects\items\rogueitems\needle.dm"
Expand Down

0 comments on commit c48dda3

Please sign in to comment.