Skip to content

Commit

Permalink
TrueSKY deprecation notice
Browse files Browse the repository at this point in the history
and the Water spell base class.
  • Loading branch information
smccutchen committed Apr 18, 2017
1 parent ee88225 commit adf41f3
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Ethereal/Ethereal.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public Ethereal(TargetInfo Target)
"AIModule",
"GameplayTasks",
"UMG",

//////////////////
// THE TRUESKY PLUGIN HAS BEEN DEPRECATED FROM ETHEREAL LEGENDS AS OF VERSION 1.2.1
//////////////////
//"TrueSkyPlugin"
}
);
Expand Down
115 changes: 115 additions & 0 deletions Ethereal/Private/Gear/Magic/Spells/Water.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
// © 2014 - 2017 Soverance Studios
// http://www.soverance.com

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at

// http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "Ethereal.h"
#include "Characters/Player/EtherealPlayerMaster.h"
#include "Characters/Enemy/EtherealEnemyMaster.h"
#include "Water.h"

#define LOCTEXT_NAMESPACE "EtherealText"

// Sets default values
AWater::AWater(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
// Get Assets, References Obtained Via Right Click in Editor
static ConstructorHelpers::FObjectFinder<UParticleSystem> ChargeParticleObject(TEXT("ParticleSystem'/Game/Blueprints/Gear/Magic/SpellEffects/Particles/ChargeFX/ChargeParticle.ChargeParticle'"));
static ConstructorHelpers::FObjectFinder<UParticleSystem> CastParticleObject(TEXT("ParticleSystem'/Game/InfinityBladeEffects/Effects/FX_Mobile/Lightning/P_LineToPoint_Spawn_Proj_Lightning_00.P_LineToPoint_Spawn_Proj_Lightning_00'"));
static ConstructorHelpers::FObjectFinder<UTexture2D> LargeIconObject(TEXT("Texture2D'/Game/Blueprints/Widgets/UI-Images/Icons_Magic/thunder.thunder'"));
static ConstructorHelpers::FObjectFinder<UTexture2D> SmallIconObject(TEXT("Texture2D'/Game/Blueprints/Widgets/UI-Images/Icons_Magic/thunder-small.thunder-small'"));
static ConstructorHelpers::FObjectFinder<UClass> DropBlueprintObject(TEXT("Blueprint'/Game/Blueprints/Gear/Magic/Spells/Drops/ThunderDrop.ThunderDrop_C'"));

// Set Default Values
Name = EMasterGearList::GL_Water;
NameText = LOCTEXT("WaterName", "Water");
Type = EMasterGearTypes::GT_Black;
TypeText = LOCTEXT("WaterType", "Black Magic");
Description = "Drown your enemies with a pillar of water.";
Price = 10000;
MPCost = 75;
ATK = 5;
DEF = 0;
SPD = 0;
HP = -60;
MP = 40;
Duration = 10;
CastTime = 30;
CritMultiplier = 0;
HasteMultiplier = 0;
DefenseMultiplier = 0;
TargetType = EMagic_TargetTypes::TT_Enemy;
AnimType = EMagic_AnimTypes::AT_TopDown;

// Set Default Objects
LargeIcon = LargeIconObject.Object;
SmallIcon = SmallIconObject.Object;

P_ChargeFX = ChargeParticleObject.Object;
ChargeFX->Template = P_ChargeFX;
ChargeFX->SetColorParameter("Color", FLinearColor(1, 0.98f, 0.42f, 1)); // Set Charge Particle Color

P_CastFX = CastParticleObject.Object;
CastFX->Template = P_CastFX;

ThunderDropBP = DropBlueprintObject.Object;
}

// Called when the game starts or when spawned
void AWater::BeginPlay()
{
Super::BeginPlay();

// Bind the Use function to the event dispatcher for Item Use
QuitCharging.AddDynamic(this, &AWater::Cancel);
}

