<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://immwiki.addictmud.org/index.php?action=history&amp;feed=atom&amp;title=New_Spell%2FItem_Affects</id>
	<title>New Spell/Item Affects - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://immwiki.addictmud.org/index.php?action=history&amp;feed=atom&amp;title=New_Spell%2FItem_Affects"/>
	<link rel="alternate" type="text/html" href="https://immwiki.addictmud.org/index.php?title=New_Spell/Item_Affects&amp;action=history"/>
	<updated>2026-05-05T22:00:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://immwiki.addictmud.org/index.php?title=New_Spell/Item_Affects&amp;diff=2185&amp;oldid=prev</id>
		<title>Brazil: New page:  // the goal:  // create a generic way to treat both aff&#039;s and apply&#039;s as one thing  // if a spell does an apply and an affect, they become multiple modifiers  // if an object has a perm-a...</title>
		<link rel="alternate" type="text/html" href="https://immwiki.addictmud.org/index.php?title=New_Spell/Item_Affects&amp;diff=2185&amp;oldid=prev"/>
		<updated>2009-11-10T03:06:55Z</updated>

		<summary type="html">&lt;p&gt;New page:  // the goal:  // create a generic way to treat both aff&amp;#039;s and apply&amp;#039;s as one thing  // if a spell does an apply and an affect, they become multiple modifiers  // if an object has a perm-a...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; // the goal:&lt;br /&gt;
 // create a generic way to treat both aff&amp;#039;s and apply&amp;#039;s as one thing&lt;br /&gt;
 // if a spell does an apply and an affect, they become multiple modifiers&lt;br /&gt;
 // if an object has a perm-affect, it just looks like another apply&lt;br /&gt;
 // Maybe- spells redesigned into a list of modifiers, and if an item&lt;br /&gt;
 //     has a modifier that&amp;#039;s just a spellnum with flag == -1, then it&lt;br /&gt;
 //     applies that spell to who wears it!  genius!&lt;br /&gt;
 &lt;br /&gt;
 class Affect {&lt;br /&gt;
   public:&lt;br /&gt;
       Affect();&lt;br /&gt;
       ~Affect();&lt;br /&gt;
 &lt;br /&gt;
       bitfield flags;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       Modif *modifiers;&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 class Modif {&lt;br /&gt;
    public:&lt;br /&gt;
       Modif();&lt;br /&gt;
       ~Modif();&lt;br /&gt;
 &lt;br /&gt;
       int location; // AFF_XXX or APPLY_XXX (those will get renamed into one&lt;br /&gt;
                     // thing)&lt;br /&gt;
       int amt;&lt;br /&gt;
 &lt;br /&gt;
       int level;&lt;br /&gt;
       int duration;&lt;br /&gt;
       int spellnum; // -1 for no spell&lt;br /&gt;
 &lt;br /&gt;
       // conditions&lt;br /&gt;
       int cond_type; // moon phase, class, race, etc, -1 for N/A&lt;br /&gt;
       int cond_value; // which class or race, etc&lt;br /&gt;
                       // for some:&lt;br /&gt;
                       // 0 = cond_type == false&lt;br /&gt;
                       // 1 = cond_type == true&lt;br /&gt;
 &lt;br /&gt;
       game_data *obj; // person its on, or object&lt;br /&gt;
       game_data *caster; // for who cast the spell (good for damage spells!)&lt;br /&gt;
       event_data *event; // event_obj points back to this&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 // sanc spell&lt;br /&gt;
 Modifier:&lt;br /&gt;
   flag = AFF_SANCTUARY;&lt;br /&gt;
   level = 16;&lt;br /&gt;
   duration = 90; // seconds&lt;br /&gt;
   spellnum = SPELL_SANCTUARY;&lt;br /&gt;
   cond_type = -1;&lt;br /&gt;
   cond_value = 0;&lt;br /&gt;
   obj = ch;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 // damroll apply from an item (no conditionals)&lt;br /&gt;
 Modifier:&lt;br /&gt;
   flag = APPLY_DAMROLL;&lt;br /&gt;
   level = 0;&lt;br /&gt;
   duration = -1;&lt;br /&gt;
   spellnum = -1;&lt;br /&gt;
   cond_type = -1;&lt;br /&gt;
   cond_value = 0;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 // damroll apply from an item, with full moon condition&lt;br /&gt;
 Modifier:&lt;br /&gt;
   flag = APPLY_DAMROLL;&lt;br /&gt;
   level = 0;&lt;br /&gt;
   duration = -1;&lt;br /&gt;
   spellnum = -1;&lt;br /&gt;
   cond_type = APPLY_COND_MOON_FULL&lt;br /&gt;
   cond_value = 1; // 0 =&lt;/div&gt;</summary>
		<author><name>Brazil</name></author>
	</entry>
</feed>