Added the Destructive Will effect to the Ritual of the Green Grove. This ritual now is done~

This commit is contained in:
WayofTime 2016-10-23 18:57:24 -04:00
parent 62f3847d88
commit 731ba99fa3
5 changed files with 63 additions and 4 deletions

View file

@ -1,3 +1,8 @@
------------------------------------------------------
Version 2.1.0-67
------------------------------------------------------
- Added the Destructive Will effect to the Ritual of the Green Grove. This ritual now is done~
------------------------------------------------------ ------------------------------------------------------
Version 2.1.0-66 Version 2.1.0-66
------------------------------------------------------ ------------------------------------------------------

View file

@ -31,7 +31,7 @@ public class CategoryRitual
{ {
List<IPage> ritualPages = new ArrayList<IPage>(); List<IPage> ritualPages = new ArrayList<IPage>();
ritualPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(ritual.getUnlocalizedName() + ".info"), 370)); ritualPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(ritual.getUnlocalizedName() + ".info"), 370));
ritualPages.add(new PageImage(new ResourceLocation("bloodmagicguide", "textures/guide/" + ritual.getName() + ".png"))); // ritualPages.add(new PageImage(new ResourceLocation("bloodmagicguide", "textures/guide/" + ritual.getName() + ".png")));
entries.put(new ResourceLocation(keyBase + ritual.getName()), new EntryText(ritualPages, TextHelper.localize(ritual.getUnlocalizedName()))); entries.put(new ResourceLocation(keyBase + ritual.getName()), new EntryText(ritualPages, TextHelper.localize(ritual.getUnlocalizedName())));
} }

View file

@ -25,7 +25,6 @@ import WayofTime.bloodmagic.ritual.RitualHarvest;
import WayofTime.bloodmagic.ritual.RitualInterdiction; import WayofTime.bloodmagic.ritual.RitualInterdiction;
import WayofTime.bloodmagic.ritual.RitualJumping; import WayofTime.bloodmagic.ritual.RitualJumping;
import WayofTime.bloodmagic.ritual.RitualLava; import WayofTime.bloodmagic.ritual.RitualLava;
import WayofTime.bloodmagic.ritual.RitualLivingArmourDowngrade;
import WayofTime.bloodmagic.ritual.RitualMagnetic; import WayofTime.bloodmagic.ritual.RitualMagnetic;
import WayofTime.bloodmagic.ritual.RitualMeteor; import WayofTime.bloodmagic.ritual.RitualMeteor;
import WayofTime.bloodmagic.ritual.RitualPlacer; import WayofTime.bloodmagic.ritual.RitualPlacer;

View file

