Кровавый камень - вечное топливо скакуна и оссуария; сферы чинятся пакетом крови
- Камень в любой ячейке скакуна - вечно полный бак, сферы рядом не тратятся. - Камень в отсеке топлива гео-оссуария - работает вечно (FuelTypes + removeFuel). - Кровавая сфера чинится пакетом крови: 250 прочности за пакет (2 пакета - полная). - Описания сферы, камня, оссуария и скакуна дополнены (13 языков); в описании скакуна по-корейски и по-китайски название сферы приведено к принятому в моде. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a6e3f12eb4
commit
d35b77be1b
+41
-28
File diff suppressed because one or more lines are too long
+1
-1
@@ -202,7 +202,7 @@
|
|||||||
<property name="LootLabelKey" value="xuiNecroGeoOssuary" />
|
<property name="LootLabelKey" value="xuiNecroGeoOssuary" />
|
||||||
<property name="ItemIconBackdrop" value="ui_game_symbol_mining" />
|
<property name="ItemIconBackdrop" value="ui_game_symbol_mining" />
|
||||||
<property name="ItemBackgroundColor" value="140,20,20,255" />
|
<property name="ItemBackgroundColor" value="140,20,20,255" />
|
||||||
<property name="FuelTypes" value="{blood,resourceBloodSphere}" />
|
<property name="FuelTypes" value="{blood,resourceBloodSphere,resourceBloodStone}" /><!-- камень - вечное топливо (GeoOssuaryPatch.removeFuel) -->
|
||||||
<property name="OutputTypes" value="{os1,blood,1,0,1,resourceRockSmall,resourceRockSmall,1,1,6000,10000,collector_complete_item}{os2,blood,1,0,1,resourceRockSmall,resourceRockSmall,1,1,6000,10000,collector_complete_item}{os3,blood,1,0,1,resourceRockSmall,resourceRockSmall,1,1,6000,10000,collector_complete_item}" />
|
<property name="OutputTypes" value="{os1,blood,1,0,1,resourceRockSmall,resourceRockSmall,1,1,6000,10000,collector_complete_item}{os2,blood,1,0,1,resourceRockSmall,resourceRockSmall,1,1,6000,10000,collector_complete_item}{os3,blood,1,0,1,resourceRockSmall,resourceRockSmall,1,1,6000,10000,collector_complete_item}" />
|
||||||
<property name="Outputs" value="os1,os2,os3" />
|
<property name="Outputs" value="os1,os2,os3" />
|
||||||
<property name="OutputGridHeight" value="1" />
|
<property name="OutputGridHeight" value="1" />
|
||||||
|
|||||||
@@ -414,6 +414,10 @@
|
|||||||
<!-- true: опустевшая сфера должна исчезать, а не лежать "сломанной" в ожидании
|
<!-- true: опустевшая сфера должна исчезать, а не лежать "сломанной" в ожидании
|
||||||
ремонта. Само удаление из слота делает SpendCharge - см. SpatialVaultPickupPatch. -->
|
ремонта. Само удаление из слота делает SpendCharge - см. SpatialVaultPickupPatch. -->
|
||||||
<property name="DegradationBreaksAfter" value="true"/>
|
<property name="DegradationBreaksAfter" value="true"/>
|
||||||
|
<!-- Ремонт обычным пакетом крови (01.10: «пусть сферы можно будет чинить обычной ванильной
|
||||||
|
кровью»): пункт «Починить» в инвентаре; сколько чинит пакет - RepairAmount у
|
||||||
|
medicalBloodBag в items.xml. Пустая сфера исчезает, чинить можно только початую. -->
|
||||||
|
<property name="RepairTools" value="medicalBloodBag"/>
|
||||||
<effect_group name="resourceBloodSphere" tiered="false">
|
<effect_group name="resourceBloodSphere" tiered="false">
|
||||||
<passive_effect name="DegradationMax" operation="base_set" value="500"/>
|
<passive_effect name="DegradationMax" operation="base_set" value="500"/>
|
||||||
</effect_group>
|
</effect_group>
|
||||||
|
|||||||
@@ -1919,4 +1919,11 @@
|
|||||||
</effect_group>
|
</effect_group>
|
||||||
</item>
|
</item>
|
||||||
</append>
|
</append>
|
||||||
|
<!-- Пакет крови чинит Кровавую сферу (RepairTools сферы, 01.10): 250 из 500 прочности за пакет,
|
||||||
|
два пакета - полная сфера. У ванили пакет ничего не чинит, свойства новые. Кровь некроманта
|
||||||
|
наследует пакет (Extends) - ей эти свойства ни на что не влияют: её ремонтом не чинят. -->
|
||||||
|
<append xpath="/items/item[@name='medicalBloodBag']">
|
||||||
|
<property name="RepairAmount" value="250"/>
|
||||||
|
<property name="RepairTime" value="2"/>
|
||||||
|
</append>
|
||||||
</config>
|
</config>
|
||||||
|
|||||||
@@ -53,6 +53,23 @@ namespace NecromancerTome
|
|||||||
public static bool IsSphere(ItemValue iv) =>
|
public static bool IsSphere(ItemValue iv) =>
|
||||||
iv != null && !iv.IsEmpty() && iv.ItemClass != null && iv.ItemClass.Name == BoneSteed.FuelItem;
|
iv != null && !iv.IsEmpty() && iv.ItemClass != null && iv.ItemClass.Name == BoneSteed.FuelItem;
|
||||||
|
|
||||||
|
/// <summary>Кровавый камень - неиссякаемая сфера (01.10: «полная замена сферы»): один камень
|
||||||
|
/// в любой ячейке - вечный полный бак, сферы рядом с ним не тратятся.</summary>
|
||||||
|
public const string StoneItem = "resourceBloodStone";
|
||||||
|
|
||||||
|
public static bool IsStone(ItemValue iv) =>
|
||||||
|
iv != null && !iv.IsEmpty() && iv.ItemClass != null && iv.ItemClass.Name == StoneItem;
|
||||||
|
|
||||||
|
public static bool HasStone(ItemValue item)
|
||||||
|
{
|
||||||
|
if (item == null)
|
||||||
|
return false;
|
||||||
|
for (int i = 0; i < item.ModificationCount; i++)
|
||||||
|
if (IsStone(item.GetModification(i)))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Остаток сферы 0..1.</summary>
|
/// <summary>Остаток сферы 0..1.</summary>
|
||||||
static float Left(ItemValue sphere)
|
static float Left(ItemValue sphere)
|
||||||
{
|
{
|
||||||
@@ -67,6 +84,8 @@ namespace NecromancerTome
|
|||||||
ItemValue item = v?.itemValue;
|
ItemValue item = v?.itemValue;
|
||||||
if (item == null)
|
if (item == null)
|
||||||
return 0f;
|
return 0f;
|
||||||
|
if (HasStone(item))
|
||||||
|
return MaxFuel;
|
||||||
float fuel = 0f;
|
float fuel = 0f;
|
||||||
for (int i = 0; i < item.ModificationCount; i++)
|
for (int i = 0; i < item.ModificationCount; i++)
|
||||||
{
|
{
|
||||||
@@ -81,6 +100,8 @@ namespace NecromancerTome
|
|||||||
public static float Burn(Vehicle v, float amount)
|
public static float Burn(Vehicle v, float amount)
|
||||||
{
|
{
|
||||||
ItemValue item = v.itemValue;
|
ItemValue item = v.itemValue;
|
||||||
|
if (HasStone(item))
|
||||||
|
return MaxFuel;
|
||||||
for (int i = 0; i < item.ModificationCount && amount > 0f; i++)
|
for (int i = 0; i < item.ModificationCount && amount > 0f; i++)
|
||||||
{
|
{
|
||||||
ItemValue m = item.GetModification(i);
|
ItemValue m = item.GetModification(i);
|
||||||
@@ -225,7 +246,7 @@ namespace NecromancerTome
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>В ячейки скакуна - только кровавые сферы с остатком прочности.</summary>
|
/// <summary>В ячейки скакуна - только кровавые сферы с остатком прочности и кровавые камни.</summary>
|
||||||
[HarmonyPatch(typeof(XUiC_ItemPartStack), "CanSwap")]
|
[HarmonyPatch(typeof(XUiC_ItemPartStack), "CanSwap")]
|
||||||
public static class Patch_XUiC_ItemPartStack_CanSwap_BoneSteed
|
public static class Patch_XUiC_ItemPartStack_CanSwap_BoneSteed
|
||||||
{
|
{
|
||||||
@@ -235,9 +256,10 @@ namespace NecromancerTome
|
|||||||
if (current == null || !BoneSteedFuel.IsSteedItem(current.itemValue))
|
if (current == null || !BoneSteedFuel.IsSteedItem(current.itemValue))
|
||||||
return true;
|
return true;
|
||||||
ItemValue here = __instance.ItemValue;
|
ItemValue here = __instance.ItemValue;
|
||||||
__result = BoneSteedFuel.IsSphere(stack.itemValue) &&
|
ItemValue add = stack.itemValue;
|
||||||
stack.itemValue.UseTimes < stack.itemValue.MaxUseTimes &&
|
bool blood = BoneSteedFuel.IsStone(add) ||
|
||||||
(here == null || here.IsEmpty() || BoneSteedFuel.IsSphere(here));
|
BoneSteedFuel.IsSphere(add) && add.UseTimes < add.MaxUseTimes;
|
||||||
|
__result = blood && (here == null || here.IsEmpty() || BoneSteedFuel.IsSphere(here) || BoneSteedFuel.IsStone(here));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,6 +208,12 @@ namespace NecromancerTome
|
|||||||
if (!GeoOssuary.Is(__instance))
|
if (!GeoOssuary.Is(__instance))
|
||||||
return true;
|
return true;
|
||||||
ItemStack[] fuel = __instance.FuelSlots;
|
ItemStack[] fuel = __instance.FuelSlots;
|
||||||
|
// Кровавый камень в отсеке - вечное топливо (01.10: «полная замена сферы»): не тратится
|
||||||
|
// ни он, ни сферы рядом.
|
||||||
|
for (int i = 0; i < fuel.Length; i++)
|
||||||
|
if (fuel[i] != null && !fuel[i].IsEmpty() && fuel[i].itemValue.ItemClass != null &&
|
||||||
|
fuel[i].itemValue.ItemClass.Name == BoneSteedFuel.StoneItem)
|
||||||
|
return false;
|
||||||
for (int i = 0; i < fuel.Length; i++)
|
for (int i = 0; i < fuel.Length; i++)
|
||||||
{
|
{
|
||||||
ItemStack stack = fuel[i];
|
ItemStack stack = fuel[i];
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user