|
Post by phlinn on Apr 8, 2008 17:15:49 GMT -5
A few things when i was looking in elements.lua. Only the first is a definite bug.
1. Block magic doesn't add dex to the block chance.
2. Are regular melee hits handled elsewhere? I was originally checking on how regular blocks are handled, because I don't think i've blocked anything yet. But it's not done anywhere in this script.
3. A single point in block magic will block any life blast spells i think, unless they can be set to do over 500% damage from monsters.
4. Block magic conflicts with the extremely unlikely chance of being hit by a str boosting effect. I'm guessing, because it's not commented, that this isn't an issue because if who == -2, then the source is the player, which I am hoping applies to thrown potions as well. I'd hate to throw a healing potion with a radius at an ally next to me and fail to heal myself.
5. Are resistances applied somewhere else for the pure elements? Because split elements like frostfire are the only resistances checked in element_hit_player.
6. Style comment: Might I suggest using more returns for early exits? There's lots of examples of "if element == SOME_ELEMENT then <block of code> end" followed by the same thing for a different element. A return would let the process avoid even checking those next elements.
|
|
|
Post by sekira on Apr 8, 2008 18:00:05 GMT -5
I confirmed all your points except the single element resist. Its in there.
The second comment is a little confusing being right there, but then immediately after this code, the dual and triple type elements are coded... I think it might be because you can theoretically get resistance to some or maybe all the dual or triple types (though how this would happen would be interesting as they aren't generated on items normally), and then get another chance to resist the seperate components of the dual and triple types as well.
|
|
|
Post by Variaz on Apr 8, 2008 18:13:57 GMT -5
1. Beat the Knight of Balance to get the Sword of Balance. 2. Use Essence Transfer to transfer the Grey brand to a potion. 3. Use Alchemic Resistance. And there you go! Resistance to Grey! Indeed, while you can resist both Light and Dark, it's technically possible to resist Grey as well.
|
|
|
Post by phlinn on Apr 9, 2008 9:33:15 GMT -5
Bah... I missed that. I was looking in the wrong place apparently. Still wondering on regular blocks.
Noticed something else though. If I'm an elemental lord with 100% resist earth, and elemental shield water up, I will still take at least 1/4 damage. Shouldn't it apply the elemental shield effect to the particular half element?
Also, for missle, are there 2 different types of physical resistance as indicated by: misphys = misphys - ((misphys * (p_ptr.pres)) / 100) misphys = misphys - ((misphys * (p_ptr.resistances[GF_PHYSICAL+1])) / 100)
Should the paladin's resist impure ability apply to the dark portion of grey damage?
|
|
|
Post by sekira on Apr 11, 2008 11:12:37 GMT -5
I'm not really sure if this is intentional or not... I noticed in passive.lua, that there are places where you get a flat bonus to_h, after the multipliers for blessing and heroism. When I say flat, I mean it is not a multiplier on your existing to_h it is a flat bonus from a skill or ability.
The biggest example is the martial arts bonuses to_h and to_d. They come after the multipliers from blessing, heroism, sword spirit and the excess dual wield boost (last 2 would only matter if weapon katas are accepted into the mainstream version).
that means it doesn't really pay to use heroism or blessing if you are a martial artist. I think this is an oversight.
I believe there are places where this happens for base ac, to_ac, to_d, and other stats as well.
What we need to do is have a big comment in the middle of the passive.lua calc_bonuses() function, and make sure that flat bonuses go above that comment, and multiplier bonuses go below it. At least, that is what I think we should do.
EDIT: V hinted that a new release is coming soon, so I'll wait until that release and then go in and rearange the order of stuff in calc_bonuses() to standardize things and then figure out a way to get it back to V or post it here. Might be a lot bigger than most of my patches, but we will figure something out I'm sure.
|
|
|
Post by Gando on Apr 11, 2008 14:32:53 GMT -5
One thing that might make it easier to catch such foibles is to break the huge functions into small functions that do just one thing...and that are more modular (ie: passing more data to the functions via parameters instead of relying on globals.) Then you might have code that looks something like
applyFlatBonuses(what, where) do something with what where return something end
applyPercentageBonuses(what, where) do something with what where return something end
mainfunction ()
applyFlatBonuses(what, where) applyPercentageBonuses(what, where)
end
this looks much clearer in terms of flow and is easier to debug because you only need to work on a tiny bit of the code at a time. You still get to use all your if/then/else branches but since all the heavy lifting is done by the "subroutines" the main function is much easier to read as well.
|
|
|
Post by phlinn on Apr 11, 2008 16:40:09 GMT -5
1. I agree with Gando. I have suggested making a clear decision on flat and percentages in the past. You might want some abilities that are explicitly flat but after the multiples. 2. Chop doesn't appear to work correctly. I pick a weapon, a target, then get no message whatsoever. It doesn't damage my target, and it's supposed to do double normal damage.
|
|
|
Post by sekira on Apr 21, 2008 10:13:08 GMT -5
The monk ability ki punch does not work against monsters who are standing in a wall (ghosts). This is crippling to a build that relies on martial arts to do damage, because ki punch is likely their only source of magic damage. They don't have weapons to do brand damage, and I'm convinced that brands show up on gloves very rarely, I only remember seeing 2 or 3 in all the time I've played portralis.
|
|
|
Post by Gando on Apr 21, 2008 12:18:03 GMT -5
It kind of makes sense though the wall protects the ghost. Try luring/drawing it out or avoiding it. If it does not chase you, you should be able to get clear of it without too much fuss...unless you somehow backed yourself against that said wall and have no teleport option.
|
|
|
Post by sekira on Apr 21, 2008 13:05:43 GMT -5
It kind of makes sense though the wall protects the ghost. Try luring/drawing it out or avoiding it. If it does not chase you, you should be able to get clear of it without too much fuss...unless you somehow backed yourself against that said wall and have no teleport option. I don't think it makes sense at all... especially since other methods of doing magic damage from a melee attack work fine, specifically, brand damages work just fine, and also base damages work fine too, it is just that the ghost is resist physical 100%, but if you had a weapon that you Essence Fusioned the damage to be a magic type damage, then it would die quick. I don't think it is a good solution to leave the ability as is for the following reasons: 1. Other builds are not nerfed, as they can use above methods to kill a ghost, as well as firing branded arrows or burning shots arrows, casters can cast any spell to deal with them... The list goes on, only monks are so nerfed, as this is pretty much their only way to use their strengths (martial arts) to deal with physical immune or physical resistant enemies, their only other hope is to find branded gloves, which are very rare. They shouldn't have to do that anyway, that is what this ability is for, for goodness sakes. 2. Ghosts can stand in the wall and kill you with impunity, as well as stand there and cast spells with impunity if you back up in an attempt to lure them out. That is nuts.
|
|
|
Post by phlinn on Apr 21, 2008 16:45:56 GMT -5
... I'm convinced that brands show up on gloves very rarely, I only remember seeing 2 or 3 in all the time I've played portralis. Well, back on page 5 of this thread, I noted that objects.lua will only place brands on weapons, not gloves. The only branded gloves you will find are either crafted, or artifacts. It's a fairly easy fix in objects.lua, but I had forgotten about it until you mentioned it again. I'm waiting until the next release to play a martial artist again.
|
|
|
Post by Variaz on Apr 21, 2008 16:57:26 GMT -5
Thanks for reminding me, it's now fixed. Gloves will now be able to gain their brands properly!
|
|
|
Post by sekira on Apr 21, 2008 16:59:28 GMT -5
What about changing how ki punch, accurate strike, and point blank shot work? Will they be able to hit monsters in walls? I would be happy to make the lua changes to abilities.lua if you would like.
EDIT: actually I already did the ki punch one, it is in the forge forum
|
|
|
Post by Gando on Apr 21, 2008 20:59:25 GMT -5
To me it seems more like a bug that any method for attacking something in a wall works. It should not imho.
|
|
kipar
Champion
Posts: 201
|
Post by kipar on Apr 22, 2008 8:16:53 GMT -5
To me it seems more like a bug that any method for attacking something in a wall works. It should not imho. If 'G'host in a wall can atack you then he is only half in a wall but half in a room already so I'm sure he can be atacked (otherwise playing a ghost monster is too easy)
|
|