<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fspell_costs</id>
	<title>Manual:DIL Manual/spell costs - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fspell_costs"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/spell_costs&amp;action=history"/>
	<updated>2026-11-22T19:51:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/spell_costs&amp;diff=2899&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/spell_costs&amp;diff=2899&amp;oldid=prev"/>
		<updated>2026-11-14T23:11:46Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= spell_costs =&lt;br /&gt;
'''Field''' (integer, read-only; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.spell_costs[i] : integer&lt;br /&gt;
&lt;br /&gt;
How easy spell &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; is for the player's race to learn: the &amp;lt;code&amp;gt;race&amp;lt;/code&amp;gt; line for that race in the spell's entry in &amp;lt;code&amp;gt;vme/etc/spells.def&amp;lt;/code&amp;gt;, from -3 (extremely hard) to +3 (extremely easy), 0 when the file gives none. Guild teachers use it in the price of a practice. It depends only on the race, not on the player.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Read-only, although vmc accepts an assignment: at run time the program logs &amp;quot;DIL SERIOUS: ... Type error in lvalue assignemt&amp;quot; and stops.&lt;br /&gt;
* Players only. On an NPC, an object, a room or null, or with an index outside 0 to &amp;lt;code&amp;gt;SPL_TREE_MAX&amp;lt;/code&amp;gt; - 1, the field fails.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin string spl_ease(pc : unitptr, spl : integer);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (pc.type != UNIT_ST_PC)&lt;br /&gt;
      return (&amp;quot;&amp;quot;);&lt;br /&gt;
   if (pc.spell_costs[spl] &amp;gt; 0)&lt;br /&gt;
      return (&amp;quot;easier than usual&amp;quot;);&lt;br /&gt;
   else if (pc.spell_costs[spl] &amp;lt; 0)&lt;br /&gt;
      return (&amp;quot;harder than usual&amp;quot;);&lt;br /&gt;
   return (&amp;quot;normal&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tells a player whether a spell comes easier or harder to their race.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/spells|spells]]&lt;br /&gt;
* [[Manual:DIL Manual/spell levels|spell_levels]]&lt;br /&gt;
* [[Manual:DIL Manual/skill costs|skill_costs]]&lt;br /&gt;
* [[Manual:DIL Manual/race|race]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>