@ -26,6 +26,7 @@ import WayofTime.bloodmagic.api.ritual.IMasterRitualStone;
import WayofTime.bloodmagic.api.ritual.Ritual; import WayofTime.bloodmagic.api.ritual.Ritual;
import WayofTime.bloodmagic.api.ritual.RitualComponent; import WayofTime.bloodmagic.api.ritual.RitualComponent;
import WayofTime.bloodmagic.api.saving.SoulNetwork; import WayofTime.bloodmagic.api.saving.SoulNetwork;
import WayofTime.bloodmagic.api.soul.DemonWillHolder;
import WayofTime.bloodmagic.api.soul.EnumDemonWillType; import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
import WayofTime.bloodmagic.api.util.helper.NetworkHelper; import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler;
@ -80,6 +81,7 @@ public class RitualGreenGrove extends Ritual
List<EnumDemonWillType> willConfig = masterRitualStone.getActiveWillConfig(); List<EnumDemonWillType> willConfig = masterRitualStone.getActiveWillConfig();
DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(world, pos);
double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig); double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig);
double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig); double rawWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.DEFAULT, willConfig);
double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig); double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig);
@ -96,6 +98,12 @@ public class RitualGreenGrove extends Ritual
AreaDescriptor growingRange = getBlockRange(GROW_RANGE); AreaDescriptor growingRange = getBlockRange(GROW_RANGE);
int maxGrowthVolume = getMaxVolumeForRange(GROW_RANGE, willConfig, holder);
if (!growingRange.isWithinRange(getMaxVerticalRadiusForRange(GROW_RANGE, willConfig, holder), getMaxHorizontalRadiusForRange(GROW_RANGE, willConfig, holder)) || (maxGrowthVolume != 0 && growingRange.getVolume() > maxGrowthVolume))
{
return;
}
for (BlockPos newPos : growingRange.getContainedPositions(pos)) for (BlockPos newPos : growingRange.getContainedPositions(pos))
{ {
IBlockState state = world.getBlockState(newPos); IBlockState state = world.getBlockState(newPos);
@ -233,7 +241,7 @@ public class RitualGreenGrove extends Ritual
{ {
if (will > 0) if (will > 0)
{ {
return 0.5; return 0.3 + will / 200;
} }
return defaultGrowthChance; return defaultGrowthChance;
@ -255,6 +263,51 @@ public class RitualGreenGrove extends Ritual
return refreshTime; return refreshTime;
} }
@Override
public int getMaxVolumeForRange(String range, List<EnumDemonWillType> activeTypes, DemonWillHolder holder)
{
if (GROW_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE))
{
double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE);
if (destructiveWill > 0)
{
return 81 + (int) Math.pow(destructiveWill / 4, 1.5);
}
}
return volumeRangeMap.get(range);
}
@Override
public int getMaxVerticalRadiusForRange(String range, List<EnumDemonWillType> activeTypes, DemonWillHolder holder)
{
if (GROW_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE))
{
double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE);
if (destructiveWill > 0)
{
return (int) (4 + destructiveWill / 10d);
}
}
return verticalRangeMap.get(range);
}
@Override
public int getMaxHorizontalRadiusForRange(String range, List<EnumDemonWillType> activeTypes, DemonWillHolder holder)
{
if (GROW_RANGE.equals(range) && activeTypes.contains(EnumDemonWillType.DESTRUCTIVE))
{
double destructiveWill = holder.getWill(EnumDemonWillType.DESTRUCTIVE);
if (destructiveWill > 0)
{
return (int) (4 + destructiveWill / 10d);
}
}
return horizontalRangeMap.get(range);
}
@Override @Override
public int getRefreshCost() public int getRefreshCost()
{ {
@ -275,7 +328,7 @@ public class RitualGreenGrove extends Ritual
@Override @Override
public ITextComponent[] provideInformationOfRitualToPlayer(EntityPlayer player) public ITextComponent[] provideInformationOfRitualToPlayer(EntityPlayer player)
{ {
return new ITextComponent[] { new TextComponentTranslation(this.getUnlocalizedName() + ".info"), new TextComponentTranslation(this.getUnlocalizedName() + ".default.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".corrosive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".steadfast.info") }; return new ITextComponent[] { new TextComponentTranslation(this.getUnlocalizedName() + ".info"), new TextComponentTranslation(this.getUnlocalizedName() + ".default.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".corrosive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".steadfast.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".destructive.info"), new TextComponentTranslation(this.getUnlocalizedName() + ".vengeful.info") };
} }
@Override @Override

View file

@ -618,7 +618,9 @@ ritual.BloodMagic.crushingRitual.steadfast.info=(Steadfast) Causes all blocks th
ritual.BloodMagic.crushingRitual.corrosive.info=(Corrosive) All blocks are broken to be processed with a form of cutting fluid. Overrides Silk Touch where applicable. ritual.BloodMagic.crushingRitual.corrosive.info=(Corrosive) All blocks are broken to be processed with a form of cutting fluid. Overrides Silk Touch where applicable.
ritual.BloodMagic.greenGroveRitual.corrosive.info=(Corrosive) Entities within range are attacked by nearby plants, leeching away their life. ritual.BloodMagic.greenGroveRitual.corrosive.info=(Corrosive) Entities within range are attacked by nearby plants, leeching away their life.
ritual.BloodMagic.greenGroveRitual.default.info=(Raw) Increases the speed of all of the ritual operations depending on the total Will in the Aura. ritual.BloodMagic.greenGroveRitual.default.info=(Raw) Increases the speed of all of the ritual operations depending on the total Will in the Aura.
ritual.BloodMagic.greenGroveRitual.vengeful.info=(Vengeful) Increases the rate that a growth tick is successful.
ritual.BloodMagic.greenGroveRitual.steadfast.info=(Steadfast) Seeds are replanted and blocks are hydrated within the Hydration range. ritual.BloodMagic.greenGroveRitual.steadfast.info=(Steadfast) Seeds are replanted and blocks are hydrated within the Hydration range.
ritual.BloodMagic.greenGroveRitual.destructive.info=(Destructive) Growing range is increased based on total Will.
ritual.BloodMagic.fullStomachRitual.info=Takes food from the linked chest and fills the player's saturation with it. ritual.BloodMagic.fullStomachRitual.info=Takes food from the linked chest and fills the player's saturation with it.
ritual.BloodMagic.interdictionRitual.info=Pushes all mobs within its area away from the master ritual stone. ritual.BloodMagic.interdictionRitual.info=Pushes all mobs within its area away from the master ritual stone.