void AWater::Cancel()
{
//GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::Red, "Thunder casting was cancelled.");
}

void AWater::ChargeThunder()
{
IsCharging = true; // Set Charging State True
ChargeFX->Activate(); // Activate the charge particle
// Get player mesh and attach this object
Root->AttachToComponent(OwnerReference->GetMesh(), FAttachmentTransformRules::SnapToTargetIncludingScale, "PowerSocket");
}

void AWater::CastThunder()
{
ChargeFX->Deactivate(); // Deactivate Charge particle
CastFX->Activate();

// Do the Cast effect after a short delay
FTimerHandle CastTimer;
GetWorldTimerManager().SetTimer(CastTimer, this, &AWater::DoCastEffect, 1.3f, false);
}

void AWater::DoCastEffect()
{
// Make sure the current target is anything but the player himself
// Because this is a single player game, this will work fine
if (OwnerReference->CurrentTarget != OwnerReference)
{
AActor* ThunderDrop = UCommonLibrary::SpawnBP(GetWorld(), ThunderDropBP, OwnerReference->CurrentTarget->GetActorLocation(), OwnerReference->CurrentTarget->GetActorRotation());
}
else
{
OwnerReference->AudioManager->Play_SFX_Error();
}
}

#undef LOCTEXT_NAMESPACE
3 changes: 3 additions & 0 deletions Ethereal/Private/Management/EtherealTrueSKYManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#include "Ethereal.h"
#include "EtherealTrueSKYManager.h"

//////////////////
// THE TRUESKY PLUGIN HAS BEEN DEPRECATED FROM ETHEREAL LEGENDS AS OF VERSION 1.2.1
//////////////////

// Sets default values
AEtherealTrueSKYManager::AEtherealTrueSKYManager()
Expand Down
52 changes: 52 additions & 0 deletions Ethereal/Public/Gear/Magic/Spells/Water.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// © 2014 - 2017 Soverance Studios
// http://www.soverance.com

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at

// http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#include "Gear/Magic/Magic_Master.h"
#include "Water.generated.h"

UCLASS()
class ETHEREAL_API AWater : public AMagic_Master
{
GENERATED_BODY()

public:

AWater(const FObjectInitializer& ObjectInitializer);

// BeginPlay Override
virtual void BeginPlay() override;

// Thunder Drop Blueprint
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Effects)
TSubclassOf<class AActor> ThunderDropBP;

/** Casts this spell. */
UFUNCTION(BlueprintCallable, Category = Controls)
void Cancel();

/** Charge Spell. */
UFUNCTION(BlueprintCallable, Category = Casting)
virtual void ChargeThunder();

/** Cast Spell. */
UFUNCTION(BlueprintCallable, Category = Casting)
virtual void CastThunder();

/** Do Cast effect. */
UFUNCTION(BlueprintCallable, Category = Casting)
virtual void DoCastEffect();
};
1 change: 1 addition & 0 deletions Ethereal/Public/Gear/MasterGearList.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
GL_Blizzard UMETA(DisplayName = "Blizzard"),
GL_Thunder UMETA(DisplayName = "Thunder"),
GL_Fire UMETA(DisplayName = "Fire"),
GL_Water UMETA(DisplayName = "Water"),
GL_Poison UMETA(DisplayName = "Poison"),
GL_Sleep UMETA(DisplayName = "Sleep"),
GL_Berserk UMETA(DisplayName = "Berserk"),
Expand Down
4 changes: 4 additions & 0 deletions Ethereal/Public/Management/EtherealTrueSKYManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
#include "Realms.h"
#include "EtherealTrueSKYManager.generated.h"

//////////////////
// THE TRUESKY PLUGIN HAS BEEN DEPRECATED FROM ETHEREAL LEGENDS AS OF VERSION 1.2.1
//////////////////

UCLASS()
class ETHEREAL_API AEtherealTrueSKYManager : public AActor
{
Expand Down

0 comments on commit adf41f3

Please sign in to comment.