sorcery  Diff

Differences From Artifact [63249807d4]:

  • File data/resonance.lua — part of check-in [3f6a913e4e] at 2020-09-29 12:40:28 on branch trunk — * remove former hacky registration system, replace with consistent and flexible API; rewrite metal/gem generation to take advantage of this new API; tweaks to init system to enable world-local tweaks to lore and sorcery behavior * initial documentation commit * initial steps towards calendar - add default date format, astrolabe; prepare infra for division/melding/transmutation spells, various tweaks and fixes (user: lexi, size: 128) [annotate] [blame] [check-ins using]

To Artifact [17afb80492]:

  • File data/resonance.lua — part of check-in [ea6e475e44] at 2020-10-19 09:52:11 on branch trunk — continue dev on celestial mechanics, add melding+division spells (resonance), refine itemclasses, add keypunch and punchcards, add paper pulp, add a shitload of visuals, add convenience scripts for working with the wiki, make the flamebolt spell actually useful instead of just a pretty lightshow, add essences, inferno crystal, and other goodies; iterate on wands, lots of shit i can't remember, various bugfixes (user: lexi, size: 1824) [annotate] [blame] [check-ins using]

1
2










































































-- resonance is a mechanic whereby items which 'resonate' can be
-- transformed into each other by use of the divide/meld wands










































































|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
-- resonance is a mechanic whereby give which 'resonate' can be
-- transformed into each other by use of the divide/meld wands

local function
undersign(signs) return function(ctx)
	local stars = sorcery.calendar.stars(ctx.today);
	for _,s in pairs(signs) do
		if stars.sign.id == s then return true end
	end
	return false
end end

local function
undermoon(min,max) return function(ctx)
	local date = sorcery.calendar.date(ctx.today);
	return date.lunar_phase >= min and date.lunar_phase <= max
end end

-- TODO: add value annotations, make high spell power prefer items of higher value
return {
	divide = {
		-- remember to check for leftovers!
		['sorcery:flame_oil'] = {
			mode = 'random';
			give = {
				'sorcery:ash';
				'sorcery:essence_flame';
			};
		};
		['bucket:bucket_lava'] = {
			mode = 'random';
			replacement = 'bucket:bucket_empty';
			give = {
				'sorcery:essence_flame';
				'sorcery:powder_firestorm';
			};
		};
		['sorcery:inferno_crystal'] = {
			mode = 'set';
			give = {
				'sorcery:essence_flame';
				'sorcery:essence_flame';
				'sorcery:gem_ruby';
			};
		};
		['default:mese_crystal'] = {
			mode = 'random';
			give = {
				'default:mese_fragment';
				'sorcery:essence_force';
			};
		};
	};

	meld = {
		{
			set = { 'sorcery:gem_ruby', 'sorcery:ingot_lithium', 'tnt:gunpowder' };
			restrict = undersign {'wyvern','wserpent'};
			results = { 'sorcery:inferno_crystal' };
		};
		{
			set = {
				'default:snow', 'default:ice', {
					take = 'bucket:bucket_water';
					replacement = 'bucket:bucket_empty';
				};
			};
			results = { 'sorcery:essence_frost' };
		};
		-- {
		-- 	set = { 'sorcery:essence_flame', 'sorcery:essence_frost', 'sorcery:essence_force' };
		-- 	restrict = undersign {'wolfprince'};
		-- 	results = (something very powerful?) "Elemental? Dynamo"
		-- };
	};
};