WEBVTT

00:06.810 --> 00:08.610
Welcome In this video.

00:08.610 --> 00:14.940
I'm going to challenge you to fill out the Firebolt description, and I'd like you to use our different

00:14.940 --> 00:18.780
styles in our rich text data asset.

00:18.930 --> 00:23.040
I'd like you to show the name of the ability for firebolt.

00:23.040 --> 00:25.110
Just say Firebolt.

00:25.110 --> 00:31.140
And I'd like you to say launches a bolt of fire exploding on impact and dealing nine fire damage with

00:31.140 --> 00:35.520
a chance to burn and make sure nine uses the damage style.

00:35.520 --> 00:38.670
If you like, you can show the level at the bottom too.

00:38.670 --> 00:40.920
And for the next level description.

00:40.920 --> 00:48.210
Say next level and say launches two bolts of fire exploding on impact and dealing 17 damage with a chance

00:48.210 --> 00:48.600
to burn.

00:48.600 --> 00:55.230
Now this is going to be not hard coded, but see if you can figure out how to get the damage based on

00:55.230 --> 00:56.070
the level.

00:56.370 --> 00:59.370
Now, notice I said launches two bolts of fire.

00:59.400 --> 01:01.350
I'd like this to be the level.

01:01.350 --> 01:08.200
So if it's level two, I'd like to see two and notice if I level up.

01:08.600 --> 01:15.920
And I spend a point on my Firebolt notice now that my firebolt description says launches two bolts of

01:15.920 --> 01:18.530
fire and next level launches three.

01:18.560 --> 01:23.100
Now I'd like this to be capped off at five, so I never want to see five there.

01:23.120 --> 01:29.130
So that's your challenge to fill out the description for Firebolt with these qualities.

01:29.150 --> 01:31.820
So get as far as you can with this.

01:32.740 --> 01:38.980
So for this quest, I'd like you to override Git description in Aura projectile spell.

01:39.010 --> 01:46.750
Go ahead and set that message there as if this were for aura firebolt and override git next level description

01:46.750 --> 01:51.910
as well and take it as a bonus challenge to show the damage amount.

01:51.940 --> 01:55.600
See if you can figure out how to do that based on the level.

01:55.630 --> 01:59.080
Pause the video and conquer this quest now.

02:02.450 --> 02:05.660
Okay, so we need a description for Firebolt.

02:06.050 --> 02:07.550
I'm going to close the editor.

02:07.730 --> 02:15.350
I'm going to go ahead and just open ability system abilities or a projectile spell.

02:16.140 --> 02:19.950
And I'm going to get its H file open as well.

02:20.720 --> 02:25.160
And I'm going to override two public functions.

02:25.550 --> 02:27.680
So we'll get a public section in here.

02:27.710 --> 02:35.810
I'm going to say virtual F string Getdescription override, and we'll also override the next level.

02:35.810 --> 02:40.940
So virtual F string, get next level description override.

02:44.530 --> 02:46.450
Let's generate definitions.

02:48.230 --> 02:50.150
And I'm not going to call super.

02:50.660 --> 02:53.690
So let's think about our description here.

02:53.720 --> 02:58.730
Now it's going to be different if it's level one versus a number greater than one.

02:58.790 --> 03:02.060
If it's one, I'm going to say launches a Firebolt.

03:02.060 --> 03:08.300
But if it's more than one, I'm going to say launches a number of firebolts because I want the number

03:08.300 --> 03:11.220
of fireballs to be the level up to a cap.

03:11.240 --> 03:18.980
So what I'll say here is if level equals one and then I'll have an else case.

03:19.250 --> 03:24.830
Now, if the level is one, I'm going to return an F string using print f.

03:26.960 --> 03:31.160
It's going to have text comma followed by parameters.

03:31.160 --> 03:40.220
Now the text is going to use the title, so I'm going to use title and I'm also going to have the end

03:40.610 --> 03:43.250
pointy brackets for title and it's going to say in all caps.

03:43.250 --> 03:44.300
Firebolt.

03:45.080 --> 03:52.520
And after this I'm going to have to new line characters forward slash n forward slash n, and then I

03:52.520 --> 03:54.200
can have stuff on the next line.

03:54.200 --> 03:56.960
So I'm going to use the default.

03:58.060 --> 03:58.810
Style.

03:59.350 --> 04:00.340
I'll go ahead and close it.

04:00.340 --> 04:04.060
I like to close them first before I put text between them.

04:04.060 --> 04:14.320
And the text is going to say launches a bolt of fire exploding on impact and dealing.

04:15.100 --> 04:17.500
And then I want to use my damage style.

04:17.500 --> 04:20.170
So I'm going to use damage.

