UpgradeType - DragonSurvivalTeam/DragonSurvival GitHub Wiki

Description

An UpgradeType is the way in which an ability is upgraded. There are various different types that will be listed here.

Dependencies

  1. Predicate (mod specific predicates here)
  2. LevelBasedValue

Schema

{
    "upgrade_type": [UpgradeType]            // [Mandatory] The type of upgrade.
    "maximum_level": [number]                // [Mandatory] The maximum level of the ability.
     .... data, depending on type
}

Experience Points

The ability is manually upgraded by spending experience points.

Schema

{
    "experience_cost": [LevelBasedValue]    // [Mandatory] The number of experience points to upgrade per level.
}

Experience Level

The ability is upgraded passively depending on the player's experience level.

Schema

{
    "level_requirement": [LevelBasedValue]  // [Mandatory] The experience level requirement to upgrade per level.
}

Dragon Size

The ability is upgraded based off of the player's size.

Schema

{
    "size_requirement": [LevelBasedValue]  // [Mandatory] The size requirement to upgrade per level.
}

Item Based

The ability is upgraded by using a list of requisite items.

Schema

{
    "items_per_level": [Item]             // [Mandatory] A list of items, with each item representing the level at which that item is used to upgrade the ability.
    "downgrade_items": [Item]             // [Mandatory] A list of items that downgrade the ability.
}

Condition Based

The ability is upgraded based off of a list of conditions.

{ 
    "conditions": [Predicate]             // [Mandatory] A list of conditions, with each condition representing the level at which the condition is needed to upgrade
    "require_previous": [bool]            // [Optional]  Whether or not each previous condition is required when going to the next condition. True by default.
}