pfrpg_skills 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/pfrpg_skills/skill/acrobatics.rb +17 -0
- data/lib/pfrpg_skills/skill/appraise.rb +17 -0
- data/lib/pfrpg_skills/skill/bluff.rb +21 -0
- data/lib/pfrpg_skills/skill/climb.rb +21 -0
- data/lib/pfrpg_skills/skill/craft.rb +59 -0
- data/lib/pfrpg_skills/skill/diplomacy.rb +22 -0
- data/lib/pfrpg_skills/skill/disable_device.rb +22 -0
- data/lib/pfrpg_skills/skill/disguise.rb +22 -0
- data/lib/pfrpg_skills/skill/escape_artist.rb +22 -0
- data/lib/pfrpg_skills/skill/fly.rb +22 -0
- data/lib/pfrpg_skills/skill/handle_animal.rb +22 -0
- data/lib/pfrpg_skills/skill/heal.rb +21 -0
- data/lib/pfrpg_skills/skill/intimidate.rb +22 -0
- data/lib/pfrpg_skills/skill/knowledge.rb +48 -0
- data/lib/pfrpg_skills/skill/linguistics.rb +22 -0
- data/lib/pfrpg_skills/skill/perception.rb +22 -0
- data/lib/pfrpg_skills/skill/perform.rb +49 -0
- data/lib/pfrpg_skills/skill/profession.rb +68 -0
- data/lib/pfrpg_skills/skill/ride.rb +22 -0
- data/lib/pfrpg_skills/skill/sense_motive.rb +22 -0
- data/lib/pfrpg_skills/skill/sleight_of_hand.rb +22 -0
- data/lib/pfrpg_skills/skill/spellcraft.rb +22 -0
- data/lib/pfrpg_skills/skill/stealth.rb +21 -0
- data/lib/pfrpg_skills/skill/survival.rb +22 -0
- data/lib/pfrpg_skills/skill/swim.rb +22 -0
- data/lib/pfrpg_skills/skill/use_magic_device.rb +22 -0
- data/lib/pfrpg_skills/skill.rb +97 -0
- data/lib/pfrpg_skills/version.rb +3 -0
- data/lib/pfrpg_skills.rb +6 -0
- metadata +100 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 76fd2ac592d50372fbb5a919a6600680a820c1b4
|
4
|
+
data.tar.gz: 6033ccf44e330b5271ad9cc602c47b6759c92ff1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 55c08cd8b2dcf15a71635762c50746c6b4104d5d2fb4e0af380fe051d0a01531049a20a14c3dc656541232b7f7184f82a09b39e45d6017b244f676c7885d4f91
|
7
|
+
data.tar.gz: 64fe600bd50542332464278bfbbc9dadcec9024ea579dd33fec06e53ea0bac9cbbbdef98269f9714a36d2ff76606490b92aba206c0e8f6b7945eb0d9cd0c23bf
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class PfrpgSkills::Skill::Bluff
|
2
|
+
def description
|
3
|
+
'bluff'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'cha'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Bluff", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class PfrpgSkills::Skill::Climb
|
2
|
+
def description
|
3
|
+
'climb'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'str'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
true
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Climb", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
class PfrpgSkills::Skill::Craft
|
2
|
+
def initialize(subject='Armor')
|
3
|
+
@subject = subject
|
4
|
+
end
|
5
|
+
|
6
|
+
def bonus_str
|
7
|
+
"craft-#{@subject}"
|
8
|
+
end
|
9
|
+
|
10
|
+
def description
|
11
|
+
"craft : #{@subject}"
|
12
|
+
end
|
13
|
+
|
14
|
+
def attribute
|
15
|
+
'int'
|
16
|
+
end
|
17
|
+
|
18
|
+
def untrained?
|
19
|
+
true
|
20
|
+
end
|
21
|
+
|
22
|
+
def ac_penalty?
|
23
|
+
false
|
24
|
+
end
|
25
|
+
|
26
|
+
def to_s
|
27
|
+
Skill.stringify_skill("Craft #{@subject}", attribute, ac_penalty?)
|
28
|
+
end
|
29
|
+
|
30
|
+
def supported_types
|
31
|
+
[
|
32
|
+
'Alchemy',
|
33
|
+
'Armor',
|
34
|
+
'Baskets',
|
35
|
+
'Books',
|
36
|
+
'Bows',
|
37
|
+
'Calligraphy',
|
38
|
+
'Carpentry',
|
39
|
+
'Cloth',
|
40
|
+
'Clothing',
|
41
|
+
'Glass',
|
42
|
+
'Jewelry',
|
43
|
+
'Leather',
|
44
|
+
'Locks',
|
45
|
+
'Paintings',
|
46
|
+
'Pottery',
|
47
|
+
'Sculptures',
|
48
|
+
'Ships',
|
49
|
+
'Shoes',
|
50
|
+
'Stonemasonry',
|
51
|
+
'Traps',
|
52
|
+
'Weapons'
|
53
|
+
]
|
54
|
+
end
|
55
|
+
|
56
|
+
def subtype
|
57
|
+
@subject
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::Diplomacy
|
2
|
+
def description
|
3
|
+
'diplomacy'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'cha'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Diplomacy", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::DisableDevice
|
2
|
+
def description
|
3
|
+
'disable_device'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'dex'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
false
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
true
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Disable Device", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::Disguise
|
2
|
+
def description
|
3
|
+
'disguise'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'cha'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Disguise", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::EscapeArtist
|
2
|
+
def description
|
3
|
+
'escape_artist'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'dex'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
true
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Escape Artist", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::Fly
|
2
|
+
def description
|
3
|
+
'fly'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'dex'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
true
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Fly", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::HandleAnimal
|
2
|
+
def description
|
3
|
+
'handle_animal'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'cha'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
false
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Handle Animal", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class PfrpgSkills::Skill::Heal
|
2
|
+
def description
|
3
|
+
'heal'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'wis'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Heal", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::Intimidate
|
2
|
+
def description
|
3
|
+
'intimidate'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'cha'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Intimidate", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
class PfrpgSkills::Skill::Knowledge
|
2
|
+
|
3
|
+
def initialize(subject)
|
4
|
+
@subject = subject
|
5
|
+
end
|
6
|
+
|
7
|
+
def bonus_str
|
8
|
+
"knowledge-#{@subject}"
|
9
|
+
end
|
10
|
+
|
11
|
+
def description
|
12
|
+
"knowledge : #{@subject}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def attribute
|
16
|
+
'int'
|
17
|
+
end
|
18
|
+
|
19
|
+
def untrained?
|
20
|
+
false
|
21
|
+
end
|
22
|
+
|
23
|
+
def ac_penalty?
|
24
|
+
false
|
25
|
+
end
|
26
|
+
|
27
|
+
def to_s
|
28
|
+
Skill.stringify_skill("Knowledge - #{@subject}", attribute, ac_penalty?)
|
29
|
+
end
|
30
|
+
|
31
|
+
def supported_types
|
32
|
+
[ 'Arcana',
|
33
|
+
'Dungeoneering',
|
34
|
+
'Engineering',
|
35
|
+
'Geography',
|
36
|
+
'History',
|
37
|
+
'Local',
|
38
|
+
'Nature',
|
39
|
+
'Nobility',
|
40
|
+
'Planes',
|
41
|
+
'Religion'
|
42
|
+
]
|
43
|
+
end
|
44
|
+
|
45
|
+
def subtype
|
46
|
+
@subject
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::Linguistics
|
2
|
+
def description
|
3
|
+
'linguistics'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'int'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
false
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Linguistics", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::Perception
|
2
|
+
def description
|
3
|
+
'perception'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'wis'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Perception", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
class PfrpgSkills::Skill::Perform
|
2
|
+
|
3
|
+
def initialize(subject='Sing')
|
4
|
+
@subject = subject
|
5
|
+
end
|
6
|
+
|
7
|
+
def bonus_str
|
8
|
+
"perform-#{@subject}"
|
9
|
+
end
|
10
|
+
|
11
|
+
def description
|
12
|
+
"perform : #{@subject}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def attribute
|
16
|
+
'cha'
|
17
|
+
end
|
18
|
+
|
19
|
+
def untrained?
|
20
|
+
true
|
21
|
+
end
|
22
|
+
|
23
|
+
def ac_penalty?
|
24
|
+
false
|
25
|
+
end
|
26
|
+
|
27
|
+
def to_s
|
28
|
+
Skill.stringify_skill("Perform - #{@subject}", attribute, ac_penalty?)
|
29
|
+
end
|
30
|
+
|
31
|
+
def supported_types
|
32
|
+
[
|
33
|
+
'Act',
|
34
|
+
'Comedy',
|
35
|
+
'Dance',
|
36
|
+
'Keyboard',
|
37
|
+
'Oratory',
|
38
|
+
'Percussion',
|
39
|
+
'Sing',
|
40
|
+
'String',
|
41
|
+
'Wind'
|
42
|
+
]
|
43
|
+
end
|
44
|
+
|
45
|
+
def subtype
|
46
|
+
@subject
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
@@ -0,0 +1,68 @@
|
|
1
|
+
class PfrpgSkills::Skill::Profession
|
2
|
+
def initialize(subject='Butcher')
|
3
|
+
@subject = subject
|
4
|
+
end
|
5
|
+
|
6
|
+
def bonus_str
|
7
|
+
"profession-#{@subject}"
|
8
|
+
end
|
9
|
+
|
10
|
+
def description
|
11
|
+
"profession : #{@subject}"
|
12
|
+
end
|
13
|
+
|
14
|
+
def attribute
|
15
|
+
'wis'
|
16
|
+
end
|
17
|
+
|
18
|
+
def untrained?
|
19
|
+
false
|
20
|
+
end
|
21
|
+
|
22
|
+
def ac_penalty?
|
23
|
+
false
|
24
|
+
end
|
25
|
+
|
26
|
+
def to_s
|
27
|
+
Skill.stringify_skill("Profession - #{@subject}", attribute, ac_penalty?)
|
28
|
+
end
|
29
|
+
|
30
|
+
def supported_types
|
31
|
+
[
|
32
|
+
'Architect',
|
33
|
+
'Baker',
|
34
|
+
'Barrister',
|
35
|
+
'Brewer',
|
36
|
+
'Butcher',
|
37
|
+
'Clerk',
|
38
|
+
'Cook',
|
39
|
+
'Courtesan',
|
40
|
+
'Driver',
|
41
|
+
'Engineer',
|
42
|
+
'Farmer',
|
43
|
+
'Fisherman',
|
44
|
+
'Gambler',
|
45
|
+
'Gardener',
|
46
|
+
'Herbalist',
|
47
|
+
'Innkeeper',
|
48
|
+
'Librarian',
|
49
|
+
'Merchant',
|
50
|
+
'Midwife',
|
51
|
+
'Miller',
|
52
|
+
'Miner',
|
53
|
+
'Porter',
|
54
|
+
'Sailor',
|
55
|
+
'Scribe',
|
56
|
+
'Shepherd',
|
57
|
+
'Stable master',
|
58
|
+
'Soldier',
|
59
|
+
'Tanner',
|
60
|
+
'Trapper',
|
61
|
+
'Woodcutter',
|
62
|
+
]
|
63
|
+
end
|
64
|
+
|
65
|
+
def subtype
|
66
|
+
@subject
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::Ride
|
2
|
+
def description
|
3
|
+
'ride'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'dex'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
true
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Ride", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::SenseMotive
|
2
|
+
def description
|
3
|
+
'sense_motive'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'wis'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Sense Motive", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::SleightOfHand
|
2
|
+
def description
|
3
|
+
'sleight_of_hand'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'dex'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
false
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
true
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Sleight of Hand", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::Spellcraft
|
2
|
+
def description
|
3
|
+
'spellcraft'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'int'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
false
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Spellcraft", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class PfrpgSkills::Skill::Stealth
|
2
|
+
def description
|
3
|
+
'stealth'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'dex'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
true
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Stealth", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::Survival
|
2
|
+
def description
|
3
|
+
'survival'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'wis'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Survival", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::Swim
|
2
|
+
def description
|
3
|
+
'swim'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'str'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
true
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
true
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Swim", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class PfrpgSkills::Skill::UseMagicDevice
|
2
|
+
def description
|
3
|
+
'use_magic_device'
|
4
|
+
end
|
5
|
+
|
6
|
+
def attribute
|
7
|
+
'cha'
|
8
|
+
end
|
9
|
+
|
10
|
+
def untrained?
|
11
|
+
false
|
12
|
+
end
|
13
|
+
|
14
|
+
def ac_penalty?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
Skill.stringify_skill("Use Magic Device", attribute, ac_penalty?)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,97 @@
|
|
1
|
+
module PfrpgSkills
|
2
|
+
class Skill
|
3
|
+
|
4
|
+
def self.skill_list
|
5
|
+
skills = [
|
6
|
+
Skill::Acrobatics.new,
|
7
|
+
Skill::Appraise.new,
|
8
|
+
Skill::Bluff.new,
|
9
|
+
Skill::Climb.new,
|
10
|
+
Skill::Diplomacy.new,
|
11
|
+
Skill::DisableDevice.new,
|
12
|
+
Skill::Disguise.new,
|
13
|
+
Skill::EscapeArtist.new,
|
14
|
+
Skill::Fly.new,
|
15
|
+
Skill::HandleAnimal.new,
|
16
|
+
Skill::Heal.new,
|
17
|
+
Skill::Intimidate.new,
|
18
|
+
Skill::Knowledge.new('Arcana'),
|
19
|
+
Skill::Knowledge.new('Dungeoneering'),
|
20
|
+
Skill::Knowledge.new('Engineering'),
|
21
|
+
Skill::Knowledge.new('Geography'),
|
22
|
+
Skill::Knowledge.new('History'),
|
23
|
+
Skill::Knowledge.new('Local'),
|
24
|
+
Skill::Knowledge.new('Nature'),
|
25
|
+
Skill::Knowledge.new('Nobility'),
|
26
|
+
Skill::Knowledge.new('Planes'),
|
27
|
+
Skill::Knowledge.new('Religion'),
|
28
|
+
Skill::Linguistics.new,
|
29
|
+
Skill::Perception.new,
|
30
|
+
Skill::Ride.new,
|
31
|
+
Skill::SenseMotive.new,
|
32
|
+
Skill::SleightOfHand.new,
|
33
|
+
Skill::Spellcraft.new,
|
34
|
+
Skill::Stealth.new,
|
35
|
+
Skill::Survival.new,
|
36
|
+
Skill::Swim.new,
|
37
|
+
Skill::UseMagicDevice.new
|
38
|
+
]
|
39
|
+
[Skill::Craft,Skill::Profession, Skill::Perform].each do |skil|
|
40
|
+
s = skil.new('NONE')
|
41
|
+
s.supported_types.each do |stype|
|
42
|
+
skills << skil.new(stype)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
return skills
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.stringify_skill(name, attribute, ac_penalty)
|
49
|
+
ac_penalty_str = ac_penalty ? "*" : ""
|
50
|
+
return "#{name} (#{attribute})#{ac_penalty_str}"
|
51
|
+
end
|
52
|
+
|
53
|
+
# TODO : raise a smarter error /w invalid type
|
54
|
+
def self.fetch_by_name(name)
|
55
|
+
return class_with_type(name) if contains_type?(name)
|
56
|
+
return typeless_class(name)
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.class_with_type(name)
|
60
|
+
begin
|
61
|
+
type = type_from_name(name)
|
62
|
+
classname = class_from_name_with_type(name)
|
63
|
+
skill = classname.constantize.new(type)
|
64
|
+
return skill if skill.supported_types.include?(type)
|
65
|
+
rescue NameError => e
|
66
|
+
end
|
67
|
+
return false
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.typeless_class(name)
|
71
|
+
begin
|
72
|
+
classname = class_from_name(name)
|
73
|
+
skill = classname.constantize.new
|
74
|
+
return skill
|
75
|
+
rescue NameError => e
|
76
|
+
end
|
77
|
+
return false
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.contains_type?(name)
|
81
|
+
name[':']
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.type_from_name(name)
|
85
|
+
name.split(':')[1].strip.capitalize
|
86
|
+
end
|
87
|
+
|
88
|
+
def self.class_from_name_with_type(name)
|
89
|
+
"Skill::#{name.split(':')[0].gsub(/\s+/, "").camelize}"
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.class_from_name(name)
|
93
|
+
"Skill::#{name.gsub(/\s+/, "").camelize}"
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
97
|
+
end
|
data/lib/pfrpg_skills.rb
ADDED
metadata
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pfrpg_skills
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jordan OMara
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.1.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.1.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sqlite3
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: skills
|
42
|
+
email:
|
43
|
+
- jordan@herosheets.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- lib/pfrpg_skills.rb
|
49
|
+
- lib/pfrpg_skills/skill.rb
|
50
|
+
- lib/pfrpg_skills/skill/acrobatics.rb
|
51
|
+
- lib/pfrpg_skills/skill/appraise.rb
|
52
|
+
- lib/pfrpg_skills/skill/bluff.rb
|
53
|
+
- lib/pfrpg_skills/skill/climb.rb
|
54
|
+
- lib/pfrpg_skills/skill/craft.rb
|
55
|
+
- lib/pfrpg_skills/skill/diplomacy.rb
|
56
|
+
- lib/pfrpg_skills/skill/disable_device.rb
|
57
|
+
- lib/pfrpg_skills/skill/disguise.rb
|
58
|
+
- lib/pfrpg_skills/skill/escape_artist.rb
|
59
|
+
- lib/pfrpg_skills/skill/fly.rb
|
60
|
+
- lib/pfrpg_skills/skill/handle_animal.rb
|
61
|
+
- lib/pfrpg_skills/skill/heal.rb
|
62
|
+
- lib/pfrpg_skills/skill/intimidate.rb
|
63
|
+
- lib/pfrpg_skills/skill/knowledge.rb
|
64
|
+
- lib/pfrpg_skills/skill/linguistics.rb
|
65
|
+
- lib/pfrpg_skills/skill/perception.rb
|
66
|
+
- lib/pfrpg_skills/skill/perform.rb
|
67
|
+
- lib/pfrpg_skills/skill/profession.rb
|
68
|
+
- lib/pfrpg_skills/skill/ride.rb
|
69
|
+
- lib/pfrpg_skills/skill/sense_motive.rb
|
70
|
+
- lib/pfrpg_skills/skill/sleight_of_hand.rb
|
71
|
+
- lib/pfrpg_skills/skill/spellcraft.rb
|
72
|
+
- lib/pfrpg_skills/skill/stealth.rb
|
73
|
+
- lib/pfrpg_skills/skill/survival.rb
|
74
|
+
- lib/pfrpg_skills/skill/swim.rb
|
75
|
+
- lib/pfrpg_skills/skill/use_magic_device.rb
|
76
|
+
- lib/pfrpg_skills/version.rb
|
77
|
+
homepage: http://herosheets.com
|
78
|
+
licenses: []
|
79
|
+
metadata: {}
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
requirements: []
|
95
|
+
rubyforge_project:
|
96
|
+
rubygems_version: 2.2.2
|
97
|
+
signing_key:
|
98
|
+
specification_version: 4
|
99
|
+
summary: Generic PFRPG skills
|
100
|
+
test_files: []
|