04:22.290 --> 04:24.960
And it looks like this is really easy to mess up.

04:24.960 --> 04:27.150
I need this end style one.

04:27.150 --> 04:28.140
This one.

04:28.810 --> 04:30.700
Over here.

04:30.730 --> 04:35.920
Looks like I put a typo in launches, but title is opening and closed here.

04:36.130 --> 04:40.060
Default is opening and needs to close here.

04:41.830 --> 04:42.910
Like that.

04:43.240 --> 04:50.740
And then damage is opening and needs to close and the amount of damage is actually going to depend.

04:50.740 --> 04:51.370
Right.

04:51.670 --> 04:56.080
How did we get the damage from the ability in this class before?

04:56.080 --> 04:57.880
Let's remind ourselves.

04:57.940 --> 05:00.340
We have scaled damage here.

05:01.070 --> 05:07.700
Now, we could have multiple damage types, but I'm just going to get the damage type for fire because

05:07.700 --> 05:11.660
this is fire bolt and I'll make a new one.

05:12.080 --> 05:17.120
If I have a different or a projectile spell that Aura wants to use.

05:17.120 --> 05:24.920
So I'm just going to get my damage types t map and index it at fire and call get value at level.

05:24.920 --> 05:26.240
That's what I'm going to do.

05:27.100 --> 05:28.540
So I'm going to say.

05:29.460 --> 05:33.180
Const float damage equals.

05:33.990 --> 05:39.030
Damage types indexed at the fire damage type.

05:39.060 --> 05:48.060
So I'm going to say for a gameplay tags get dot damage underscore fire.

05:52.600 --> 05:57.370
And from this scalable float, I'm going to get value at level passing in level.

05:57.370 --> 05:58.750
And now I have damage.

05:58.750 --> 06:05.200
And so for damage I'm going to use percent D and I'm going to go ahead and just round this to an integer.

06:05.620 --> 06:13.900
I'll let it give me a float and just implicitly convert to an int 32 and that's going to be the first

06:13.900 --> 06:15.700
format parameter here.

06:15.700 --> 06:17.170
It's going to be damage.

06:18.730 --> 06:26.710
Now, after we say that, I'm going to use the default style again, so I'm going to say default, closing

06:26.710 --> 06:36.400
it off and inside of the default again, I'm going to say space fire damage with a chance to burn.

06:37.110 --> 06:39.930
And after that, I'm going to have two new lines.

06:39.930 --> 06:41.640
So new line, new line.

06:41.640 --> 06:44.050
And I'm going to show some stats.

06:44.070 --> 06:49.080
So with the stats, I'm going to use the small style.

06:51.120 --> 06:56.310
And I'm going to say in the small style level, colon space.

06:57.140 --> 07:01.100
And I'm going to show the level using the level style level.

07:01.910 --> 07:03.620
I'm going to open and close it.

07:03.740 --> 07:06.830
By the way, if this gets really confusing, just look at the GitHub.

07:06.830 --> 07:09.950
Commit for this so you can get a closer look.

07:10.460 --> 07:11.870
Okay, that's enough for now.

07:11.870 --> 07:20.720
We have our description for level one and the description for any level over one is going to almost

07:20.720 --> 07:21.440
be the same.

07:21.440 --> 07:23.030
I'm just going to copy it.

07:26.640 --> 07:28.860
And we're going to paste.

07:29.790 --> 07:37.650
The same thing, only we're going to change this to say launches and we'll have percent de percent de

07:37.680 --> 07:42.780
bolts, plural of fire exploding on impact and dealing.

07:43.050 --> 07:44.580
We'll have damage there.

07:44.580 --> 07:47.990
Fire on damage with a chance to burn.

07:48.000 --> 07:51.090
Now we're going to show the level after that.

07:51.090 --> 07:57.840
So we have a percent de before damage and that's going to be the number of fire bolts.

07:58.110 --> 08:01.650
Now, that's not something that we've coded yet.

08:01.650 --> 08:08.070
So we can make our projectile spell, have a integer for the number of projectiles.

08:08.070 --> 08:17.670
So we're going to say int 32 num projectiles equals five with a new property.

08:19.230 --> 08:23.750
Edit defaults only and we'll just use num projectiles here.

08:23.760 --> 08:29.370
And what we're going to do is we're going to take the minimum between the level and Num projectiles,

08:29.370 --> 08:30.720
whichever is lowest.

08:30.720 --> 08:44.160
So we're going to take f math min passing in our level and num projectiles and f math needs a double

08:44.160 --> 08:45.030
colon there.

08:45.030 --> 08:48.420
So we'll take the min between level and projectiles.

08:48.420 --> 08:52.710
So we're showing how many projectiles will be launched this level.

