Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

"Implicit" single-number setting #247

Open
ErichDonGubler opened this issue Apr 8, 2014 · 0 comments
Open

"Implicit" single-number setting #247

ErichDonGubler opened this issue Apr 8, 2014 · 0 comments
Labels
Milestone

Comments

@ErichDonGubler
Copy link
Member

When I originally coded MD, there was some nice syntactic sugar for the "set" routine which I don't see being used any more (apparently broken during my absence with the mdscript update):

on Damage
    if attackertype.is.something: 200 #Kill dat sucka
    elseif attackertype.is.something: -2

I notice that nowadays, even in the tuts we show the following:

on Damage
    if attackertype.is.something: 
        set.damage: 200 #Kill dat sucka
        set.damage: damage-200 #Just kidding

Not sure why this is, but I feel like for single-line solutions the second is undesirable. Actually, I can't see any reason that this couldn't be done for certain events which could define a reference to another

on Damage
    setimplicit.damage
    if attackertype.is.something: 
        200 #Now just plain numbers refer to the "implicit" association to damage.
        damage-200 #Just kidding!
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants