I have a big doubt about this subject: I would like to create a boss that spawns lightning bolts with explosion and fire near to your position each some time while you're fighinting him. I got this things clear:
/Summon mob with special stats
/command for clock tied to an /summon lightning_bolt +extra... (this would spawn the explosions and thunders)
/testfor to stop the upper command when the boss is dead.
Now, How can I summon those explosions to the player in way that if the player stay in the same position will be impacted and if moves will skip the damage?
Is there any way to spawn that lighning bolt in the position of the player then a few seconds? I mean, the summon always spam at that moment, but can be slowed a bit to do what I want?
And something more, how can stop those things to create a second phase? How can I detect when the boss got like 50% of his live and change the mechanics?
I think would be like stop the system from before and active the new ones, but how can i detect if the boss is with low HP?
You can spawn mobs with special stats I'm not great at that kinda thing but you can get it easier at minecrafttools.en they have an amazing mob generator and as for the abilities set up a randomizer (mine is like this: execute @r[type=armor_stand,name=Random] ~ ~ ~ setblock ~ ~ ~ redstone_block and attach redstone to those redstone blocks to make commands happen) and than just add the commands! (/execute @a ~ ~ ~ summon lightning_bolt)
And no I don't think I know how to do a second phase