[1.1.5] Metaclass - Mage Knight (Version 8)

A place to post your add ons and ideas for them

Moderator: Moderator

Message
Author
zhouwei_e
Cornac
Posts: 35
Joined: Tue Feb 14, 2012 10:01 am

Re: [b37] Metaclass - Mage Knight (Version 4)

#31 Post by zhouwei_e »

hi

I 'm chinese player, charoxuan and me translate your addon and post it on

http://bbs.3dmgame.com/thread-2862644-1-1.html

Many people are very interested in this metaclass addon.

thank you very much.

i have some questions

1.
Every talent point invested in the Phoenix Wings tree grants 1 point of fire damage when hit

on hit?

or

on takehit?

it did work on takehit,is that true?


2.
improves Fear Resistance and Blindness Resistance by 3%

self.blind_immune = (self.fear_blind or 0) + 0.03

maybe

self.blind_immune = (self.blind_immune or 0) + 0.03




3.
and allowed you to fall 10 more hit points below 0 before dying

Code: Select all

	on_learn = function(self, t)
		self.die_at = self.die_at + 10
	end,
	on_unlearn = function(self, t)
		self.die_at = self.die_at - 10
	end,
maybe need switch them

4.
timed_effects.lua

WINGS_OF_PROTECTION

did it work now?

5.
Light of Vigor

Your Light of Healing also increases the target's regeneration rate by 10%% of the healing for %d turns

only increases HP regen, is that true?

6.
load.lua

Code: Select all

		-- Figure out how much we CAN absorb
		if mana <= (self.max_mana * 0.1) then
			mana_val = 0
			absorb = 0
			game.logPlayer(self, "Not enough mana to absorb.")
		end


		if mana - mana_val < (self.max_mana * 0.1) then
			mana_val_tmp =  (mana - (self.max_nana * 0.1))
			fullvalue = absorb
			mpct = mana_val_tmp / mana_val
			absorb = math.floor(absorb * mpct)
			mana_val = math.floor(mana_val_tmp)
			game.logPlayer(self, "Can't absorb the full value ("..fullvalue.."),try to absorb ("..mpct.."%) value ("..absorb..").")
		end

how about this

7.
magical-combat.lua

