mirror of
https://github.com/evennia/evennia.git
synced 2026-03-19 14:26:30 +01:00
682 lines
No EOL
58 KiB
HTML
682 lines
No EOL
58 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||
|
||
<title>evennia.contrib.tutorials.evadventure.npcs — Evennia 1.0-dev documentation</title>
|
||
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||
<script src="../_static/jquery.js"></script>
|
||
<script src="../_static/underscore.js"></script>
|
||
<script src="../_static/doctools.js"></script>
|
||
<script src="../_static/language_data.js"></script>
|
||
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Search" href="../search.html" />
|
||
<link rel="next" title="evennia.contrib.tutorials.evadventure.objects" href="evennia.contrib.tutorials.evadventure.objects.html" />
|
||
<link rel="prev" title="evennia.contrib.tutorials.evadventure.equipment" href="evennia.contrib.tutorials.evadventure.equipment.html" />
|
||
</head><body>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.contrib.tutorials.evadventure.objects.html" title="evennia.contrib.tutorials.evadventure.objects"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.contrib.tutorials.evadventure.equipment.html" title="evennia.contrib.tutorials.evadventure.equipment"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-4"><a href="evennia.contrib.html" >evennia.contrib</a> »</li>
|
||
<li class="nav-item nav-item-5"><a href="evennia.contrib.tutorials.html" >evennia.contrib.tutorials</a> »</li>
|
||
<li class="nav-item nav-item-6"><a href="evennia.contrib.tutorials.evadventure.html" accesskey="U">evennia.contrib.tutorials.evadventure</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">evennia.contrib.tutorials.evadventure.npcs</a></li>
|
||
</ul>
|
||
<div class="develop">develop branch</div>
|
||
</div>
|
||
|
||
<div class="document">
|
||
|
||
<div class="documentwrapper">
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<p class="logo"><a href="../index.html">
|
||
<img class="logo" src="../_static/evennia_logo.png" alt="Logo"/>
|
||
</a></p>
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="../search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script>$('#searchbox').show(0);</script>
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="evennia.contrib.tutorials.evadventure.equipment.html"
|
||
title="previous chapter">evennia.contrib.tutorials.evadventure.equipment</a></p>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="evennia.contrib.tutorials.evadventure.objects.html"
|
||
title="next chapter">evennia.contrib.tutorials.evadventure.objects</a></p>
|
||
<div role="note" aria-label="source link">
|
||
<!--h3>This Page</h3-->
|
||
<ul class="this-page-menu">
|
||
<li><a href="../_sources/api/evennia.contrib.tutorials.evadventure.npcs.md.txt"
|
||
rel="nofollow">Show Page Source</a></li>
|
||
</ul>
|
||
</div><h3>Links</h3>
|
||
<ul>
|
||
<li><a href="https://www.evennia.com">Home page</a> </li>
|
||
<li><a href="https://github.com/evennia/evennia">Evennia Github</a> </li>
|
||
<li><a href="http://games.evennia.com">Game Index</a> </li>
|
||
<li>
|
||
<a href="https://discord.gg/AJJpcRUhtF">Discord</a> -
|
||
<a href="https://github.com/evennia/evennia/discussions">Discussions</a> -
|
||
<a href="https://evennia.blogspot.com/">Blog</a>
|
||
</li>
|
||
</ul>
|
||
<h3>Versions</h3>
|
||
<ul>
|
||
<li><a href="evennia.contrib.tutorials.evadventure.npcs.html">1.0-dev (develop branch)</a></li>
|
||
<li><a href="../../0.9.5/index.html">0.9.5 (v0.9.5 branch)</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<section id="module-evennia.contrib.tutorials.evadventure.npcs">
|
||
<span id="evennia-contrib-tutorials-evadventure-npcs"></span><h1>evennia.contrib.tutorials.evadventure.npcs<a class="headerlink" href="#module-evennia.contrib.tutorials.evadventure.npcs" title="Permalink to this headline">¶</a></h1>
|
||
<p>EvAdventure NPCs. This includes both friends and enemies, only separated by their AI.</p>
|
||
<dl class="py class">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tutorials.evadventure.npcs.</code><code class="sig-name descname">EvAdventureNPC</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureNPC"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="evennia.contrib.tutorials.evadventure.characters.html#evennia.contrib.tutorials.evadventure.characters.LivingMixin" title="evennia.contrib.tutorials.evadventure.characters.LivingMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.characters.LivingMixin</span></code></a>, <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultCharacter" title="evennia.objects.objects.DefaultCharacter"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultCharacter</span></code></a></p>
|
||
<p>This is the base class for all non-player entities, including monsters. These
|
||
generally don’t advance in level but uses a simplified, abstract measure of how
|
||
dangerous or competent they are - the ‘hit dice’ (HD).</p>
|
||
<p>HD indicates how much health they have and how hard they hit. In _Knave_, HD also
|
||
defaults to being the bonus for all abilities. HP is 4 x Hit die (this can then be
|
||
customized per-entity of course).</p>
|
||
<p>Morale is set explicitly per-NPC, usually between 7 and 9.</p>
|
||
<p>Monsters don’t use equipment in the way PCs do, instead they have a fixed armor
|
||
value, and their Abilities are dynamically generated from the HD (hit_dice).</p>
|
||
<p>If wanting monsters or NPCs that can level and work the same as PCs, base them off the
|
||
EvAdventureCharacter class instead.</p>
|
||
<p>The weapon of the npc is stored as an Attribute instead of implementing a full
|
||
inventory/equipment system. This means that the normal inventory can be used for
|
||
non-combat purposes (or for loot to get when killing an enemy).</p>
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.is_pc">
|
||
<code class="sig-name descname">is_pc</code><em class="property"> = False</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.is_pc" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.hit_dice">
|
||
<code class="sig-name descname">hit_dice</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.hit_dice" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.armor">
|
||
<code class="sig-name descname">armor</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.armor" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.morale">
|
||
<code class="sig-name descname">morale</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.morale" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.hp_multiplier">
|
||
<code class="sig-name descname">hp_multiplier</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.hp_multiplier" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.hp">
|
||
<code class="sig-name descname">hp</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.hp" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.allegiance">
|
||
<code class="sig-name descname">allegiance</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.allegiance" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.is_idle">
|
||
<code class="sig-name descname">is_idle</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.is_idle" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.weapon">
|
||
<code class="sig-name descname">weapon</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.weapon" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.coins">
|
||
<code class="sig-name descname">coins</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.coins" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.strength">
|
||
<em class="property">property </em><code class="sig-name descname">strength</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.strength" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.dexterity">
|
||
<em class="property">property </em><code class="sig-name descname">dexterity</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.dexterity" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.constitution">
|
||
<em class="property">property </em><code class="sig-name descname">constitution</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.constitution" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.intelligence">
|
||
<em class="property">property </em><code class="sig-name descname">intelligence</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.intelligence" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.wisdom">
|
||
<em class="property">property </em><code class="sig-name descname">wisdom</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.wisdom" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.charisma">
|
||
<em class="property">property </em><code class="sig-name descname">charisma</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.charisma" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.hp_max">
|
||
<em class="property">property </em><code class="sig-name descname">hp_max</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.hp_max" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.at_object_creation">
|
||
<code class="sig-name descname">at_object_creation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureNPC.at_object_creation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.at_object_creation" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Start with max health.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.ai_combat_next_action">
|
||
<code class="sig-name descname">ai_combat_next_action</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureNPC.ai_combat_next_action"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.ai_combat_next_action" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The combat engine should ask this method in order to
|
||
get the next action the npc should perform in combat.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py exception">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.DoesNotExist">
|
||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultCharacter.DoesNotExist" title="evennia.objects.objects.DefaultCharacter.DoesNotExist"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultCharacter.DoesNotExist</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py exception">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.MultipleObjectsReturned">
|
||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="evennia.objects.objects.html#evennia.objects.objects.DefaultCharacter.MultipleObjectsReturned" title="evennia.objects.objects.DefaultCharacter.MultipleObjectsReturned"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.objects.objects.DefaultCharacter.MultipleObjectsReturned</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC'</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.typename">
|
||
<code class="sig-name descname">typename</code><em class="property"> = 'EvAdventureNPC'</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.typename" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tutorials.evadventure.npcs.</code><code class="sig-name descname">EvAdventureTalkativeNPC</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureTalkativeNPC"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC</span></code></a></p>
|
||
<p>Talkative NPCs can be addressed by <strong>talk [to] <npc></strong>. This opens a chat menu with
|
||
communication options. The menu is created with the npc and we override the .create
|
||
to allow passing in the menu nodes.</p>
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.menudata">
|
||
<code class="sig-name descname">menudata</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.menudata" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.menu_kwargs">
|
||
<code class="sig-name descname">menu_kwargs</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.menu_kwargs" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.hi_text">
|
||
<code class="sig-name descname">hi_text</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.hi_text" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.at_damage">
|
||
<code class="sig-name descname">at_damage</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">damage</span></em>, <em class="sig-param"><span class="n">attacker</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureTalkativeNPC.at_damage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.at_damage" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Talkative NPCs are generally immortal (we don’t deduct HP here by default).”</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.create">
|
||
<em class="property">classmethod </em><code class="sig-name descname">create</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">account</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureTalkativeNPC.create"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.create" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Overriding the creation of the NPC, allowing some extra <strong>**kwargs</strong>.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>key</strong> (<em>str</em>) – Name of the new object.</p></li>
|
||
<li><p><strong>account</strong> (<em>Account</em><em>, </em><em>optional</em>) – Account to attribute this object to.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Keyword Arguments</dt>
|
||
<dd class="field-even"><ul class="simple">
|
||
<li><p><strong>description</strong> (<em>str</em>) – Brief description for this object (same as default Evennia)</p></li>
|
||
<li><p><strong>ip</strong> (<em>str</em>) – IP address of creator (for object auditing) (same as default Evennia).</p></li>
|
||
<li><p><strong>menudata</strong> (<em>dict</em><em> or </em><em>str</em>) – The <strong>menudata</strong> argument to <strong>EvMenu</strong>. This is either a dict of
|
||
<strong>{“nodename”: <node_callable>,…}</strong> or the python-path to a module containing
|
||
such nodes (see EvMenu docs). This will be used to generate the chat menu
|
||
chat menu for the character that talks to the NPC (which means the <strong>at_talk</strong> hook
|
||
is called (by our custom <strong>talk</strong> command).</p></li>
|
||
<li><p><strong>menu_kwargs</strong> (<em>dict</em>) – This will be passed as <strong>**kwargs</strong> into <strong>EvMenu</strong> when it
|
||
is created. Make sure this dict can be pickled to an Attribute.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p><em>tuple</em> – <strong>(new_character, errors)</strong>. On error, the <strong>new_character</strong> is <strong>None</strong> and
|
||
<strong>errors</strong> is a <strong>list</strong> of error strings (an empty list otherwise).</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.at_talk">
|
||
<code class="sig-name descname">at_talk</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">talker</span></em>, <em class="sig-param"><span class="n">startnode</span><span class="o">=</span><span class="default_value">'node_start'</span></em>, <em class="sig-param"><span class="n">session</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureTalkativeNPC.at_talk"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.at_talk" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Called by the <strong>talk</strong> command when another entity addresses us.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>talker</strong> (<em>Object</em>) – The one talking to us.</p></li>
|
||
<li><p><strong>startnode</strong> (<em>str</em><em>, </em><em>optional</em>) – Allows to start in a different location in the menu tree.
|
||
The given node must exist in the tree.</p></li>
|
||
<li><p><strong>session</strong> (<a class="reference internal" href="evennia.server.session.html#evennia.server.session.Session" title="evennia.server.session.Session"><em>Session</em></a><em>, </em><em>optional</em>) – The talker’s current session, allows for routing
|
||
correctly in multi-session modes.</p></li>
|
||
<li><p><strong>**kwargs</strong> – This will be passed into the <strong>EvMenu</strong> creation and appended and <strong>menu_kwargs</strong>
|
||
given to the NPC at creation.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
<p class="rubric">Notes</p>
|
||
<p>We pass <strong>npc=self</strong> into the EvMenu for easy back-reference. This will appear in the
|
||
<strong>**kwargs</strong> of the start node.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py exception">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.DoesNotExist">
|
||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.DoesNotExist" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.DoesNotExist"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.DoesNotExist</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py exception">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.MultipleObjectsReturned">
|
||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.MultipleObjectsReturned" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.MultipleObjectsReturned"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.MultipleObjectsReturned</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC'</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.typename">
|
||
<code class="sig-name descname">typename</code><em class="property"> = 'EvAdventureTalkativeNPC'</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.typename" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.node_start">
|
||
<code class="sig-prename descclassname">evennia.contrib.tutorials.evadventure.npcs.</code><code class="sig-name descname">node_start</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">caller</span></em>, <em class="sig-param"><span class="n">raw_string</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#node_start"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.node_start" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>This is the intended start menu node for the Talkative NPC interface. It will
|
||
use on-npc Attributes to build its message and will also pick its options
|
||
based on nodes named <strong>node_start_*</strong> are available in the node tree.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureQuestGiver">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tutorials.evadventure.npcs.</code><code class="sig-name descname">EvAdventureQuestGiver</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureQuestGiver"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureQuestGiver" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC</span></code></a></p>
|
||
<p>An NPC that acts as a dispenser of quests.</p>
|
||
<dl class="py exception">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureQuestGiver.DoesNotExist">
|
||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureQuestGiver.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.DoesNotExist" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.DoesNotExist"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.DoesNotExist</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py exception">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureQuestGiver.MultipleObjectsReturned">
|
||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureQuestGiver.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.MultipleObjectsReturned" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.MultipleObjectsReturned"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.MultipleObjectsReturned</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureQuestGiver.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.tutorials.evadventure.npcs.EvAdventureQuestGiver'</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureQuestGiver.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureQuestGiver.typename">
|
||
<code class="sig-name descname">typename</code><em class="property"> = 'EvAdventureQuestGiver'</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureQuestGiver.typename" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tutorials.evadventure.npcs.</code><code class="sig-name descname">EvAdventureShopKeeper</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureShopKeeper"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC</span></code></a></p>
|
||
<p>ShopKeeper NPC.</p>
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.upsell_factor">
|
||
<code class="sig-name descname">upsell_factor</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.upsell_factor" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.miser_factor">
|
||
<code class="sig-name descname">miser_factor</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.miser_factor" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.common_ware_prototypes">
|
||
<code class="sig-name descname">common_ware_prototypes</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.common_ware_prototypes" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.at_damage">
|
||
<code class="sig-name descname">at_damage</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">damage</span></em>, <em class="sig-param"><span class="n">attacker</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureShopKeeper.at_damage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.at_damage" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Immortal - we don’t deduct any damage here.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py exception">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.DoesNotExist">
|
||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.DoesNotExist" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.DoesNotExist"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.DoesNotExist</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py exception">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.MultipleObjectsReturned">
|
||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.MultipleObjectsReturned" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.MultipleObjectsReturned"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureTalkativeNPC.MultipleObjectsReturned</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper'</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.typename">
|
||
<code class="sig-name descname">typename</code><em class="property"> = 'EvAdventureShopKeeper'</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureShopKeeper.typename" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.contrib.tutorials.evadventure.npcs.</code><code class="sig-name descname">EvAdventureMob</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureMob"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC</span></code></a></p>
|
||
<p>Mob (mobile) NPC; this is usually an enemy.</p>
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.loot_chance">
|
||
<code class="sig-name descname">loot_chance</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.loot_chance" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Attribute property descriptor. Allows for specifying Attributes as Django-like ‘fields’
|
||
on the class level. Note that while one can set a lock on the Attribute,
|
||
there is no way to <em>check</em> said lock when accessing via the property - use
|
||
the full AttributeHandler if you need to do access checks.</p>
|
||
<p>Example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Character</span><span class="p">(</span><span class="n">DefaultCharacter</span><span class="p">):</span>
|
||
<span class="n">foo</span> <span class="o">=</span> <span class="n">AttributeProperty</span><span class="p">(</span><span class="n">default</span><span class="o">=</span><span class="s2">"Bar"</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.ai_combat_next_action">
|
||
<code class="sig-name descname">ai_combat_next_action</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">combathandler</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureMob.ai_combat_next_action"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.ai_combat_next_action" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Called to get the next action in combat.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>combathandler</strong> (<a class="reference internal" href="evennia.contrib.tutorials.evadventure.combat_turnbased.html#evennia.contrib.tutorials.evadventure.combat_turnbased.EvAdventureCombatHandler" title="evennia.contrib.tutorials.evadventure.combat_turnbased.EvAdventureCombatHandler"><em>EvAdventureCombatHandler</em></a>) – The currently active combathandler.</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p><em>tuple</em> – A tuple <strong>(str, tuple, dict)</strong>, being the <strong>action_key</strong>, and the <strong>*args</strong> and
|
||
<strong>**kwargs</strong> for that action. The action-key is that of a CombatAction available to the
|
||
combatant in the current combat handler.</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.at_defeat">
|
||
<code class="sig-name descname">at_defeat</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureMob.at_defeat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.at_defeat" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Mobs die right away when defeated, no death-table rolls.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.at_do_loot">
|
||
<code class="sig-name descname">at_do_loot</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">looted</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/contrib/tutorials/evadventure/npcs.html#EvAdventureMob.at_do_loot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.at_do_loot" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Called when mob gets to loot a PC.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py exception">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.DoesNotExist">
|
||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.DoesNotExist" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.DoesNotExist"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.DoesNotExist</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py exception">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.MultipleObjectsReturned">
|
||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.MultipleObjectsReturned" title="evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.MultipleObjectsReturned"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.contrib.tutorials.evadventure.npcs.EvAdventureNPC.MultipleObjectsReturned</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob'</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.typename">
|
||
<code class="sig-name descname">typename</code><em class="property"> = 'EvAdventureMob'</em><a class="headerlink" href="#evennia.contrib.tutorials.evadventure.npcs.EvAdventureMob.typename" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.contrib.tutorials.evadventure.objects.html" title="evennia.contrib.tutorials.evadventure.objects"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.contrib.tutorials.evadventure.equipment.html" title="evennia.contrib.tutorials.evadventure.equipment"
|
||
>previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 1.0-dev</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-4"><a href="evennia.contrib.html" >evennia.contrib</a> »</li>
|
||
<li class="nav-item nav-item-5"><a href="evennia.contrib.tutorials.html" >evennia.contrib.tutorials</a> »</li>
|
||
<li class="nav-item nav-item-6"><a href="evennia.contrib.tutorials.evadventure.html" >evennia.contrib.tutorials.evadventure</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">evennia.contrib.tutorials.evadventure.npcs</a></li>
|
||
</ul>
|
||
<div class="develop">develop branch</div>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2020, The Evennia developer community.
|
||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
||
</div>
|
||
</body>
|
||
</html> |