Page 1 of 1

knight mana return usage is bugging me

Posted: Sun Feb 06, 2011 9:55 pm
by lisa
Knight mana return gives mana back to the player and the amount depends on how many stacks of holy seals the target has.
The skill at the moment gets used pretty much straight away so the first time it's used the target generally has 1 stack so the mana gain to player is very low. For a while I have been using this in skills.xml

Code: Select all

	<skill name="KNIGHT_MANA_RETURN" aslevel="2" skilltab="4" skillnum="3" range="100" cooldown="8"  type="damage" target="enemy" reqbufftype="debuff" reqbuffcount="3" reqbufftarget="target" reqbuffname="Holy Seals (3)" />
So it only uses mana return when the target has 3 stacks. This works fine as long as the target lives long enough to get 3 stacks. At lower levels I find the mobs don't live that long or if you are overpowered for the mobs you are killing and the player mana runs low very quickly.

I think having it set to use the skill at 3 stacks is best but I also believe that having a back up plan is a good idea. If target hpper < 30 then use the skill before it dies, so even if it has just 2 stacks that is better then not using skill at all.

Anyone have any thoughts for the best way to implement something like this??

Re: knight mana return usage is bugging me

Posted: Mon Feb 07, 2011 12:53 am
by rock5
I think you would have to use <onSkillCast> in your profile. Just get the hp of your target and iff it's lower than 30 then use the skill.

Re: knight mana return usage is bugging me

Posted: Mon Feb 07, 2011 2:03 am
by lisa
I'm not a huge fan of putting code in each profile. I'm thinking I might make 1 userfunction that will cover most classes.
So mana return for knight at % of target hp.
I'll have to revisit each class to check out skills that would be best used at lower hp%. I can probably add in heals aswell for player % hp.

Anyone think of any other skills good for when hp % gets low, maybe that priest skill holy aura aswell.

I'm thinking

Code: Select all

function _lowHPSkill(_per)
lots of code
end
and have _per set in profile for what % to use the skills.
so in profile

Code: Select all

	<onSkillCast><![CDATA[

		_lowHPSkill(30)

	]]></onSkillCast>

Re: knight mana return usage is bugging me

Posted: Mon Feb 07, 2011 3:01 am
by rock5
Some code has to be per profile as different classes have different needs. Even different characters of the same class might have different needs.

Shared functions are most useful when not dependent on character attributes, like my lootbodies or catchcavy functions.

But everyone does thing their own way. I guess a function to check the targets hp might simplify thing.