summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-05-02 16:15:55 -0400
committerDavid Gay <david@davidgay.org>2021-05-02 16:15:55 -0400
commit7997e112fbc67eef309bb3969ad41f90a8bfbc89 (patch)
tree6da48af487ae581365fcc0d6d8fa6894e3724506
parent2b3422be0a68b18125bb471bef7adcc32cd3b486 (diff)
Add skills
-rw-r--r--app/models/skill.rb3
-rw-r--r--data/skills.yml120
-rw-r--r--db/migrate/20210502200959_create_skills.rb11
-rw-r--r--db/schema.rb10
-rw-r--r--db/seeds.rb9
-rw-r--r--test/fixtures/skills.yml9
-rw-r--r--test/models/skill_test.rb7
7 files changed, 168 insertions, 1 deletions
diff --git a/app/models/skill.rb b/app/models/skill.rb
new file mode 100644
index 0000000..b77165b
--- /dev/null
+++ b/app/models/skill.rb
@@ -0,0 +1,3 @@
+class Skill < ApplicationRecord
+ validates :gid, :name, :description, presence: true
+end
diff --git a/data/skills.yml b/data/skills.yml
new file mode 100644
index 0000000..7f3f5e9
--- /dev/null
+++ b/data/skills.yml
@@ -0,0 +1,120 @@
+---
+beastslay:
+ name: "Beastslay"
+ description: >-
+ Power, glory, and wealth. All are within the reach of a competent beastslayer. Beastslaying involves the
+ hunting and slaughter of all manner of creatures on the planes. From victories can be won power and treasures
+ unobtainable elsewhere, not to mention greater peace in civilized lands. By acquiring rare trophies from their
+ kills, beastslayers are able to target particular species for hunting. The skill also allows them to join with
+ other beastslayers to challenge leviathans, powerful horrors and behemoths that appear in the planes from time
+ to time.
+fluxseethe:
+ name: "Fluxseethe"
+ description: >-
+ Potions, oils, and powders of all kinds are used by near every denizen of the realms. Fluxseethe is the ability
+ to brew them. Their uses and complexity vary wildly, and the accumulation of recipes is the lifelong pursuit of
+ many. Experienced (and patient) fluxseethers can brew elixirs, fantastic liquids whose effects can last for weeks,
+ months... or a lifetime.
+havencast:
+ name: "Havencast"
+ description: >-
+ The old magic still breathes. New planes have been harnessed, and yet the old magic remains. Havencast offers a
+ wide range of cantrips: minor spells that can be exactly what one needs at the right time, solving a conundrum,
+ unsealing a lock, or giving another ability the extra kick it needs. In ages past, this magic was known far and
+ wide by the commonest fellow. Today, it is unknown to many. Gaining experience with Havencast can also allow for
+ the creation of charms, minor enchantments with wide applicability.
+hexcarve:
+ name: "Hexcarve"
+ description: >-
+ From nothing, life. This is the trade of the hexcarver, who fashions totems of all shapes and sizes from mere wood
+ and stone, and then and imbues them with enchantments that transform them into anything but. Totems are created for
+ uses of all kinds, sure, but the Hexcarvers are responsible also for the golems. Golems are earth given life -- or
+ at least, the illusion of life. Golems are employed by adventurers, soldiers, and craftsmen of all trades to
+ perform all sorts of tasks, from the menial to the life-threatening. Golems can be used to passively gather
+ resources, complete many crafting tasks, scout the lands, assist in combat, and more.
+magiculture:
+ name: "Magiculture"
+ description: >-
+ Land lies fallow in most parts of the world as traditional farming has evolved to something more: the breeding and
+ cultivation of smaller quantities of exceptional crops, on farms climbing vertically, to the sky, on tiered,
+ floating platforms filled with magically-imbued loam. Within each resultant crop can be condensed significant
+ energy. Their herb and root cousins can be distilled into chemical components for other crafts.
+manatrawl:
+ name: "Manatrawl"
+ description: >-
+ Descend, navigate, and discover new mana wells, extracting magical essences from below the surface of the world,
+ to be used in a variety of crafts. Manatrawling can also reveal uncommon and rare wisps, powerful aggregations of
+ essence that have developed minor sentience and considerable magical energy.
+omenbind:
+ name: "Omenbind"
+ description: >-
+ Magic is the stuff of life and death. Kingdoms have been won and lost by its hand. Knowing this, the ancients long
+ ago developed a technique for harnessing magical power and spells within physical objects like crystalline
+ batteries and gem-laden crowns. These power-imbued objects are called omens. The practice of omenbinding flourishes
+ to this day, and indeed the world would not be the same without its providing for saving and storing up power to be
+ used at a later time, or in greater mass. The most powerful omenbinders have been known to bind energy even within
+ flesh, though this practice is as risky as it is dangerous.
+otherforge:
+ name: "Otherforge"
+ description: >-
+ Materials of all kinds -- from all planes -- are combined in an arcane forge by otherforgers, who have the ability
+ to craft weapons, armor, and materials from even the most bizarre and phenomenal resources. Masterful otherforgers
+ have the power to smelt and temper magical energy itself into physical equipments, with incredible and otherworldly
+ results.
+planequarry:
+ name: "Planequarry"
+ description: >-
+ Travel to the far, rarely-trodden reaches of the home plane -- and other planes, through rifts -- in search of ores
+ and minerals. Planequarrying has the potential to turn up artifacts, which can have powerful affects on their own,
+ but can also be used a components in crafts granting power unattainable by other means.
+spicework:
+ name: "Spicework"
+ description: >-
+ Spices are a staple of life in the realms, adding powerful chemical effects to otherwise mundane foods. Rarely a
+ day goes by when even the poorer classes gain a boon from a spice-empowered meal. Spicework is not limited to
+ edibles however, at least not in the normal sense. Spicework is also responsible for the creation of an impressive
+ (or horrifying, depending on one's taste) assortment of drugs and poisons -- often one and the same.
+synthsever:
+ name: "Synthsever"
+ description: >-
+ The crafts of the age often require expertly-crafted tools, instruments, and devices. Their creation is the trade
+ of the synthsever. Artisans and tinkerers alike, synthsevers have invented and constructed many of the realm's most
+ incredible utensils and apparatuses. Synthsevers often hone their trade by disassembling objects and artifacts,
+ using the bits and pieces for future crafts. And when an adventurer discovers a mechanical relic of which no sense
+ can be made by anyone, they bring it to a master synthsever, the likes of which have been known to activate devices
+ of eons past.
+veilreach:
+ name: "Veilreach"
+ description: >-
+ In a realm where magic permeates life, it also reaches through death. Places of power freckle and cradle the
+ worlds, and past life lingers on. The vielreach skill allows the practitioner to commune with these latent forces
+ and use them for pleasure or pain. The secrets of some places may only be uncovered by a veilreacher. With
+ practice, a veilreacher can even learn to tap into the knowledge and power of beings long gone from the world.
+wealdreap:
+ name: "Wealdreap"
+ description: >-
+ The magical runoff and latent powers of the planes is the foodstuff of untold fungi and insects that absorb it
+ through the dust and dirt. Over eons, fungi and insects both mundane and extraordinary have developed and now have
+ wide use in the crafts. Some of the most powerful fungi is hardest to locate and identify, and the most exceptional
+ imbued insects will take skill and persistence to capture, crush, and consume. This can all be done with the
+ wealdreap skill.
+wildscour:
+ name: "Wildscour"
+ description: >-
+ The worlds are vast and the bounty great. But what of the hidden places, the untrodden wilds? The wildscour skill
+ represents your character's ability to forage and gather resources and boons unfindable in the common places. As a
+ side effect, it also increases your eye for spotting things in civilization, perhaps spotting something on the
+ roads that others have missed. Higher skill and good luck can give your character the chance to find curios, weird
+ anomalies of items with origins unlikely or even inexplainable. One curio can be equipped at a time, granting a
+ special boon... and maybe a curse, to match.
+worldcall:
+ name: "Worldcall"
+ description: >-
+ The travel magic of ages past pales in comparison to today's
+ practice. The worldcall skill allows for the magical transmission of materials, energy, and living beings through
+ the aether. Novice worldcallers may be found sending their voice or a sack of ore across the land, but we are no
+ longer limited to such trivial tasks. Even the transmission of an expeditionary force to another land is no longer
+ uncommon. Today, worldcalling is responsible for the rift gates that connect us to the other planes -- tears in the
+ fabric of the aether, rippling with indescribable lights and colors for which we once had no name. Powerful
+ worldcallers can leash realms beyond ours, fettering us to the beyond, and providing us with unlimited potential
+ for discovery, power, and adventure.
diff --git a/db/migrate/20210502200959_create_skills.rb b/db/migrate/20210502200959_create_skills.rb
new file mode 100644
index 0000000..dbe3d3e
--- /dev/null
+++ b/db/migrate/20210502200959_create_skills.rb
@@ -0,0 +1,11 @@
+class CreateSkills < ActiveRecord::Migration[6.1]
+ def change
+ create_table :skills do |t|
+ t.string :gid
+ t.string :name
+ t.text :description
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 6f2579f..5fc0f94 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,11 +10,19 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2021_04_22_014607) do
+ActiveRecord::Schema.define(version: 2021_05_02_200959) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
+ create_table "skills", force: :cascade do |t|
+ t.string "gid"
+ t.string "name"
+ t.text "description"
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ end
+
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
diff --git a/db/seeds.rb b/db/seeds.rb
index f3a0480..637a355 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -5,3 +5,12 @@
#
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
# Character.create(name: 'Luke', movie: movies.first)
+
+def load_data_file(path)
+ YAML.load(File.read(path)).deep_transform_keys(&:to_sym)
+end
+
+load_data_file("data/skills.yml").map do |gid, hash|
+ skill = Skill.find_or_create_by(gid: gid)
+ skill.update(hash)
+end
diff --git a/test/fixtures/skills.yml b/test/fixtures/skills.yml
new file mode 100644
index 0000000..382f6d8
--- /dev/null
+++ b/test/fixtures/skills.yml
@@ -0,0 +1,9 @@
+# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ name: MyString
+ description: MyText
+
+two:
+ name: MyString
+ description: MyText
diff --git a/test/models/skill_test.rb b/test/models/skill_test.rb
new file mode 100644
index 0000000..c36050f
--- /dev/null
+++ b/test/models/skill_test.rb
@@ -0,0 +1,7 @@
+require "test_helper"
+
+class SkillTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end