What does prevent someone to build its own wallet with modified difficulty or block reward ? There are some coins with random block reward. If I modify the source and set a fixed block reward corresponding to the max of random reward, would my blocks be accepted by the network ?
Depends on how the original dev has implemented the block reward.
Typically the client only checks that the value of coinbase transaction does
not exceed the subsidy at that height. So I think it would be hard (but sort of
interesting) to perform a check that the reward has indeed been generated randomly...
And I think there is nothing stopping you if you want to make difficulty harder for yourself
than the rest of the network, but the opposite won't work.