Magic

Magic

190k Downloads

"horse" spell being fired when it is not

Ferocimo opened this issue ยท 5 comments

commented

#452

Hello,

As solution for the issue above, the Horse spell isn't fired when you are too close to a wall. However, that still triggers the "other" events as the spell was fired : you gain SPs and the cooldown starts.

I reported it in the issue and you uploaded a fix and then closed the issue, however the issue is still there. Could you have a look at this ? Thank you.

commented

@NathanWolf Hello, any update on this ?

commented

I closed it because I was not seeing any issue. If I go up against a wall and cast the Horse spell, I get a message like "Find a clear space for your horse". I do not gain SP nor does the spell go on cooldown. The builtin spell does not actually earn SP at all in the first place.

Are you using the builtin spell or a custom version?

commented

It's configured as follows :

horse:
    icon: diamond_axe:49
    icon_disabled: diamond_hoe:49
    icon_url: http://textures.minecraft.net/texture/ddb5db33eac28ccfce38f179044575cb9de8195bc1ed843d4345da5f13b63d
    category: invocation
    worth: 300
    earns_sp: 20
    cast_on_no_target: false
    actions:
      cast:
        - class: ChangeContext
          ignore_result: true
          target_offset: 0,1,0
          actions:
          - class: Plane
            radius: 1
            actions:
            - class: CheckBlock
              allowed: passthrough
              fail:
              - class: Message
                message_type: chat
                message_key: nospace
                ignore_result: true
              - class: Stop
        - class: SpawnEntity
        - class: Mount
        - class: PlayEffects
          effects: spawned
    effects:
      failed:
      - sound: block_note_bass
        sound_volume: 1.5
        sound_pitch: 1.5
      spawned:
      - class: EffectSingle
        sound: entity_horse_angry
        effectlib:
          class: DnaEffect
          particle_helix: drip_lava
          iterations: 24
          particle_base1: drip_water
      - class: EffectSingle
        location: target
        effectlib:
          class: AtomEffect
          iterations: 32
          particle_nucleus: drip_water
    parameters:
        target: self
        set_target: true
        tamed: true
        saddle: saddle
        track: false
        type: horse
        allow_max_range: true
        cooldown: 300000
        range: 5
        undo: 300000
        loot: false
    costs:
        mana: 50
commented

Ok, sorry, this is making sense now. I thought I had fixed it, but didn't realize you had your own version and were not using the fix.

I think you can get it working if you use this as your fail block:

            fail:
            - class: Message
              ignore_result: true
              message_type: chat
              message_key: nospace
            - class: CastResult
              result: no_target
              end_result: true
            - class: Stop

The "CastResult" was a new action I put in specifically to fix this issue for you, it lets you force the spell to return a specific result (in this case a "no target" failure).

commented

Perfect ! It's working now, thank you very much.