berkana.xml 7.14 KB
Newer Older
1 2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
Maiyannah Bishop's avatar
Maiyannah Bishop committed
3
<MudletPackage version="1.001">
4 5 6 7 8 9 10 11 12
	<TriggerPackage />
	<TimerPackage />
	<AliasPackage />
	<ActionPackage />
	<ScriptPackage>
		<Script isActive="yes" isFolder="no">
			<name>Berkana.Core</name>
			<packageName></packageName>
			<script>-- =============================================================================
13 14
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
15 16
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
17
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
18
--
19
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
20 21
--
-- scripts_combat.xml
22
--    The various backend scripts that fight and directly support us fighting
23 24 25
--
-- @package     Scripts
-- @category    Combat
26
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
27
-- @copyright   2006-2020 Maiyannah Bishop
28
-- @link        valkryja.com
29 30
-- =============================================================================

31 32
Berkana = Berkana or {}

33 34 35 36
function Berkana.Message(string)
   cecho("&lt;BlueViolet&gt;(&lt;CornflowerBlue&gt;&lt;BlueViolet&gt;) &lt;reset&gt;" ..tostring(string).. "&lt;reset&gt;\n")
end

37 38
-- END OF SCRIPT
-- =============================================================================</script>
39 40 41 42 43 44
			<eventHandlerList />
		</Script>
		<Script isActive="yes" isFolder="no">
			<name>Berkana.Targetting</name>
			<packageName></packageName>
			<script>-- Scripts-Combat-Targetting
Maiyannah Bishop's avatar
Maiyannah Bishop committed
45
-- =============================================================================
46 47
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
48 49
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
50
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
51
--
52
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
53 54 55 56 57 58 59 60
--
-- targetting
--    QOL aliases for targetting and the like, and means by which the system
--    remembers our target(s).
--
-- @package     Scripts
-- @category    Combat
-- @subcategory Targetting
61
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
62
-- @copyright   2006-2020 Maiyannah Bishop
63
-- @link        valkryja.com
Maiyannah Bishop's avatar
Maiyannah Bishop committed
64
-- =============================================================================
65

66 67
-- Consider putting these in Berkana namespace
Valkryja.CurrTarget   = Valkryja.CurrTarget or "none"
68 69
Valkryja.Targets      = Valkryja.Targets or {}
Valkryja.CurrentIndex = Valkryja.CurrentIndex or 1
70

71 72 73
-- -----------------------------------------------------------------------------
-- Function: Berkana.setTarget
-- Registers a single target in berkana
74
function Berkana.setTarget(tar)
75
   Valkryja.CurrTarget = tar
76 77 78
   Valkryja.Targets = {}
   Valkryja.Targets[1] = tar
   Valkryja.CurrentIndex = 1
79
   send("st tar "..Valkryja.CurrTarget)
80 81
   if (Berkana.PVPMode==true) then
      send("unally "..Valkryja.CurrTarget)
82
      send("enemy "..Valkryja.CurrTarget)
83
   end
84
   tar = nil
85 86 87
   raiseEvent("berkanaTargetChange")
end

88 89
-- Multiple targets is done in the alias itself, because lua is stupid with
-- arrays as args
90 91 92

-- END OF SCRIPT
-- =============================================================================</script>
93 94 95 96 97 98
			<eventHandlerList />
		</Script>
		<ScriptGroup isActive="yes" isFolder="yes">
			<name>Bashing</name>
			<packageName></packageName>
			<script>-------------------------------------------------
99 100 101 102 103
--         Put your Lua functions here.        --
--                                             --
-- Note that you can also use external scripts --
-------------------------------------------------
</script>
104 105 106 107 108
			<eventHandlerList />
			<Script isActive="yes" isFolder="no">
				<name>Berkana.Bashing</name>
				<packageName></packageName>
				<script>-- Scripts-Combat-Bashing
109 110 111 112 113 114 115
-- =============================================================================
-- VALKRYJA V1.0   |          MULTI-MUD UI AND SYSTEM FOR MUDLET 3.21.0
-- ----------------+------------------------------------------------------------
-- This system is distributed under specific licensing terms specified in
-- &lt;readme.md&gt;   You should have received a copy of this file with the system
-- and if you did not, you can receive a copy from &lt;maiyannah@valkryja.com&gt;
--
116
-- VALKYRJA MUD SYSTEM is (c) 2006-2020 Maiyannah Bishop
117 118 119 120 121 122 123 124 125
--
-- bashing
--    The backend for our bashing system, which contains all the functions that
--    do the heavy lifting of bashing - aka, hitting the things with the things!
--
-- @package     Scripts
-- @category    Combat
-- @subcategory Bashing
-- @author      Maiyannah Bishop &lt;maiyannah@valkryja.com&gt;
126
-- @copyright   2006-2020 Maiyannah Bishop
127 128 129
-- @link        valkryja.com
-- =============================================================================

130 131
function Berkana.AutoBash()
   if (Valkryja.isImperian()==true) then
132
      Valkryja.Debug("Berkana used Imperian class strike", false)
133
      Berkana.Imperian.doPreflight()
134
      Berkana.Imperian.ClassStrike()
135
      Berkana.Imperian.doPostflight()
136 137 138 139
   end
   return true
end

140 141
-- END OF SCRIPT
-- ============================================================================</script>
142 143 144 145 146 147
				<eventHandlerList />
			</Script>
			<Script isActive="yes" isFolder="no">
				<name>Berkana.onBalance</name>
				<packageName></packageName>
				<script>-- ==============================================================================
148 149 150 151
-- Function: Character.gainBalance
-- Event handler for when we gain balance.  Pretty simple interface to the table 
-- entry which is appropriate.
function Berkana.onBalance()
152
   if (Valkryja.AutoBash==true) then
153
       Valkryja.Debug("Berkana recognized balance gain.", false)
154 155
      Berkana.AutoBash()
   end
156 157 158 159 160
end


-- END OF SCRIPT
-- =============================================================================</script>
161 162 163 164 165 166 167 168 169
				<eventHandlerList>
					<string>gainBalance</string>
					<string>possibleBalance</string>
				</eventHandlerList>
			</Script>
			<Script isActive="yes" isFolder="no">
				<name>Berkana.onEquilibrium</name>
				<packageName></packageName>
				<script>-- ==============================================================================
170 171 172 173 174
-- Function: Character.gainEquilibrium
-- Event handler for when we gain EQ.  Pretty simple interface to the table 
-- entry which is appropriate.
function Berkana.onEquilibrium()
   if (Valkryja.AutoBash==true) then
175 176
       Valkryja.Debug("Berkana recognized equilibrium gain.", false)
         Valkryja.Debug("Character.Balances.Equilibrium="..tostring(Character.Balances.Equilibrium), false)
177 178 179 180 181 182 183
      Berkana.AutoBash()
   end
end


-- END OF SCRIPT
-- =============================================================================</script>
184 185 186 187 188 189 190 191 192 193 194
				<eventHandlerList>
					<string>gainEquilibrium</string>
					<string>possibleBalance</string>
				</eventHandlerList>
			</Script>
		</ScriptGroup>
	</ScriptPackage>
	<KeyPackage />
	<HelpPackage>
		<helpURL></helpURL>
	</HelpPackage>
195
</MudletPackage>