FORUM ARCHIVED

Why does my ability destroy walls?

Discussion in 'Modding' started by Varkarrus, Aug 25, 2012.

  1. Varkarrus

    Varkarrus Member

    Code:
    <spell name="Cataclysm" type="self" icon="sprites/skills/neko/shakshimi32.png">
        <requirements mp="12" savvyBonus="0.15" mincost="4"/>
        <description text="Move incredibly fast, and destroy everything around you."/>
        <effect type="paralyze" amount="1" turns="10"/>
        <effect type="dot" amount="10" spell="cataclysm0"/>
        <buff useTimer="1" time="10" allowstacking="0" self="1" icon="sprites/skills/neko/shakshimi64.png"
     
    smallicon="sprites/skills/neko/shakshimi32.png">
            <secondarybuff id="6" amount="40"/>
        </buff>
        </spell>
     
    <spell name="cataclysm0" type="self" icon="sprites/skills/neko/shakshimi32.png">
        <effect type="trigger" spell="cataclysm1"/>
        <effect type="blink"/>
        <effect type="trigger" spell="cataclysm1"/></spell>
     
    <spell name="cataclysm1" type="template" templateID="14" icon="sprites/skills/neko/shakshimi32.png">
        <effect type="damage" slashing = "7" slashingF="0.18" affectscaster="0"/>
        <anim sprite="sprites/sfx/impact_slash/impact_slash" frames="5" centerEffect="1" framerate="70" sfx="blade"/></spell>
     
    
    pretty much, the character is constantly randomly blinking around, destroying everything with slashing attacks, but that everything includes walls!

    Also, the second area of effect hit is created after the blink, but is at the same location the player was before the blink. Finally, the paralysis doesn't work at all.

    Is there any way to make that not include walls, and while I'm at it, is there a way to shorten the range of the random blink?
     
  2. Well first of all, you should make your DOT not resistable or you'll have problems with the player resisting it. (I think at least)

    Anyway, normally dealing damage in an area destroys certain walls (only destructable ones, but I think there might be some bugs with walls being destructable when they aren't supposed to be?)

    I think you MIGHT be able to fix it if you made your cataclysm1 spell instead of dealing damage, trigger another spell (eg cataclysm2) which has type "target" to do the actual damage. (I think that would make it only do damage to monsters, and thus, not destroy walls. As in pretty sure but I'd test it to be safe :p)

    I'm not quite as sure about the timing issues, since I haven't messed with blink, but I assume it's triggering both effects and the blink, and THEN resolving the blink. I'd assume you could work around this by delaying one of the triggers, or possibly by having another spell (like, cataclysm0a) that is triggered by cataclysm0 that triggers cataclysm1 the second time.

    As far as shortening the blink range, the only thing I can think of is instead of triggering a blink, trigger an effect that uses a large array of custom templates that target single squares around you that each teleports you to that square, and then trigger one from the list.

    (But like to even teleport to any square that's exactly two tiles away would take like, twelve spells and twelve custom templates. Though they'd all be like, near copies of each other so it'd be DOABLE just involve a lot of copy-pasting, I guess)

    I could probably provide code of what I'm thinking if any of this isn't clear.
     
    OmniNegro likes this.
  3. Varkarrus

    Varkarrus Member

    Sounds doable. Thanks!
     
  4. Syphonix

    Syphonix Member

    As tentacled-godqueen says, are you sure it's not destroying walls that are destroyable? Or is it literally destroying every wall you get near by blinking? The difference is key.

    As for the paralysis not working, you need to have affectsCaster="1" in that paralyze tag, or else it defaults to 0.
     
  5. Also if it's destroying literally every wall, there's still a good chance the bug isn't on your end, 'cause walls being destructable when they shouldn't be... happens.
     
  6. Varkarrus

    Varkarrus Member

    yeah it wasn't destroying every wall. I'll get to trying to fix this ability up, now. I think I'll have the blinking solely be 2 spaces orthagonally, meaning only 4 new subspells will be needed.
     
  7. The one problem that I could see coming up is if those spaces aren't empty.

    I think you could probably do some convoluted work to have it keep checking until it finds one that is though. Or you could just have it keep you in the same place if it fails? I'm not sure if that's acceptable for you. (Of course the convoluted route is, uh. Convoluted.)
     
  8. Essence

    Essence Will Mod for Digglebucks

    <spell name="cataclysm0" type="self" icon="sprites/skills/neko/shakshimi32.png">
    <effect type="trigger" spell="cataclysm1"/>
    <effect type="blink"/>
    <effect type="trigger" spell="cataclysm1" amount="1"/></spell>


    Fixed that timing problem for you.
     
  9. Null

    Null Will Mod for Digglebucks

    Actually it needs to be amount="2" if it's triggered from amount="1" because otherwise it goes back onto the "do this at the end of the turn" stack and loops infinitely
     
  10. Varkarrus

    Varkarrus Member

    actually I didn't worry about the timing anymore, and just had it create one per teleport because I got the paralysis working. My mod is ready for beta testing thanks to you guys, though I still need to add art...

    Also, if it tries to teleport you into a wall, then you just don't teleport. That is completely acceptable though.