08:52.980 --> 08:56.700
Now, next level is just going to be the same.

08:57.800 --> 09:08.500
So we're going to take what we did here and paste it Next level will say Firebolt launches percent de

09:08.540 --> 09:11.300
bolts of fire using that level there.

09:11.300 --> 09:13.220
But we're taking the min.

09:13.880 --> 09:16.460
And we also need to calculate the damage again.

09:16.460 --> 09:19.970
So we'll go ahead and copy this line and paste it there.

09:20.300 --> 09:23.570
And then everything else should be the same.

09:23.570 --> 09:27.080
So now Firebolt has a description.

09:27.080 --> 09:31.730
So let's go ahead and launch and see how it works.

09:33.730 --> 09:35.790
All right, So we're back open.

09:35.800 --> 09:37.540
We shouldn't have to change anything.

09:37.540 --> 09:40.480
We should be able to just open our spells menu.

09:41.030 --> 09:43.790
And we should be able to now see a description.

09:43.790 --> 09:44.230
And we do.

09:44.240 --> 09:51.020
We see Firebolt here launches a bolt of fire exploding on impact and dealing nine fire damage with a

09:51.020 --> 09:52.550
chance to burn.

09:52.550 --> 09:59.540
And we see that it's level one and the next level description says launches two bolts of fire exploding

09:59.540 --> 10:03.380
on impact and dealing 40 damage with a chance to burn.

10:03.380 --> 10:05.090
And that says level two.

10:05.270 --> 10:06.320
All right.

10:06.710 --> 10:07.880
Excellent.

10:08.620 --> 10:14.020
Next one says spell locked until level two, which is exactly what I wanted to see.

10:14.050 --> 10:17.950
Let's also see what happens if we level up our fire ability.

10:19.800 --> 10:21.000
All right, We leveled up.

10:21.000 --> 10:28.500
Let's take that fire ability, spend a point on it, and we see that launches two bolts of fire now

10:28.500 --> 10:31.320
causing 40 damage at level two.

10:31.320 --> 10:38.130
And then for next level, we see launches, three bolts of fire exploding on impact and dealing, 49

10:38.160 --> 10:40.260
fire damage with a chance to burn.

10:40.620 --> 10:41.640
Cool.

10:42.180 --> 10:43.200
All right.

10:43.230 --> 10:48.510
Now, the last thing I'm noticing is that Firebolt right here should actually say next level.

10:48.510 --> 10:51.450
So I'm going to change that real quick.

10:51.600 --> 10:56.460
So for Jet next level description, this will say next level.

11:00.490 --> 11:01.630
I'll make it all caps.

11:04.500 --> 11:07.890
And with that, we have a firebolt description.

11:08.790 --> 11:09.690
Looks great.

11:11.890 --> 11:12.790
Okay.

11:15.070 --> 11:19.390
Now it says next level and shows us what happens at next level.

11:19.390 --> 11:20.950
That makes more sense.

11:20.980 --> 11:24.510
We'll go ahead and upgrade it again just because we can.

11:24.520 --> 11:26.350
And it's looking great.

11:26.950 --> 11:27.580
All right.

11:27.610 --> 11:35.620
Now I think I can take my damaged curve table down just a bit because a jump from 10 to 40 is kind of

11:35.620 --> 11:36.220
drastic.

11:36.220 --> 11:44.680
So I'm going to go to ability system data, CT damage, open firebolt, and I'm actually going to just

11:44.680 --> 11:50.350
remove these curve points and make this a little bit more linear.

11:52.060 --> 11:54.400
We can go up a little faster than this, but.

11:55.370 --> 11:56.630
I'd like a smoother curve.

11:56.630 --> 12:00.500
So at level two, we'll see a value of 16.

12:00.500 --> 12:02.750
So we'll go from 10 to 16.

12:02.960 --> 12:05.840
At level three, we'll go to 34.

12:06.460 --> 12:08.500
Level six is 50.

12:08.500 --> 12:09.760
So that's looking pretty good.

12:09.760 --> 12:15.880
And as I change that curve table, the cool thing is I'll see that reflected when I take a look at the

12:15.880 --> 12:16.840
description.

12:16.840 --> 12:21.130
So I see that it causes nine, but next level causes 17.

12:21.130 --> 12:23.710
If I upgrade it, it causes 17.

12:23.710 --> 12:25.720
Next level, it causes 26.

12:25.750 --> 12:26.560
Cool.

12:26.890 --> 12:31.570
Now we just need a description for our electrocute, which we don't have.

12:31.960 --> 12:32.830
Excellent.

12:33.620 --> 12:36.620
Awesome job and I'll see you in the next video.
