Atomic IVAN

https://attnam.com/topics/Atomic-IVAN

The Cathedral of Attnam > Other Coding

#1 Dec 17, 2008, 8:37 pm Hide

4zb4

Hello everyone.
I had a read through of a few old threads, and it seems people wanted an atomic mine/bomb in IVAN.
So...

I made one.

It is currently in Beta testing, as I cannot figure out how to increase IVAN's maximum blast radius for explosions. Can somebody help with that?

Anyways, I have packaged it with IVAN 0.50 as there is rather a lot of script that has been added, and it seemed easier this way. Also there is a zip file with just the script in it.

The details:

*The atomic mine (bomb) is found in New Attnam in the sumo's house (see screenshot 1) Although sometimes does not show up. If this happens, check under the sumo when he moves to eat. If it's not there, start a new game.
*Its explosion has a 15 square diameter, this is the maximum for IVAN.
*It can be wished for
*It uses the atomic bomb picture from the graphics file, so does not look like an ordinary old mine.
*There are only 2 pre-placed in the game. One in New Attnam and the other in the dwarven minefield
*It's made of Iron and Atom Bomb Powder (new material)
*Standing on it will kill you.
*It can't kill Elpuri, but brings his health down to around 390hp (see screenshot 5)
*You can SoCM anything into atom bomb powder, but if it explodes, you're dead.
*Use the first bomb wisely. You need to get at least 16 squares away to be safe from the resulting explosion.
*It acts like a mine, you apply it, run away and anything that steps on it sets it off (and dies).
*Everything to do with the atomic mine was freshy made, nothing else has been touched.

have fun everyone... *evil laugh*
oh and Atomic better not get angry for me using his name XD

UPDATE 0.2
*added the spade of asplosions (edited Turox)
*Added spades, but can't figure out how to get them to work like a pick-axe
*Jacket has been added, but won't act like the backpack full of gunpowder. Might just edit the backpack.
*Ivan now has an AK47 8h)

UPDATE 0.21
*Fixed the jacket. Now "suicide bomb vest". Contains NITRO (new material) about as powerful as the atomic mine. Can be found in the dwarven minefield. Glows brightly.
*NITRO added. Glows bright green and is highly explosive. Can be found in bottles. Drinking it will kill you. Throwing it at someone will kill them. Fireballing it kills just about everyone in the blast radius.
*Kamikazi dwarfs now use suicide bomb jackets instead of gunpowder backpacks. The upside of this is that they glow in the dark. The downside is that if they explode on you, they WILL kill you.
*Still can't figure out how to get the weight right. The atom bomb and bomb vest both have negative values. The closest I ever got was getting the atom bomb to 2000g and then it wouldn't blow up right. I might just leave them as they are. Having 2 bomb vests will overload you.
*Added the TNT mine. These can be found in the dwarven minefield, and can be wished for. Not as powerful as the atomic mine. Looks like a red lump similar to a lump of banana flesh.
*Added material TNT. Not as powerful as the atomic bomb or nitro, but is still powerful enough to kill you. It is possible to survive the explosion.
Attached files
atomicIVAN.zip ()
atomicScript.zip ()
#2 Dec 17, 2008, 9:58 pm Hide

capristo

Very nice work. You win most valuable new member award.
#3 Dec 17, 2008, 10:22 pm Hide

4zb4

ty.

Currently working on a suicide bomber vest, but the script doesn't like me adding new items... the only time it worked, it thought it was a mine and instead of self-destructing, it planted itself.
#4 Dec 18, 2008, 6:23 am Hide

chaostrom

If Atomic has any objections call it... Blue Phoenix (yes it is oxymoronic, and yes it is a reference to the WW2 Blue Peacock nuclear landmine project).
#5 Dec 19, 2008, 8:13 am Hide

Fluffy_Bot

chaostrom wrote
If Atomic has any objections call it... Blue Phoenix (yes it is oxymoronic, and yes it is a reference to the WW2 Blue Peacock nuclear landmine project).