Code: Select all

			to = self.T_HEALING_LIGHT
			if self:knowTalent(to) and mana > self:getTalentFromId(to).mana * fatigue and not self:isTalentCoolingDown(to) then
				if self.life < (self.max_life * 0.75) then
					spells[#spells+1] = to 
				end

				if self.life < (self.max_life * 0.5) then  
					spells[#spells+1] = to
					spells[#spells+1] = to
				end

				if self.life < (self.max_life * 0.25) then  
					spells[#spells+1] = to
					spells[#spells+1] = to
					spells[#spells+1] = to
				end
			end
More chance

Code: Select all

			to = self.T_SPELLSURGE
			if self:knowTalent(to) and not self:isTalentCoolingDown(to) then 
				spells[#spells+1] = to
				if self.mana < (self.max_mana * 0.75) then
					spells[#spells+1] = to 
				end

				if self.mana < (self.max_mana * 0.5) then 
					spells[#spells+1] = to
					spells[#spells+1] = to
				end

				if self.mana < (self.max_mana * 0.25) then 
					spells[#spells+1] = to
					spells[#spells+1] = to
					spells[#spells+1] = to
				end
			end
less mana more chance

how about this
Last edited by zhouwei_e on Tue Feb 14, 2012 6:59 pm, edited 1 time in total.

MisiuPysiu
Archmage
Posts: 379
Joined: Tue Nov 11, 2003 10:54 am
Location: Wroclaw/Poland

Re: [b37] Metaclass - Mage Knight (Version 4)

#32 Post by MisiuPysiu »

I've run the Phoenix Knight till lev 28. The class doesn't fell that overpowered as it used to be in the previous versions. Still its quite powerfull. The achilles feed of the class is mobility. The only way to get some is to use Rush, which requires a use of a category point. I think its good this way.
Sadly I had to quit the char on lev 28. I got the celestial/Light talent tree from an escort. After unlocking the tree and investing one point in healing light the game bugget out. Errors everytime i attacked some mob made the game unplayable. After removing the point from the healing light, bugs didn't appear anymore. The Mage Knight skills bugged out...
The main nuke couldn't be set to burst, healing did not work at all.
Its a shame, i liked playing this class very much.

Avianpilot
Thalore
Posts: 148
Joined: Fri Aug 19, 2011 5:06 pm

Re: [b37] Metaclass - Mage Knight (Version 4)

#33 Post by Avianpilot »

MisiuPysiu, is it possible that other addons are conflicting with it? Standard question I know, but I've already run into one 'bug' that was just a conflict of addons (I had also been trying out Hirumakai's reworked Arcane Blade, and that interfered with Arcane Combat such that the Phoenix Knight's abilities never triggered).

MisiuPysiu
Archmage
Posts: 379
Joined: Tue Nov 11, 2003 10:54 am
Location: Wroclaw/Poland

Re: [b37] Metaclass - Mage Knight (Version 4)

#34 Post by MisiuPysiu »

Nope, I removed all other addons (was using only the improved stun egos anyway). The problem remained.
I would love to start another Mage Knight, a Might Knight this time but Im concerned about such bugs... The Light Tree is a good one for the Phoenix Knight, sadly i couldn't use it...

Phoenix1
Thalore
Posts: 160
Joined: Mon Dec 05, 2011 8:25 pm

Re: [b37] Metaclass - Mage Knight (Version 4)

#35 Post by Phoenix1 »

...Well what would have caused that?

I'll do some experimenting, see if I can figure out the problem. Sorry about that!

EDIT: Okay, that's what caused that. Apparently I had Light of Healing misnamed as Healing Light in Arcane Combat. I had a niggling thought that Light of Healing hadn't been triggering very often...

Since Healing Light does indeed exist, but Phoenix Knights don't know it, it just passed it over. But once you got it, it tried to use it, couldn't find its mana, and threw an error. Any error in Arcane Combat tends to throw that "upvalue force_target" error when targeting spells in the future.

Fortunately, in a recent thread, yufra helped someone with a similar problem. You have to activate cheat mode, go to the lua console, and type in:

Code: Select all

game.player.getTarget = mod.class.Player.getTarget
I tested the error and solution, and it all worked for me, so if you didn't delete the character, it should be salvageable.

I also uploaded a patch that will prevent that problem in the future (and, helpfully, make Light of Healing actually trigger). I believe you should be able to just replace the addon with the patch without any problems with the character, and be able to get Healing Light again.

MisiuPysiu
Archmage
Posts: 379
Joined: Tue Nov 11, 2003 10:54 am
Location: Wroclaw/Poland

Re: [b37] Metaclass - Mage Knight (Version 4)

#36 Post by MisiuPysiu »

That is a real nice bug :) I'm glad You found it so quickly. I will try the p. Knight again. The last time i run out of patience and killed the char a few times in a row.
Its only a few hours of gameplay lost :)

zhouwei_e
Cornac
Posts: 35
Joined: Tue Feb 14, 2012 10:01 am

Re: [b37] Metaclass - Mage Knight (Version 4)

#37 Post by zhouwei_e »

magical-combat.lua

shield.special_combat

where is it

Phoenix1
Thalore
Posts: 160
Joined: Mon Dec 05, 2011 8:25 pm

Re: [b37] Metaclass - Mage Knight (Version 4)

#38 Post by Phoenix1 »

As far as I understand, shield.special_combat is just how you call a shield bash attack. I'm not sure where in the actual code it's defined.

zhouwei_e
Cornac
Posts: 35
Joined: Tue Feb 14, 2012 10:01 am

Re: [b37] Metaclass - Mage Knight (Version 4)

#39 Post by zhouwei_e »

at now, trigger the Light Of Healing but no effect

Code: Select all

				if tid == self.T_LIGHT_OF_HEALING then
					print("[ARCANE COMBAT] autocast ",self:getTalentFromId(tid).name)
					local old_cd = self:isTalentCoolingDown(self:getTalentFromId(tid))
					self:forceUseTalent(tid, {ignore_energy=true, force_target=self})
					-- Do not setup a cooldown.
					if not old_cd then
						self.talents_cd[tid] = nil
					end
					self.changed = true
				else
					print("[ARCANE COMBAT] autocast ",self:getTalentFromId(tid).name)
					local old_cd = self:isTalentCoolingDown(self:getTalentFromId(tid))
					self:forceUseTalent(tid, {ignore_energy=true, force_target={x=target_x, y=target_y, __no_self=true}})
					-- Do not setup a cooldown.
					if not old_cd then
						self.talents_cd[tid] = nil
					end
					self.changed = true
				end
this maybe help you

zhouwei_e
Cornac
Posts: 35
Joined: Tue Feb 14, 2012 10:01 am

Re: [b37] Metaclass - Mage Knight (Version 4)

#40 Post by zhouwei_e »

Code: Select all

if self:attr("shielding_aura") then
		local mana = self:getMana()
		-- Calculate how much to absorb.
		local tolife = math.floor(self.life - data.value)
		local dmgpct = (self.max_life - tolife) / self.max_life
		local apct = (dmgpct - 0.5) * 2
		local dmg = math.floor(data.value)
		
		if apct < 0 then
			apct = 0
		end
		if apct > 1 then
			apct = 1
		end
		if apct > 0 then
			game.logPlayer(self, "Attack of "..dmg.." would send you to "..tolife..". Aura of Protection intervenes.")
		end
		local mana_val = math.floor(data.value * apct * self:attr("shielding_aura"))
		local absorb = math.floor(data.value * apct)
		local fullvalue = absorb
		local mana_val_tmp = 0
		local mpct = 0
		local rmana = 0
		local rlife = 0
	  -- Figure out how much we CAN absorb
		if mana <= (self.max_mana * 0.1) then
			mana_val = 0
			absorb = 0
			game.logPlayer(self, "Not enough mana to absorb.")
		end
		
		if mana - mana_val < (self.max_mana * 0.1) and mana_val > 0  then
			mana_val_tmp =  mana - (self.max_mana * 0.1)
			mpct =  math.floor(mana_val_tmp / mana_val * 100)
			absorb =  math.floor(absorb * mpct / 100)
			mana_val = math.floor(mana_val_tmp)
			if absorb == 0 then
				mana_val = 0
				absorb = 0
				game.logPlayer(self, "Not enough mana to absorb.")
			else
				game.logPlayer(self, "Can't absorb the full value ("..fullvalue.."), try  to absorb ("..mpct.."%%) value ("..absorb..").")
		end
		
		end

		if mana_val > 0 then
			self:incMana(-mana_val)
			data.value = data.value - absorb
			rmana = math.floor(self.mana)
			rlife = math.floor(self.life)
			game.logPlayer(self, "Your Aura of Protection absorbs  "..absorb.." damage and converts it to "..mana_val.." mana loss.")
			game.logPlayer(self, "You have "..rlife.." Life and "..rmana.." Mana remaining.")
		end
		
		if data.value == 0 then
			return 0
		else
			return data.value
		end
	end
how about this

zhouwei_e
Cornac
Posts: 35
Joined: Tue Feb 14, 2012 10:01 am

Re: [b37] Metaclass - Mage Knight (Version 4)

#41 Post by zhouwei_e »

Code: Select all

if self.mk_target == "bolt" then
					target_x, target_y = target.x, target.y
only bolt need

because wave,burst and blast are AoE

Phoenix1
Thalore
Posts: 160
Joined: Mon Dec 05, 2011 8:25 pm

Re: [b37] Metaclass - Mage Knight (Version 4)

#42 Post by Phoenix1 »

Yeah I noticed the healing thing myself, something about if not target simply ending it rather than setting target to self, that's fixed, just need to upload it. I...believe the bolt and blast Arcane Combat also target correctly now, but not sure if I've uploaded since that change.

I'm...not entirely sure what you're pointing out with the shielding aura.

zhouwei_e
Cornac
Posts: 35
Joined: Tue Feb 14, 2012 10:01 am

Re: [b37] Metaclass - Mage Knight (Version 4)

#43 Post by zhouwei_e »

use percentage to replace the original operating mode

zhouwei_e
Cornac
Posts: 35
Joined: Tue Feb 14, 2012 10:01 am

Re: [b37] Metaclass - Mage Knight (Version 4)

#44 Post by zhouwei_e »

If I killed the enemy, <Eldritch Combat> will not trigger a spell, how to solve this problem

sometime maybe AOE,and sometime maybe heal me

Phoenix1
Thalore
Posts: 160
Joined: Mon Dec 05, 2011 8:25 pm

Re: [b37] Metaclass - Mage Knight (Version 4)

#45 Post by Phoenix1 »

I think the code that tells it not to trigger if the target dies is in the main combat code, which would probably require overloading to change. I hadn't really thought about if it should trigger even on a kill. It is less likely to be a waste since, as you say, AoE effects and support spells are possible. At the same time, unless there are more enemies around, it's just going to burn off mana whatever triggers. It's an interesting question, will have to give it some thought.

Post Reply