mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
Added immunity as a dialogue reward type.
Debug content can trigger all event types.
This commit is contained in:
@@ -265,5 +265,116 @@
|
||||
"mapName":"debugmap"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"chaotic_rewarder_0",
|
||||
"message":"What do you want ?",
|
||||
"replies":[
|
||||
{
|
||||
"text":"Apply condition",
|
||||
"nextPhraseID":"chaotic_rewarder_1"
|
||||
},
|
||||
{
|
||||
"text":"Clear condition",
|
||||
"nextPhraseID":"chaotic_rewarder_2"
|
||||
},
|
||||
{
|
||||
"text":"Give 5 rounds of immunity",
|
||||
"nextPhraseID":"chaotic_rewarder_3"
|
||||
},
|
||||
{
|
||||
"text":"Infinite immunity",
|
||||
"nextPhraseID":"chaotic_rewarder_4"
|
||||
},
|
||||
{
|
||||
"text":"Apply condition forever",
|
||||
"nextPhraseID":"chaotic_rewarder_5"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"chaotic_rewarder_1",
|
||||
"message":"Applied.",
|
||||
"replies":[
|
||||
{
|
||||
"text":"N",
|
||||
"nextPhraseID":"chaotic_rewarder_0"
|
||||
}
|
||||
],
|
||||
"rewards":[
|
||||
{
|
||||
"rewardType":"actorCondition",
|
||||
"rewardID":"chaotic_grip",
|
||||
"value":5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"chaotic_rewarder_2",
|
||||
"message":"Cleared.",
|
||||
"replies":[
|
||||
{
|
||||
"text":"N",
|
||||
"nextPhraseID":"chaotic_rewarder_0"
|
||||
}
|
||||
],
|
||||
"rewards":[
|
||||
{
|
||||
"rewardType":"actorCondition",
|
||||
"rewardID":"chaotic_grip",
|
||||
"value":-99
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"chaotic_rewarder_3",
|
||||
"message":"5 rounds immune!",
|
||||
"replies":[
|
||||
{
|
||||
"text":"N",
|
||||
"nextPhraseID":"chaotic_rewarder_0"
|
||||
}
|
||||
],
|
||||
"rewards":[
|
||||
{
|
||||
"rewardType":"actorConditionImmunity",
|
||||
"rewardID":"chaotic_grip",
|
||||
"value":5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"chaotic_rewarder_4",
|
||||
"message":"Immune forever !",
|
||||
"replies":[
|
||||
{
|
||||
"text":"N",
|
||||
"nextPhraseID":"chaotic_rewarder_0"
|
||||
}
|
||||
],
|
||||
"rewards":[
|
||||
{
|
||||
"rewardType":"actorConditionImmunity",
|
||||
"rewardID":"chaotic_grip",
|
||||
"value":999
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id":"chaotic_rewarder_5",
|
||||
"message":"Punished forever !",
|
||||
"replies":[
|
||||
{
|
||||
"text":"N",
|
||||
"nextPhraseID":"chaotic_rewarder_0"
|
||||
}
|
||||
],
|
||||
"rewards":[
|
||||
{
|
||||
"rewardType":"actorCondition",
|
||||
"rewardID":"chaotic_grip",
|
||||
"value":999
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -139,5 +139,37 @@
|
||||
"max": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "chaotic_penalty",
|
||||
"iconID": "items_weapons:61",
|
||||
"name": "Chaotic Penalty",
|
||||
"category": "lsword",
|
||||
"displaytype": "extraordinary",
|
||||
"hasManualPrice": 1,
|
||||
"baseMarketCost": 0,
|
||||
"equipEffect": {
|
||||
"increaseMaxAP": 2,
|
||||
"increaseAttackCost": 7,
|
||||
"increaseAttackChance": 25,
|
||||
"increaseCriticalSkill": 10,
|
||||
"setCriticalMultiplier": 2,
|
||||
"increaseAttackDamage": {
|
||||
"min": 5,
|
||||
"max": 9
|
||||
},
|
||||
"addedConditions":[
|
||||
{
|
||||
"condition":"chaotic_grip",
|
||||
"magnitude": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"killEffect": {
|
||||
"increaseCurrentHP": {
|
||||
"min": 1,
|
||||
"max": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -124,5 +124,12 @@
|
||||
"min": 1,
|
||||
"max": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id":"chaotic_rewarder",
|
||||
"name":"Chaotic Rewarder",
|
||||
"iconID":"monsters_men2:5",
|
||||
"spawnGroup":"chaotic_rewarder",
|
||||
"phraseID":"chaotic_rewarder_0"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -226,6 +226,11 @@
|
||||
<object height="32" name="debugNPC1" type="spawn" width="32" x="288" y="0"/>
|
||||
<object height="32" name="debugNPC2" type="spawn" width="32" x="256" y="0"/>
|
||||
<object height="32" name="debugNPC3" type="spawn" width="32" x="32" y="448"/>
|
||||
<object name="chaotic_dialogue" type="spawn" x="256" y="64" width="32" height="32">
|
||||
<properties>
|
||||
<property name="spawngroup" value="chaotic_rewarder"/>
|
||||
</properties>
|
||||
</object>
|
||||
</objectgroup>
|
||||
<objectgroup height="18" name="Inactive" width="18">
|
||||
<properties>
|
||||
|
||||
@@ -79,6 +79,9 @@ public final class ConversationController {
|
||||
case actorCondition:
|
||||
addActorConditionReward(player, effect.effectID, effect.value, result);
|
||||
break;
|
||||
case actorConditionImmunity:
|
||||
addActorConditionImmunityReward(player, effect.effectID, effect.value, result);
|
||||
break;
|
||||
case skillIncrease:
|
||||
addSkillReward(player, SkillCollection.SkillID.valueOf(effect.effectID), result);
|
||||
break;
|
||||
@@ -207,7 +210,20 @@ public final class ConversationController {
|
||||
int magnitude = 1;
|
||||
int duration = value;
|
||||
if (value == ActorCondition.DURATION_FOREVER) duration = ActorCondition.DURATION_FOREVER;
|
||||
else if (value == ActorCondition.MAGNITUDE_REMOVE_ALL) magnitude = ActorCondition.MAGNITUDE_REMOVE_ALL;
|
||||
else if (value == ActorCondition.MAGNITUDE_REMOVE_ALL) {
|
||||
duration = ActorCondition.DURATION_NONE;
|
||||
magnitude = ActorCondition.MAGNITUDE_REMOVE_ALL;
|
||||
}
|
||||
|
||||
ActorConditionType conditionType = world.actorConditionsTypes.getActorConditionType(conditionTypeID);
|
||||
ActorConditionEffect e = new ActorConditionEffect(conditionType, magnitude, duration, always);
|
||||
controllers.actorStatsController.applyActorCondition(player, e);
|
||||
result.actorConditions.add(e);
|
||||
}
|
||||
|
||||
private void addActorConditionImmunityReward(Player player, String conditionTypeID, int value, ScriptEffectResult result) {
|
||||
int duration = value;
|
||||
int magnitude = ActorCondition.MAGNITUDE_REMOVE_ALL;
|
||||
|
||||
ActorConditionType conditionType = world.actorConditionsTypes.getActorConditionType(conditionTypeID);
|
||||
ActorConditionEffect e = new ActorConditionEffect(conditionType, magnitude, duration, always);
|
||||
|
||||
@@ -6,6 +6,7 @@ public final class ScriptEffect {
|
||||
, dropList
|
||||
, skillIncrease
|
||||
, actorCondition
|
||||
, actorConditionImmunity
|
||||
, alignmentChange
|
||||
, giveItem
|
||||
, createTimer
|
||||
|
||||
Reference in New Issue
Block a user