Give it a Hitler moustache.
#6 Dec 19, 2008, 8:48 am Hide

chaostrom

Hahaha, the irony of it (Blue Peacock was a British project XD ).
#7 Dec 19, 2008, 6:04 pm Hide

Fluffy_Bot

chaostrom wrote
Hahaha, the irony of it (Blue Peacock was a British project XD ).

That was the plan
#8 Dec 19, 2008, 7:20 pm Hide

Cerumen

I checked it out, and it's pretty awesome. I wouldn't play it seriously, but it was fun to mess with
#9 Dec 19, 2008, 7:24 pm Hide

4zb4

Playing it seriously will get you killed.
Many, MANY times.
#10 May 12, 2009, 6:17 am Hide

4zb4

PROGRESS!
I decided to continue on my WW2 theme and have added the following:
A shotgun (copied wand of striking with more charges. Can be used for melee)
A bazooka (Wand of fireballs, more charges)
A combat vest (AV 28 )
A taser (thunder hammer)
A sword that (Z)aps lightning
Petrol bombs (no lasting fire though)
G.I. helmet (AV 10)

Other changes:
The Encourager is now racist
Decos's building is now steel with a meteoric steel floor
Petrus has been changed to look like Hitler
#11 Jul 20, 2009, 5:08 pm Hide

Iankill

This post will be long and contain code
I believe i might be able to help you make the spade be able to dig like a pickaxe. I was going through the source today at work and I found the code for the pickaxe and by chance the code for the digging action.


truth pickaxe::Apply(character* User)
{
if(IsBroken())
{
ADD_MESSAGE("%s is totally broken.",CHAR_NAME(DEFINITE));
return false;
}

int Dir = game:irectionQuestion(CONST_S("What direction do you want to dig? [press a direction key]"), false);

v2 Temp = game::GetMoveVector(Dir);
v2 ToBeDug = User->GetPos() + Temp;
if(Dir == DIR_ERROR || !GetArea()->IsValidPos(ToBeDug))
return false;

lsquare* Square = GetNearLSquare(ToBeDug);
olterrain* Terrain = Square->GetOLTerrain();

if(!Terrain)
{
ADD_MESSAGE("Nothing to dig there!");
return false;
}

if(Square->CanBeDug())
{
if(Terrain->CanBeDestroyed())
if(Terrain->GetMainMaterial()->CanBeDug(GetMainMaterial()))
{
int RoomNumber = Square->GetRoomIndex();

if(!RoomNumber || Square->GetLevel()->GetRoom(RoomNumber)->CheckDestroyTerrain(User))
{
User->SwitchToDig(this, ToBeDug);
User->DexterityAction(5);
return true;
}
else
return false;
}
else
ADD_MESSAGE("%s is too hard to dig with %s.", Square->GetOLTerrain()->CHAR_NAME(DEFINITE), CHAR_NAME(INDEFINITE));
else
ADD_MESSAGE(Terrain->GetDigMessage().CStr());
}

return false;
}
That is the code for applying of the pickaxe to a ground or a wall


ITEM(pickaxe, meleeweapon)
{
public:
virtual truth Apply(character*);
virtual truth IsAppliable(const character*) const;
};

This is the code for the pickaxe and it calls the application of the pickaxe code when you try and dig something. Those are the only two places besides the items.dat file that the pickaxe is found so if you copy and paste that using spade instead of pickaxe it should work because the actual digging action has nothing to do with the pickaxe as things can be dug more than one way i.e kicking or explosives. I hope that helps but it might not. Also it was a pretty fun edit to play
#12 Jul 20, 2009, 5:31 pm Hide

4zb4

Thanks for that Iankill. I will implement that when I finally get my head around the confusing-as-hell source code.
These have just been script edits after all.
#13 Jul 21, 2009, 9:15 am Hide

capristo

Iankill and 4zb4 you guys rock
#14 Feb 19, 2010, 11:01 am Hide

Dark-Star

F is for fire that burns down the whole town, U is for uranium...bomb!

8-}