Skip to main content
added 372 characters in body
Source Link
jzx
  • 3.8k
  • 2
  • 26
  • 38

You could simply define how these would affect the character and add flavor text. If you group them into something like biomes, you can randomly select a few at a time for each battle depending on where the battle takes place.

"Rocky Biome" : {
    "Rock : {
        "Take cover behind rock" : {
            Defense : 10,
            Offense : -15,
    }        OnEnter : "%s takes cover behind a rock",
            OnLeave : "%s leaves their rocky cover"
        }

        "Climb on top of rock" : {
            Defense : -5,
            Offense : 10
        }
    }
}
"Forest Biome" : {
    "Tree" : {
        "Climb up tree" : {
            Defense : 5,
            Offense : -5
        }
        "Hide behind tree" : {
            Defense : 10,
            Offense : -10
        }
    }
}

Then you'd just display these as an extension of a "Move" option.

> Move
Where to move?
1. Take cover behind rock
2. Climb on top of rock
3. Climb up tree
4. Hide behind tree
> 3
So-and-so climbs up a tree

If you ever wanted to add graphics, you'd simplyjust attach some more information to each definition:

    "Rock : {
        Image : "BigRock.png",


        "Take cover behind rock" : {
            Defense : 10,
            Offense : -15,
            SetCharacterOffset : {-32,0},
        Image : "BigRock.png"}

    }
    "Climb on top of rock" : {
            Defense : -5,
            Offense : 10,
            SetCharacterOffset : {0,64},
        Image : "BigRock.png"}
    }

You could simply define how these would affect the character and add flavor text. If you group them, you can randomly select a few at a time for each battle.

"Rocky Biome" : {
    "Take cover behind rock" : {
        Defense : 10,
        Offense : -15
    }
    
    "Climb on top of rock" : {
        Defense : -5,
        Offense : 10
    }
}
"Forest Biome" : {
    "Climb up tree" : {
        Defense : 5,
        Offense : -5
    }
    "Hide behind tree" : {
        Defense : 10,
        Offense : -10
    }
}

If you ever wanted to add graphics, you'd simply attach some more information to each definition:

    "Take cover behind rock" : {
        Defense : 10,
        Offense : -15,
        SetCharacterOffset : {-32,0},
        Image : "BigRock.png"
    }
    "Climb on top of rock" : {
        Defense : -5,
        Offense : 10
        SetCharacterOffset : {0,64},
        Image : "BigRock.png"
    }

You could define how these would affect the character and add flavor text. If you group them into something like biomes, you can randomly select a few at a time for each battle depending on where the battle takes place.

"Rocky Biome" : {
    "Rock : {
        "Take cover behind rock" : {
            Defense : 10,
            Offense : -15,
            OnEnter : "%s takes cover behind a rock",
            OnLeave : "%s leaves their rocky cover"
        }

        "Climb on top of rock" : {
            Defense : -5,
            Offense : 10
        }
    }
}
"Forest Biome" : {
    "Tree" : {
        "Climb up tree" : {
            Defense : 5,
            Offense : -5
        }
        "Hide behind tree" : {
            Defense : 10,
            Offense : -10
        }
    }
}

Then you'd just display these as an extension of a "Move" option.

> Move
Where to move?
1. Take cover behind rock
2. Climb on top of rock
3. Climb up tree
4. Hide behind tree
> 3
So-and-so climbs up a tree

If you ever wanted to add graphics, you'd just attach some more information to each definition:

    "Rock : {
        Image : "BigRock.png",


        "Take cover behind rock" : {
            Defense : 10,
            Offense : -15,
            SetCharacterOffset : {-32,0}
        }

        "Climb on top of rock" : {
            Defense : -5,
            Offense : 10,
            SetCharacterOffset : {0,64}
        }
    }
Source Link
jzx
  • 3.8k
  • 2
  • 26
  • 38

You could simply define how these would affect the character and add flavor text. If you group them, you can randomly select a few at a time for each battle.

For example, if you has just two attributes - Offense and Defense:

"Rocky Biome" : {
    "Take cover behind rock" : {
        Defense : 10,
        Offense : -15
    }
    
    "Climb on top of rock" : {
        Defense : -5,
        Offense : 10
    }
}
"Forest Biome" : {
    "Climb up tree" : {
        Defense : 5,
        Offense : -5
    }
    "Hide behind tree" : {
        Defense : 10,
        Offense : -10
    }
}

If you ever wanted to add graphics, you'd simply attach some more information to each definition:

    "Take cover behind rock" : {
        Defense : 10,
        Offense : -15,
        SetCharacterOffset : {-32,0},
        Image : "BigRock.png"
    }
    "Climb on top of rock" : {
        Defense : -5,
        Offense : 10
        SetCharacterOffset : {0,64},
        Image : "BigRock.png"
    }