CoreNetwork / Mantle

The main plugin powering majority of features on Flatcore
1 stars 1 forks source link

Apply random positive potion effect when spells are used #352

Closed riddle closed 9 years ago

riddle commented 9 years ago

Currently all spell effects are meh-able. And we can’t really apply anything good because then a spell could be used to gain advantage.

But if we switched to a random effect, it could suddenly become both fun and balanced.

What we need is a list where we can put hardmode.yml’s DamageModifiers node names to refer to a specific effect and its length. A random one would be picked from the list and applied to people on the server.

matejdro commented 9 years ago

Um system already uses DamageModifiers, why don't you just add multiple spells and group them under pick?

riddle commented 9 years ago

I didn’t know I could do it. Can you please provide me with an example of how it would look in actual config?

matejdro commented 9 years ago

It works exactly like defining multiple items in LootTables.

eliadil commented 9 years ago

Exampru :

  BoostHealth1:
  - pick:
    - addPotionEffect:
        id: 2
        duration: 1000
        amplifier: 0
        ambient: true
    - addPotionEffect:
        id: 6
        duration: 1
        amplifier: 10
        ambient: true

Slowness & instant health. Also, fun fact - the instant health we currently have in config (with duration: 0)

Id can be replaced with Name node (+ name, not a number, as a value) or after most recent commit (as I type that), with name node :P

riddle commented 9 years ago

The problem here is obviously that if I do this on Hard Mode level, there is no way for me to adjust broadcasts / messages. I’ll reopen this for that reason.

matejdro commented 9 years ago

What do you think about adding separate message node? So above example would look like that:

  BoostHealth1:
  - pick:
    - group:
        - message: "Potion effect 1" 
        - addPotionEffect:
            id: 2
            duration: 1000
            amplifier: 0
            ambient: true
    - group:
        - message: "Potion effect 2" 
        - addPotionEffect:
            id: 2
            duration: 1000
            amplifier: 0
            ambient: true
riddle commented 9 years ago

And you would use that message as a variable in Spell config nodes?

matejdro commented 9 years ago

Yes. In above example, first potion would tell player "Potion effect 1, second potion effect would tell player "Potion effect 2".

riddle commented 9 years ago

OK, works for me.

Now I have to figure out why I’m not getting emails in this repo.

eliadil commented 9 years ago

Is this one closeable?

riddle commented 9 years ago

I’ve been thinking and I doubt we need server-wide effects anymore. All I really need is people being aware spells exist → Treasure Chase exists → maybe purchasing a pass or subscribing. This can be achieved using various broadcasts we have, so… sure.