forked from andrecronje/rarity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spells-wizard-transmutation-0.sol
155 lines (149 loc) · 5.72 KB
/
spells-wizard-transmutation-0.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
contract codex {
string constant public index = "Spells";
string constant public class = "Wizard";
string constant public school = "Transmutation";
uint constant public level = 0;
function spell_by_id(uint _id) external pure returns(
uint id,
string memory name,
bool verbal,
bool somatic,
bool focus,
uint xp_cost,
uint time,
uint range,
uint duration,
uint saving_throw_type,
uint saving_throw_effect,
bool spell_resistance,
string memory description
) {
if (_id == 14) {
return mage_hand();
} else if (_id == 15) {
return mending();
} else if (_id == 16) {
return message();
} else if (_id == 17) {
return open_close();
}
}
function mage_hand() public pure returns (
uint id,
string memory name,
bool verbal,
bool somatic,
bool focus,
uint xp_cost,
uint time,
uint range,
uint duration,
uint saving_throw_type,
uint saving_throw_effect,
bool spell_resistance,
string memory description
) {
id = 14;
name = "Mage Hand";
verbal = true;
somatic = true;
focus = false;
xp_cost = 0;
time = 1;
range = 2;
duration = 1;
saving_throw_type = 0;
saving_throw_effect = 0;
spell_resistance = false;
description = "You point your finger at an object and can lift it and move it at will from a distance. As a move action, you can propel the object as far as 15 feet in any direction, though the spell ends if the distance between you and the object ever exceeds the spells range.";
}
function mending() public pure returns (
uint id,
string memory name,
bool verbal,
bool somatic,
bool focus,
uint xp_cost,
uint time,
uint range,
uint duration,
uint saving_throw_type,
uint saving_throw_effect,
bool spell_resistance,
string memory description
) {
id = 15;
name = "Mending";
verbal = true;
somatic = true;
focus = false;
xp_cost = 0;
time = 1;
range = 2;
duration = 0;
saving_throw_type = 3;
saving_throw_effect = 3;
spell_resistance = true;
description = "Mending repairs small breaks or tears in objects (but not warps, such as might be caused by a warp wood spell). It will weld broken metallic objects such as a ring, a chain link, a medallion, or a slender dagger, providing but one break exists. Ceramic or wooden objects with multiple breaks can be invisibly rejoined to be as strong as new. A hole in a leather sack or a wineskin is completely healed over by mending. The spell can repair a magic item, but the items magical abilities are not restored. The spell cannot mend broken magic rods, staffs, or wands, nor does it affect creatures (including constructs).";
}
function message() public pure returns (
uint id,
string memory name,
bool verbal,
bool somatic,
bool focus,
uint xp_cost,
uint time,
uint range,
uint duration,
uint saving_throw_type,
uint saving_throw_effect,
bool spell_resistance,
string memory description
) {
id = 16;
name = "Message";
verbal = true;
somatic = true;
focus = true;
xp_cost = 0;
time = 1;
range = 3;
duration = 600;
saving_throw_type = 0;
saving_throw_effect = 0;
spell_resistance = false;
description = "You can whisper messages and receive whispered replies with little chance of being overheard. You point your finger at each creature you want to receive the message. When you whisper, the whispered message is audible to all targeted creatures within range. Magical silence, 1 foot of stone, 1 inch of common metal (or a thin sheet of lead), or 3 feet of wood or dirt blocks the spell. The message does not have to travel in a straight line. It can circumvent a barrier if there is an open path between you and the subject, and the paths entire length lies within the spells range. The creatures that receive the message can whisper a reply that you hear. The spell transmits sound, not meaning. It doesnt transcend language barriers. Note: To speak a message, you must mouth the words and whisper, possibly allowing observers the opportunity to read your lips.";
}
function open_close() public pure returns (
uint id,
string memory name,
bool verbal,
bool somatic,
bool focus,
uint xp_cost,
uint time,
uint range,
uint duration,
uint saving_throw_type,
uint saving_throw_effect,
bool spell_resistance,
string memory description
) {
id = 17;
name = "Open/Close";
verbal = true;
somatic = true;
focus = true;
xp_cost = 0;
time = 1;
range = 2;
duration = 0;
saving_throw_type = 3;
saving_throw_effect = 3;
spell_resistance = true;
description = "You can open or close (your choice) a door, chest, box, window, bag, pouch, bottle, barrel, or other container. If anything resists this activity (such as a bar on a door or a lock on a chest), the spell fails. In addition, the spell can only open and close things weighing 30 pounds or less. Thus, doors, chests, and similar objects sized for enormous creatures may be beyond this spells ability to affect.";
}
}